GNOME Bugzilla – Bug 568848
don't rely on gtk implementation details
Last modified: 2009-01-24 22:40:32 UTC
While testing some GtkAction changes in GTK+ trunk, I've found that epiphany uses g_object_get_data (widget, "gtk-action") to get at the action associated with a widget in some places. Please don't do that. We consider that undocumented object data an implementation detail, and it will go away at some point. Instead, use the documented api for this: gtk_widget_get_action.
Created attachment 127102 [details] [review] 0001-Do-not-use-gtk-action-object-data-to-get-the-assoc.patch Proposed patch. Seems to work OK with GTK+ trunk.
Please commit to trunk and 2-26; thanks!
gtk_activatable_set_related_action () is only in trunk, so I can't commit this to 2-26. Maybe change it for gtk_action_connect_proxy for the backport, Matthias?
AFAIK it's ok to depend on gtk trunk/2.16 for Gnome 2.26.
Yes, for older branches, use gtk_action_connect_proxy
(In reply to comment #4) > AFAIK it's ok to depend on gtk trunk/2.16 for Gnome 2.26. > My bad, you are right. Pushed to trunk and 2-26.
Xan: There are some more instances of this in epiphany/lib/egg .
(In reply to comment #7) > Xan: There are some more instances of this in epiphany/lib/egg . > Ah yes, forgot about that. Isn't the standard procedure to update that in some central repo and then have all projects copy from there? I can do that too.
Yes, please :) Matthias: I did a quick grep on a few modules in my gnome checkout and found many having the same problem (bugs are filed). I didn't grep a complete checkout though, so it's likely that many more instances of this exist.
Thanks for checking. I plan to keep "gtk-action" around for a while, at least until 2.15.99...
I've also found external, non-gnome projects using this, e.g. thunar. So 2.15.99 might be too soon even.
Any other external projects besides thunar? Being a good citizen who loves wasting time I might file tickets in their bugtrackers...
Andre: thunar and libexo, iirc, in my google code search on \"gtk-action\".