aboutsummaryrefslogtreecommitdiffstats
path: root/src/bookmarks/ephy-topic-action.c
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@gnome.org>2004-07-11 17:37:47 +0800
committerMarco Pesenti Gritti <marco@src.gnome.org>2004-07-11 17:37:47 +0800
commit391cc13ee086c2af18e9ad75ad0c626d7e6a26e6 (patch)
tree28f84aa9ab9838d272558169b27a4c6f9ed514d6 /src/bookmarks/ephy-topic-action.c
parentd951d0c0a056b245ed50292e4d48341283660fe3 (diff)
downloadgsoc2013-epiphany-391cc13ee086c2af18e9ad75ad0c626d7e6a26e6.tar
gsoc2013-epiphany-391cc13ee086c2af18e9ad75ad0c626d7e6a26e6.tar.gz
gsoc2013-epiphany-391cc13ee086c2af18e9ad75ad0c626d7e6a26e6.tar.bz2
gsoc2013-epiphany-391cc13ee086c2af18e9ad75ad0c626d7e6a26e6.tar.lz
gsoc2013-epiphany-391cc13ee086c2af18e9ad75ad0c626d7e6a26e6.tar.xz
gsoc2013-epiphany-391cc13ee086c2af18e9ad75ad0c626d7e6a26e6.tar.zst
gsoc2013-epiphany-391cc13ee086c2af18e9ad75ad0c626d7e6a26e6.zip
Hide the item when dragging it like we do for normal toolbars.
2004-07-11 Marco Pesenti Gritti <marco@gnome.org> * src/bookmarks/ephy-bookmark-action.c: (drag_begin_cb), (drag_end_cb), (connect_proxy): * src/bookmarks/ephy-topic-action.c: (drag_begin_cb), (drag_end_cb), (connect_proxy): Hide the item when dragging it like we do for normal toolbars.
Diffstat (limited to 'src/bookmarks/ephy-topic-action.c')
-rw-r--r--src/bookmarks/ephy-topic-action.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/bookmarks/ephy-topic-action.c b/src/bookmarks/ephy-topic-action.c
index ab3259219..d6231634c 100644
--- a/src/bookmarks/ephy-topic-action.c
+++ b/src/bookmarks/ephy-topic-action.c
@@ -538,6 +538,28 @@ build_menu (EphyTopicAction *action)
}
static void
+drag_begin_cb (GtkWidget *widget, GdkDragContext *context, EphyTopicAction *action)
+{
+ GtkWidget *tool_item;
+
+ tool_item = gtk_widget_get_ancestor (widget, GTK_TYPE_TOOL_ITEM);
+ g_return_if_fail (tool_item != NULL);
+
+ gtk_widget_hide (widget);
+}
+
+static void
+drag_end_cb (GtkWidget *widget, GdkDragContext *context, EphyTopicAction *action)
+{
+ GtkWidget *tool_item;
+
+ tool_item = gtk_widget_get_ancestor (widget, GTK_TYPE_TOOL_ITEM);
+ g_return_if_fail (tool_item != NULL);
+
+ gtk_widget_show (widget);
+}
+
+static void
drag_data_get_cb (GtkWidget *widget, GdkDragContext *context,
GtkSelectionData *selection_data, guint info,
guint32 time, EphyTopicAction *action)
@@ -781,6 +803,10 @@ connect_proxy (GtkAction *action, GtkWidget *proxy)
G_CALLBACK (drag_data_get_cb), action);
g_signal_connect (button, "drag_data_delete",
G_CALLBACK (drag_data_delete_cb), action);
+ g_signal_connect (button, "drag_begin",
+ G_CALLBACK (drag_begin_cb), action);
+ g_signal_connect (button, "drag_end",
+ G_CALLBACK (drag_end_cb), action);
}
}