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 568848 - don't rely on gtk implementation details
don't rely on gtk implementation details
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: General
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks: 568886
 
 
Reported: 2009-01-23 14:21 UTC by Matthias Clasen
Modified: 2009-01-24 22:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
0001-Do-not-use-gtk-action-object-data-to-get-the-assoc.patch (4.28 KB, patch)
2009-01-23 16:12 UTC, Xan Lopez
none Details | Review

Description Matthias Clasen 2009-01-23 14:21:47 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.
Comment 1 Xan Lopez 2009-01-23 16:12:08 UTC
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.
Comment 2 Christian Persch 2009-01-23 16:45:58 UTC
Please commit to trunk and 2-26; thanks!
Comment 3 Xan Lopez 2009-01-23 16:57:09 UTC
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?
Comment 4 Christian Persch 2009-01-23 17:10:23 UTC
AFAIK it's ok to depend on gtk trunk/2.16 for Gnome 2.26.
Comment 5 Matthias Clasen 2009-01-23 17:17:37 UTC
Yes, for older branches, use gtk_action_connect_proxy
Comment 6 Xan Lopez 2009-01-23 17:33:01 UTC
(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.
Comment 7 Christian Persch 2009-01-23 17:40:36 UTC
Xan: There are some more instances of this in epiphany/lib/egg .
Comment 8 Xan Lopez 2009-01-23 17:42:54 UTC
(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.
Comment 9 Christian Persch 2009-01-23 17:46:58 UTC
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.
Comment 10 Matthias Clasen 2009-01-23 18:07:37 UTC
Thanks for checking. I plan to keep "gtk-action" around for a while, at least until 2.15.99...
Comment 11 Christian Persch 2009-01-23 18:26:09 UTC
I've also found external, non-gnome projects using this, e.g. thunar. So 2.15.99 might be too soon even.
Comment 12 André Klapper 2009-01-24 22:21:37 UTC
Any other external projects besides thunar? Being a good citizen who loves wasting time I might file tickets in their bugtrackers...
Comment 13 Christian Persch 2009-01-24 22:40:32 UTC
Andre: thunar and libexo, iirc, in my google code search on \"gtk-action\".