aboutsummaryrefslogtreecommitdiffstats
path: root/src/bookmarks/ephy-bookmarks.c
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-01-01 21:55:35 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-01-01 21:55:35 +0800
commit66677ed1062c18fd63cb13ea9480343a01058c96 (patch)
treeffce8e92e2b264f2a819bac2606c8822976fb6c3 /src/bookmarks/ephy-bookmarks.c
parenta4f9aed333d06c864f4ed719fa41eda82eff4713 (diff)
downloadgsoc2013-epiphany-66677ed1062c18fd63cb13ea9480343a01058c96.tar
gsoc2013-epiphany-66677ed1062c18fd63cb13ea9480343a01058c96.tar.gz
gsoc2013-epiphany-66677ed1062c18fd63cb13ea9480343a01058c96.tar.bz2
gsoc2013-epiphany-66677ed1062c18fd63cb13ea9480343a01058c96.tar.lz
gsoc2013-epiphany-66677ed1062c18fd63cb13ea9480343a01058c96.tar.xz
gsoc2013-epiphany-66677ed1062c18fd63cb13ea9480343a01058c96.tar.zst
gsoc2013-epiphany-66677ed1062c18fd63cb13ea9480343a01058c96.zip
Rewrite ephy node multiple removals to actually work.
2003-01-01 Marco Pesenti Gritti <marco@it.gnome.org> * embed/ephy-history.c: (ephy_history_clear), (ephy_history_remove): * src/bookmarks/ephy-bookmarks.c: (ephy_bookmarks_clean_empty_keywords): * src/ephy-history-model.c: (get_one_level_path_real), (get_path_real), (root_child_removed_cb): Rewrite ephy node multiple removals to actually work.
Diffstat (limited to 'src/bookmarks/ephy-bookmarks.c')
-rw-r--r--src/bookmarks/ephy-bookmarks.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/bookmarks/ephy-bookmarks.c b/src/bookmarks/ephy-bookmarks.c
index 2432846e3..a4f5412a4 100644
--- a/src/bookmarks/ephy-bookmarks.c
+++ b/src/bookmarks/ephy-bookmarks.c
@@ -174,6 +174,7 @@ ephy_bookmarks_clean_empty_keywords (EphyBookmarks *eb)
{
GPtrArray *children;
int i;
+ GList *l = NULL, *tmp;
children = ephy_node_get_children (eb->priv->keywords);
ephy_node_thaw (eb->priv->keywords);
@@ -185,13 +186,21 @@ ephy_bookmarks_clean_empty_keywords (EphyBookmarks *eb)
if (ephy_node_get_n_children (kid) == 0)
{
- DEBUG_MSG (("Remove empty keyword: %s\n",
- ephy_node_get_property_string (kid,
- EPHY_NODE_KEYWORD_PROP_NAME)));
- ephy_node_unref (kid);
+ l = g_list_append (l, kid);
}
}
+ if (l == NULL) return FALSE;
+
+ for (tmp = l; tmp != NULL; tmp = tmp->next)
+ {
+ DEBUG_MSG (("Remove empty keyword: %s\n",
+ ephy_node_get_property_string (kid,
+ EPHY_NODE_KEYWORD_PROP_NAME)));
+ g_object_unref (EPHY_NODE (tmp->data));
+ }
+ g_list_free (l);
+
return FALSE;
}