aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXan Lopez <xan@src.gnome.org>2009-01-24 01:32:42 +0800
committerXan Lopez <xan@src.gnome.org>2009-01-24 01:32:42 +0800
commit85eeddd7c934d0485d6d62250191af34b4815f01 (patch)
treea7b578f2d6076522da68c6f43ba05ce0a7f71050
parent620d5e3d46ded3b5cc552ba13cc4d595243f1b01 (diff)
downloadgsoc2013-epiphany-85eeddd7c934d0485d6d62250191af34b4815f01.tar
gsoc2013-epiphany-85eeddd7c934d0485d6d62250191af34b4815f01.tar.gz
gsoc2013-epiphany-85eeddd7c934d0485d6d62250191af34b4815f01.tar.bz2
gsoc2013-epiphany-85eeddd7c934d0485d6d62250191af34b4815f01.tar.lz
gsoc2013-epiphany-85eeddd7c934d0485d6d62250191af34b4815f01.tar.xz
gsoc2013-epiphany-85eeddd7c934d0485d6d62250191af34b4815f01.tar.zst
gsoc2013-epiphany-85eeddd7c934d0485d6d62250191af34b4815f01.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=/branches/gnome-2-26/; revision=8724
-rw-r--r--src/bookmarks/ephy-bookmarks-ui.c8
-rw-r--r--src/bookmarks/ephy-topic-action.c6
-rw-r--r--src/ephy-window.c4
3 files changed, 9 insertions, 9 deletions
diff --git a/src/bookmarks/ephy-bookmarks-ui.c b/src/bookmarks/ephy-bookmarks-ui.c
index 809bc6f5d..96264f2d4 100644
--- a/src/bookmarks/ephy-bookmarks-ui.c
+++ b/src/bookmarks/ephy-bookmarks-ui.c
@@ -117,7 +117,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
@@ -133,7 +133,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,
@@ -149,7 +149,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,
@@ -171,7 +171,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 78f322bb4..04d20a94d 100644
--- a/src/bookmarks/ephy-topic-action.c
+++ b/src/bookmarks/ephy-topic-action.c
@@ -127,7 +127,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);
@@ -376,8 +377,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 2fb97369f..cd83b2148 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -1257,7 +1257,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 (G_OBJECT (action), "tooltip", &message, NULL);
@@ -1290,7 +1290,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 (G_OBJECT (action), "tooltip", &message, NULL);