aboutsummaryrefslogtreecommitdiffstats
path: root/src/bookmarks
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-07-18 21:10:24 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-07-18 21:10:24 +0800
commit482cd2bcb05ed4245da0fecfb3a9ab8e67f99616 (patch)
tree96ea6fb707a5690223cca514ebcecfc91da84f5b /src/bookmarks
parent62047066d4d6ff0acf5dcc22c0d473e6df902c57 (diff)
downloadgsoc2013-epiphany-482cd2bcb05ed4245da0fecfb3a9ab8e67f99616.tar
gsoc2013-epiphany-482cd2bcb05ed4245da0fecfb3a9ab8e67f99616.tar.gz
gsoc2013-epiphany-482cd2bcb05ed4245da0fecfb3a9ab8e67f99616.tar.bz2
gsoc2013-epiphany-482cd2bcb05ed4245da0fecfb3a9ab8e67f99616.tar.lz
gsoc2013-epiphany-482cd2bcb05ed4245da0fecfb3a9ab8e67f99616.tar.xz
gsoc2013-epiphany-482cd2bcb05ed4245da0fecfb3a9ab8e67f99616.tar.zst
gsoc2013-epiphany-482cd2bcb05ed4245da0fecfb3a9ab8e67f99616.zip
Christian Persch <chpe@cvs.gnome.org>
2003-07-18 Marco Pesenti Gritti <marco@it.gnome.org> Christian Persch <chpe@cvs.gnome.org> * src/bookmarks/ephy-bookmarks.c: (ephy_bookmarks_init), (ephy_bookmarks_find_bookmark): * src/ephy-toolbars-model.c: (ephy_toolbars_model_get_action_name), (topic_destroy_cb), (bookmark_destroy_cb), (setup_item), (impl_add_item), (ephy_toolbars_model_set_bookmarks), (ephy_toolbars_model_init), (get_toolbar_pos), (get_toolbar_and_item_pos), (ephy_toolbars_model_remove_bookmark), (ephy_toolbars_model_add_bookmark), (ephy_toolbars_model_has_bookmark): * src/ephy-toolbars-model.h: * src/toolbar.c: (topic_destroy_cb), (bookmark_destroy_cb): Remove bookmarks also if they are not on the bookmarks toolbar. Deal with bookmarks/model sync inside the model not in the toolbar. If there are invalid bookmarks in the toolbar configuration when loading it, emit a warning and drop them.
Diffstat (limited to 'src/bookmarks')
-rw-r--r--src/bookmarks/ephy-bookmarks.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/bookmarks/ephy-bookmarks.c b/src/bookmarks/ephy-bookmarks.c
index 82b937543..187efc9be 100644
--- a/src/bookmarks/ephy-bookmarks.c
+++ b/src/bookmarks/ephy-bookmarks.c
@@ -668,6 +668,8 @@ ephy_bookmarks_init (EphyBookmarks *eb)
GValue value = { 0, };
EphyNodeDb *db;
+ LOG ("Init");
+
eb->priv = g_new0 (EphyBookmarksPrivate, 1);
eb->priv->toolbars_model = NULL;
@@ -884,13 +886,15 @@ ephy_bookmarks_set_address (EphyBookmarks *eb,
update_has_smart_address (bookmark, address);
}
-EphyNode*
+EphyNode *
ephy_bookmarks_find_bookmark (EphyBookmarks *eb,
const char *url)
{
GPtrArray *children;
int i;
+ g_return_val_if_fail (IS_EPHY_BOOKMARKS (eb), NULL);
+ g_return_val_if_fail (eb->priv->bookmarks != NULL, NULL);
g_return_val_if_fail (url != NULL, NULL);
children = ephy_node_get_children (eb->priv->bookmarks);
@@ -902,6 +906,7 @@ ephy_bookmarks_find_bookmark (EphyBookmarks *eb,
kid = g_ptr_array_index (children, i);
location = ephy_node_get_property_string
(kid, EPHY_NODE_BMK_PROP_LOCATION);
+
if (location != NULL && strcmp (url, location) == 0)
{
ephy_node_thaw (eb->priv->bookmarks);