diff options
author | Xan Lopez <xan@src.gnome.org> | 2009-01-24 01:19:05 +0800 |
---|---|---|
committer | Xan Lopez <xan@src.gnome.org> | 2009-01-24 01:19:05 +0800 |
commit | 7856157fb1002cdbe3f03076f67fb1c9c5478f2e (patch) | |
tree | f2ab4cf4d7b29de720e041ca8342db8213f89e54 /src/bookmarks | |
parent | ef807369e3fb6d96f6f0f03d9ed7ed4e73108b20 (diff) | |
download | gsoc2013-epiphany-7856157fb1002cdbe3f03076f67fb1c9c5478f2e.tar gsoc2013-epiphany-7856157fb1002cdbe3f03076f67fb1c9c5478f2e.tar.gz gsoc2013-epiphany-7856157fb1002cdbe3f03076f67fb1c9c5478f2e.tar.bz2 gsoc2013-epiphany-7856157fb1002cdbe3f03076f67fb1c9c5478f2e.tar.lz gsoc2013-epiphany-7856157fb1002cdbe3f03076f67fb1c9c5478f2e.tar.xz gsoc2013-epiphany-7856157fb1002cdbe3f03076f67fb1c9c5478f2e.tar.zst gsoc2013-epiphany-7856157fb1002cdbe3f03076f67fb1c9c5478f2e.zip |
Do not use 'gtk-action' object data to get the associated GtkAction for a widget.
It's an implementation detail and will go away soon. Use documented APIs instead.
svn path=/trunk/; revision=8723
Diffstat (limited to 'src/bookmarks')
-rw-r--r-- | src/bookmarks/ephy-bookmarks-ui.c | 8 | ||||
-rw-r--r-- | src/bookmarks/ephy-topic-action.c | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/bookmarks/ephy-bookmarks-ui.c b/src/bookmarks/ephy-bookmarks-ui.c index 6799de0ba..dadfcd927 100644 --- a/src/bookmarks/ephy-bookmarks-ui.c +++ b/src/bookmarks/ephy-bookmarks-ui.c @@ -116,7 +116,7 @@ activate_bookmark_properties (GtkAction *action, widget = gtk_widget_get_ancestor (egg_editable_toolbar_get_selected (etoolbar), GTK_TYPE_TOOL_ITEM); - baction = widget ? g_object_get_data (G_OBJECT (widget), "gtk-action") : NULL; + baction = widget ? gtk_widget_get_action (widget) : NULL; g_return_if_fail (EPHY_IS_BOOKMARK_ACTION (baction)); ephy_bookmarks_ui_show_bookmark (ephy_bookmark_action_get_bookmark @@ -132,7 +132,7 @@ activate_bookmark_open_tab (GtkAction *action, widget = gtk_widget_get_ancestor (egg_editable_toolbar_get_selected (etoolbar), GTK_TYPE_TOOL_ITEM); - baction = widget ? g_object_get_data (G_OBJECT (widget), "gtk-action") : NULL; + baction = widget ? gtk_widget_get_action (widget) : NULL; g_return_if_fail (EPHY_IS_BOOKMARK_ACTION (baction)); ephy_bookmark_action_activate (EPHY_BOOKMARK_ACTION (baction), widget, @@ -148,7 +148,7 @@ activate_bookmark_open_window (GtkAction *action, widget = gtk_widget_get_ancestor (egg_editable_toolbar_get_selected (etoolbar), GTK_TYPE_TOOL_ITEM); - baction = widget ? g_object_get_data (G_OBJECT (widget), "gtk-action") : NULL; + baction = widget ? gtk_widget_get_action (widget) : NULL; g_return_if_fail (EPHY_IS_BOOKMARK_ACTION (baction)); ephy_bookmark_action_activate (EPHY_BOOKMARK_ACTION (baction), widget, @@ -170,7 +170,7 @@ selected_bookmark_action (EggEditableToolbar *etoolbar, { widget = egg_editable_toolbar_get_selected (etoolbar); widget = widget ? gtk_widget_get_ancestor (widget, GTK_TYPE_TOOL_ITEM) : NULL; - baction = widget ? g_object_get_data (G_OBJECT (widget), "gtk-action") : NULL; + baction = widget ? gtk_widget_get_action (widget) : NULL; visible = EPHY_IS_BOOKMARK_ACTION (baction); } diff --git a/src/bookmarks/ephy-topic-action.c b/src/bookmarks/ephy-topic-action.c index 94f63f9e0..0ef63a50d 100644 --- a/src/bookmarks/ephy-topic-action.c +++ b/src/bookmarks/ephy-topic-action.c @@ -126,7 +126,8 @@ create_tool_item (GtkAction *action) gtk_widget_show (button); gtk_container_add (GTK_CONTAINER (item), button); g_object_set_data (G_OBJECT (item), "button", button); - g_object_set_data (G_OBJECT (button), "gtk-action", action); + gtk_activatable_set_related_action (GTK_ACTIVATABLE (button), + action); arrow = gtk_arrow_new (GTK_ARROW_DOWN, GTK_SHADOW_NONE); gtk_widget_show (arrow); @@ -375,8 +376,7 @@ button_enter_cb (GtkWidget *button, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (active_button))) { EphyTopicAction *active_action; - active_action = g_object_get_data (G_OBJECT (active_button), - "gtk-action"); + active_action = gtk_widget_get_action (GTK_WIDGET (active_button)); erase_popup (active_action); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (active_button), FALSE); |