After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 574561 - gtk_style_get "shadows" g_object_get
gtk_style_get "shadows" g_object_get
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
2.15.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2009-03-08 16:16 UTC by Torsten Schoenfeld
Modified: 2009-03-10 19:00 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Torsten Schoenfeld 2009-03-08 16:16:27 UTC
In OO language bindings, gtk_style_get and gtk_style_get_property "shadow" g_object_get and g_object_get_property: calling get() and get_property() on a GtkStyle instance would invoke gtk_style_get and gtk_style_get_property.  This breaks code that assumes calling get_property() on a GObject descendant always resolves to g_object_get_property().

There's a precedent for this: GtkTreeModel provides gtk_tree_model_get and thus shadows g_object_get, but since there's no gtk_tree_model_get_property, g_object_get_property is not shadowed.

This points to one possible solution: leave gtk_style_get as is for C convenience, and rename gtk_style_get_property to gtk_style_get_style_property.  Would you be interested in a patch that does this?
Comment 1 Matthias Clasen 2009-03-10 16:14:08 UTC
Ugh, I guess we should fix this. I've sent a freeze break request.
Comment 2 Matthias Clasen 2009-03-10 19:00:26 UTC
2009-03-10  Matthias Clasen  <mclasen@redhat.com>

        Bug 574561 – gtk_style_get "shadows" g_object_get

        * gtk/gtk.symbols:
        * gtk/gtkstyle.[hc]: Rename gtk_style_get_property to
        gtk_style_get_style_property to avoid problems for language
        bindings. Pointed out by Torsten Schoenfeld.