diff options
author | Chris Lahey <clahey@src.gnome.org> | 2004-01-10 04:49:11 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2004-01-10 04:49:11 +0800 |
commit | 1743162eef31aab9bb28a2c8201240e7dc4bd1cd (patch) | |
tree | 46addc66c3d524ccd4adddac135385b44c390852 /lib/egg | |
parent | fd4119bf05f970c82fda53fe0deff9dc440d8f5b (diff) | |
download | gsoc2013-epiphany-1743162eef31aab9bb28a2c8201240e7dc4bd1cd.tar gsoc2013-epiphany-1743162eef31aab9bb28a2c8201240e7dc4bd1cd.tar.gz gsoc2013-epiphany-1743162eef31aab9bb28a2c8201240e7dc4bd1cd.tar.bz2 gsoc2013-epiphany-1743162eef31aab9bb28a2c8201240e7dc4bd1cd.tar.lz gsoc2013-epiphany-1743162eef31aab9bb28a2c8201240e7dc4bd1cd.tar.xz gsoc2013-epiphany-1743162eef31aab9bb28a2c8201240e7dc4bd1cd.tar.zst gsoc2013-epiphany-1743162eef31aab9bb28a2c8201240e7dc4bd1cd.zip |
Added disable_bookmark_editing key.
* data/epiphany-lockdown.schemas.in, lib/ephy-prefs.h: Added
disable_bookmark_editing key.
* lib/ephy-node-db.c, ephy-node-db.h, ephy-node.c: Added immutable
property.
* lib/egg/egg-editable-toolbar.c (drag_data_received_cb,
toolbar_drag_motion_cb), src/ephy-toolbars-model.c
(impl_get_item_id): Made these handle immutable models/node_dbs.
* src/ephy-automation.c, src/ephy-session.c: Don't show the
bookmark editor if disabled.
* src/ephy-window.c: Disable a bunch of menus if bookmark editing
is disabled.
* src/bookmarks/ephy-bookmarks-import.c,
src/bookmarks/ephy-bookmarks.c: Disable bookmark editing and
importing is key is set. Uses immutable property.
Diffstat (limited to 'lib/egg')
-rwxr-xr-x | lib/egg/egg-editable-toolbar.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/lib/egg/egg-editable-toolbar.c b/lib/egg/egg-editable-toolbar.c index 746affc42..7d1fe1f8a 100755 --- a/lib/egg/egg-editable-toolbar.c +++ b/lib/egg/egg-editable-toolbar.c @@ -419,8 +419,7 @@ drag_data_received_cb (GtkWidget *widget, target = gtk_drag_dest_find_target (widget, context, NULL); type = egg_toolbars_model_get_item_type (etoolbar->priv->model, target); - id = egg_toolbars_model_get_item_id (etoolbar->priv->model, type, - selection_data->data); + id = egg_toolbars_model_get_item_id (etoolbar->priv->model, type, selection_data->data); /* This function can be called for two reasons * @@ -433,6 +432,13 @@ drag_data_received_cb (GtkWidget *widget, * actually add a new item to the toolbar. */ + if (id == NULL) + { + etoolbar->priv->pending = FALSE; + g_free (type); + return; + } + if (etoolbar->priv->pending) { etoolbar->priv->pending = FALSE; @@ -453,11 +459,6 @@ drag_data_received_cb (GtkWidget *widget, } else { - type = egg_toolbars_model_get_item_type (etoolbar->priv->model, - target); - id = egg_toolbars_model_get_item_id (etoolbar->priv->model, type, - selection_data->data); - egg_toolbars_model_add_item (etoolbar->priv->model, toolbar_pos, pos, id, type); } @@ -591,9 +592,12 @@ toolbar_drag_motion_cb (GtkWidget *widget, /* The handler will make sure the item is created */ gtk_drag_get_data (widget, context, target, time); - g_assert (etoolbar->priv->dragged_item); g_assert (!etoolbar->priv->pending); + if (etoolbar->priv->dragged_item == NULL) { + return TRUE; + } + g_object_ref (etoolbar->priv->dragged_item); gtk_object_sink (GTK_OBJECT (etoolbar->priv->dragged_item)); } |