GNOME Bugzilla – Bug 636892
emblemedicon: make GEmblemedIcon subclassable
Last modified: 2010-12-20 14:43:41 UTC
Hiding the object/class structs in the source file makes this class not subclassable. Move them to the public header, and add a property for the icon, so that subclasses can just use g_object_new (DERIVED_TYPE, "gicon", icon, NULL); to create an emblemed icon.
Created attachment 176140 [details] [review] emblemedicon: make GEmblemedIcon subclassable
Review of attachment 176140 [details] [review]: Shall we use a private here ? Like struct _GEmblemedIcon { GObject parent_instance; /*< private >*/ GEmblemedIconPrivate *priv; }
Created attachment 176455 [details] [review] emblemedicon: make GEmblemedIcon subclassable Hiding the object/class structs in the source file makes this class not subclassable. Move them to the public header, and add a property for the icon, so that subclasses can just use g_object_new (DERIVED_TYPE, "gicon", icon, NULL); to create an emblemed icon.
(In reply to comment #2) > Shall we use a private here ? Good idea, as the struct was opaque anyway. I updated my patch to include private data.
Please commit after adding the private.
Attachment 176455 [details] pushed as 01ba7bd - emblemedicon: make GEmblemedIcon subclassable