diff options
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | src/bookmarks/ephy-bookmark-action.c | 26 | ||||
-rw-r--r-- | src/bookmarks/ephy-topic-action.c | 26 |
3 files changed, 62 insertions, 0 deletions
@@ -1,5 +1,15 @@ 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. + +2004-07-11 Marco Pesenti Gritti <marco@gnome.org> + * src/bookmarks/ephy-topic-action.c: (create_tool_item), (menu_deactivate_cb), (remove_from_model), (remove_activate_cb), (drag_data_get_cb), (drag_data_delete_cb), (stop_drag_check), diff --git a/src/bookmarks/ephy-bookmark-action.c b/src/bookmarks/ephy-bookmark-action.c index 851770c9f..35b066a2d 100644 --- a/src/bookmarks/ephy-bookmark-action.c +++ b/src/bookmarks/ephy-bookmark-action.c @@ -383,6 +383,28 @@ stop_drag_check (EphyBookmarkAction *action, GtkWidget *widget) } static void +drag_begin_cb (GtkWidget *widget, GdkDragContext *context, EphyBookmarkAction *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, EphyBookmarkAction *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, EphyBookmarkAction *action) @@ -573,6 +595,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); entry = GTK_WIDGET (g_object_get_data (G_OBJECT (proxy), "entry")); g_signal_connect (entry, "activate", G_CALLBACK (activate_cb), action); 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); } } |