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 | |
parent | ef807369e3fb6d96f6f0f03d9ed7ed4e73108b20 (diff) | |
download | gsoc2013-epiphany-7856157fb1002cdbe3f03076f67fb1c9c5478f2e.tar.gz 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
-rw-r--r-- | src/bookmarks/ephy-bookmarks-ui.c | 8 | ||||
-rw-r--r-- | src/bookmarks/ephy-topic-action.c | 6 | ||||
-rw-r--r-- | src/ephy-window.c | 4 |
3 files changed, 9 insertions, 9 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); diff --git a/src/ephy-window.c b/src/ephy-window.c index 219fb333d..ea3ed7497 100644 --- a/src/ephy-window.c +++ b/src/ephy-window.c @@ -1281,7 +1281,7 @@ menu_item_select_cb (GtkMenuItem *proxy, GtkAction *action; char *message; - action = g_object_get_data (G_OBJECT (proxy), "gtk-action"); + action = gtk_widget_get_action (GTK_WIDGET (proxy)); g_return_if_fail (action != NULL); g_object_get (action, "tooltip", &message, NULL); @@ -1314,7 +1314,7 @@ tool_item_enter_cb (GtkWidget *proxy, item = GTK_TOOL_ITEM (gtk_widget_get_ancestor (proxy, GTK_TYPE_TOOL_ITEM)); - action = g_object_get_data (G_OBJECT (item), "gtk-action"); + action = gtk_widget_get_action (GTK_WIDGET (item)); g_return_val_if_fail (action != NULL, FALSE); g_object_get (action, "tooltip", &message, NULL); |