epiphany r8724 - in branches/gnome-2-26/src: . bookmarks
- From: xan svn gnome org
- To: svn-commits-list gnome org
- Subject: epiphany r8724 - in branches/gnome-2-26/src: . bookmarks
- Date: Fri, 23 Jan 2009 17:32:42 +0000 (UTC)
Author: xan
Date: Fri Jan 23 17:32:42 2009
New Revision: 8724
URL: http://svn.gnome.org/viewvc/epiphany?rev=8724&view=rev
Log:
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.
Modified:
branches/gnome-2-26/src/bookmarks/ephy-bookmarks-ui.c
branches/gnome-2-26/src/bookmarks/ephy-topic-action.c
branches/gnome-2-26/src/ephy-window.c
Modified: branches/gnome-2-26/src/bookmarks/ephy-bookmarks-ui.c
==============================================================================
--- branches/gnome-2-26/src/bookmarks/ephy-bookmarks-ui.c (original)
+++ branches/gnome-2-26/src/bookmarks/ephy-bookmarks-ui.c Fri Jan 23 17:32:42 2009
@@ -117,7 +117,7 @@
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 @@
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 @@
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 @@
{
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);
}
Modified: branches/gnome-2-26/src/bookmarks/ephy-topic-action.c
==============================================================================
--- branches/gnome-2-26/src/bookmarks/ephy-topic-action.c (original)
+++ branches/gnome-2-26/src/bookmarks/ephy-topic-action.c Fri Jan 23 17:32:42 2009
@@ -127,7 +127,8 @@
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 @@
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);
Modified: branches/gnome-2-26/src/ephy-window.c
==============================================================================
--- branches/gnome-2-26/src/ephy-window.c (original)
+++ branches/gnome-2-26/src/ephy-window.c Fri Jan 23 17:32:42 2009
@@ -1257,7 +1257,7 @@
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 @@
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]