GNOME Bugzilla – Bug 546730
gtk_status_icon_get_gicon() should use a return instead of an ouput parameter
Last modified: 2008-08-12 07:25:42 UTC
I don't understand why the new gtk_status_icon_get_gicon() is using an output parameter. That's unnecessarily awkward. It should just be a return, like similar functions in GTK+. void gtk_status_icon_get_gicon (GtkStatusIcon *status_icon, GIcon **icon)
For comparison, other GIcon* accessors: void gtk_image_get_gicon (GtkImage *image, GIcon **gicon, GtkIconSize *size); GIcon* gtk_icon_entry_get_gicon (const GtkIconEntry *entry, GtkIconEntryPosition icon_pos);
Yes, it would be nice if gtk_image_get_gicon() was fixed too.
Created attachment 116047 [details] [review] [PATCH] Fix for GIcon getters in GtkStatusIcon and GtkImage this patch changes the GIcon getters for GtkStatusIcon and GtkImage and makes them return the GIcon object instead of using a return location.
The GtkImage getter follows the pattern of all the other GtkImage image content getters. I don't see what we win by breaking that.
(In reply to comment #4) > The GtkImage getter follows the pattern of all the other GtkImage image content > getters. I don't see what we win by breaking that. OK, yes, that is true for all functions that return two items of data, such as gtk_image_get_gicon(). I wish it wasn't, of course. So can we just fix gtk_status_icon_get_gicon()?
2008-08-12 Matthias Clasen <mclasen@redhat.com> Bug 546730 – gtk_status_icon_get_gicon() should use a return instead of an ouput parameter * gtk/gtkstatusicon.[hc]: Change gtk_status_icon_get_gicon to return the GIcon directly. Complaint by Murray Cumming