aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-toolbars-model.c
diff options
context:
space:
mode:
authorChris Lahey <clahey@src.gnome.org>2004-01-10 04:49:11 +0800
committerChris Lahey <clahey@src.gnome.org>2004-01-10 04:49:11 +0800
commit1743162eef31aab9bb28a2c8201240e7dc4bd1cd (patch)
tree46addc66c3d524ccd4adddac135385b44c390852 /src/ephy-toolbars-model.c
parentfd4119bf05f970c82fda53fe0deff9dc440d8f5b (diff)
downloadgsoc2013-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 'src/ephy-toolbars-model.c')
-rwxr-xr-xsrc/ephy-toolbars-model.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/ephy-toolbars-model.c b/src/ephy-toolbars-model.c
index 8e0c578b4..132172f91 100755
--- a/src/ephy-toolbars-model.c
+++ b/src/ephy-toolbars-model.c
@@ -202,20 +202,22 @@ impl_get_item_id (EggToolbarsModel *t,
}
node = ephy_bookmarks_add (bookmarks, title, netscape_url[URL]);
- g_return_val_if_fail (node != NULL, NULL);
- gh = EPHY_HISTORY (ephy_embed_shell_get_global_history (embed_shell));
- icon = ephy_history_get_icon (gh, netscape_url[URL]);
-
- if (icon)
+ if (node != NULL)
{
- ephy_bookmarks_set_icon (bookmarks, netscape_url[URL], icon);
+ gh = EPHY_HISTORY (ephy_embed_shell_get_global_history (embed_shell));
+ icon = ephy_history_get_icon (gh, netscape_url[URL]);
+
+ if (icon)
+ {
+ ephy_bookmarks_set_icon (bookmarks, netscape_url[URL], icon);
+ }
}
}
g_strfreev (netscape_url);
- g_return_val_if_fail (node != NULL, NULL);
+ if (node == NULL) return NULL;
return ephy_toolbars_model_get_action_name
(model, ephy_node_get_id (node));