From decb30ea6768b634476d351f3d5f5e73e4308326 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Sat, 12 Jun 2004 18:38:47 +0000 Subject: Allow items to be dragged from toolbar editor also when in items only 2004-06-12 Marco Pesenti Gritti * lib/egg/egg-editable-toolbar.c: (toolbar_drag_motion_cb): Allow items to be dragged from toolbar editor also when in items only mode. * lib/egg/egg-toolbars-model.c: (egg_toolbars_model_add_separator): The type should be the same as tool items. --- ChangeLog | 11 +++++++++++ lib/egg/egg-editable-toolbar.c | 4 +++- lib/egg/egg-toolbars-model.c | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index d1497780f..13be5da65 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2004-06-12 Marco Pesenti Gritti + + * lib/egg/egg-editable-toolbar.c: (toolbar_drag_motion_cb): + + Allow items to be dragged from toolbar editor also when + in items only mode. + + * lib/egg/egg-toolbars-model.c: (egg_toolbars_model_add_separator): + + The type should be the same as tool items. + 2004-06-12 Adam Hooper * src/ephy-tab.c: (ephy_tab_class_init): diff --git a/lib/egg/egg-editable-toolbar.c b/lib/egg/egg-editable-toolbar.c index 649935b1b..0b4ed7a45 100755 --- a/lib/egg/egg-editable-toolbar.c +++ b/lib/egg/egg-editable-toolbar.c @@ -24,6 +24,7 @@ #include "egg-editable-toolbar.h" #include "egg-toolbars-model.h" +#include "egg-toolbar-editor.h" #include #include @@ -613,7 +614,8 @@ toolbar_drag_motion_cb (GtkWidget *widget, flags = egg_toolbars_model_get_flags (etoolbar->priv->model, pos); if ((flags & EGG_TB_MODEL_ACCEPT_ITEMS_ONLY) && - !GTK_IS_TOOL_ITEM (source)) + !gtk_widget_get_ancestor (source, EGG_TYPE_EDITABLE_TOOLBAR) && + !gtk_widget_get_ancestor (source, EGG_TYPE_TOOLBAR_EDITOR)) { gdk_drag_status (context, 0, time); return FALSE; diff --git a/lib/egg/egg-toolbars-model.c b/lib/egg/egg-toolbars-model.c index c4ed3217e..b6f1b8717 100755 --- a/lib/egg/egg-toolbars-model.c +++ b/lib/egg/egg-toolbars-model.c @@ -309,7 +309,7 @@ egg_toolbars_model_add_separator (EggToolbarsModel *t, g_return_if_fail (EGG_IS_TOOLBARS_MODEL (t)); parent_node = g_node_nth_child (t->priv->toolbars, toolbar_position); - item = toolbars_item_new ("separator", "separator", TRUE); + item = toolbars_item_new ("separator", EGG_TOOLBAR_ITEM_TYPE, TRUE); node = g_node_new (item); g_node_insert (parent_node, position, node); -- cgit v1.2.3