aboutsummaryrefslogtreecommitdiffstats
path: root/lib/egg/egg-editable-toolbar.c
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@gnome.org>2004-07-01 17:51:21 +0800
committerMarco Pesenti Gritti <marco@src.gnome.org>2004-07-01 17:51:21 +0800
commit49390b4e0047fbb33312988906b95e673ce146db (patch)
tree3e671095990fcf38492e256c93baf9627f7884cd /lib/egg/egg-editable-toolbar.c
parentdc18cc6b2040bfdf629a671bc8718030cb37260e (diff)
downloadgsoc2013-epiphany-49390b4e0047fbb33312988906b95e673ce146db.tar
gsoc2013-epiphany-49390b4e0047fbb33312988906b95e673ce146db.tar.gz
gsoc2013-epiphany-49390b4e0047fbb33312988906b95e673ce146db.tar.bz2
gsoc2013-epiphany-49390b4e0047fbb33312988906b95e673ce146db.tar.lz
gsoc2013-epiphany-49390b4e0047fbb33312988906b95e673ce146db.tar.xz
gsoc2013-epiphany-49390b4e0047fbb33312988906b95e673ce146db.tar.zst
gsoc2013-epiphany-49390b4e0047fbb33312988906b95e673ce146db.zip
Do not allow dragging out of edit mode on ITEMS_ONLY toolbars.
2004-07-01 Marco Pesenti Gritti <marco@gnome.org> * lib/egg/egg-editable-toolbar.c: (toolbar_drag_motion_cb): Do not allow dragging out of edit mode on ITEMS_ONLY toolbars.
Diffstat (limited to 'lib/egg/egg-editable-toolbar.c')
-rwxr-xr-xlib/egg/egg-editable-toolbar.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/egg/egg-editable-toolbar.c b/lib/egg/egg-editable-toolbar.c
index 1006a1e02..3ad616b1c 100755
--- a/lib/egg/egg-editable-toolbar.c
+++ b/lib/egg/egg-editable-toolbar.c
@@ -615,9 +615,10 @@ toolbar_drag_motion_cb (GtkWidget *widget,
pos = get_toolbar_position (etoolbar, widget);
flags = egg_toolbars_model_get_flags (etoolbar->priv->model, pos);
- if ((flags & EGG_TB_MODEL_ACCEPT_ITEMS_ONLY) &&
- !gtk_widget_get_ancestor (source, EGG_TYPE_EDITABLE_TOOLBAR) &&
- !gtk_widget_get_ancestor (source, EGG_TYPE_TOOLBAR_EDITOR))
+ if (!etoolbar->priv->edit_mode ||
+ ((flags & EGG_TB_MODEL_ACCEPT_ITEMS_ONLY) &&
+ !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;