aboutsummaryrefslogtreecommitdiffstats
path: root/src/bookmarks
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-04-08 21:26:25 +0800
committerChristian Persch <chpe@src.gnome.org>2005-04-08 21:26:25 +0800
commit30cfaa4a4929d85f303b3afc9c8ec240d548ff87 (patch)
tree833970d4a40cf2aabd3fb62b87ca16e640c0523f /src/bookmarks
parent3ddeef804136e9f47f66c38c80d126a4285d525d (diff)
downloadgsoc2013-epiphany-30cfaa4a4929d85f303b3afc9c8ec240d548ff87.tar
gsoc2013-epiphany-30cfaa4a4929d85f303b3afc9c8ec240d548ff87.tar.gz
gsoc2013-epiphany-30cfaa4a4929d85f303b3afc9c8ec240d548ff87.tar.bz2
gsoc2013-epiphany-30cfaa4a4929d85f303b3afc9c8ec240d548ff87.tar.lz
gsoc2013-epiphany-30cfaa4a4929d85f303b3afc9c8ec240d548ff87.tar.xz
gsoc2013-epiphany-30cfaa4a4929d85f303b3afc9c8ec240d548ff87.tar.zst
gsoc2013-epiphany-30cfaa4a4929d85f303b3afc9c8ec240d548ff87.zip
Implement a more flexible approach at saving a EphyNodeDb, by allowing to
2005-04-08 Christian Persch <chpe@cvs.gnome.org> * embed/ephy-favicon-cache.c: (ephy_favicon_cache_finalize): * embed/ephy-history.c: (save_filter), (ephy_history_save): * lib/ephy-node-db.c: (ephy_node_db_write_to_xml_valist): * lib/ephy-node.h: * lib/ephy-state.c: (ephy_states_save): * src/bookmarks/ephy-bookmarks.c: (save_filter), (ephy_bookmarks_save): Implement a more flexible approach at saving a EphyNodeDb, by allowing to specify a filter func to exclude certain nodes, instead of a fixed list.
Diffstat (limited to 'src/bookmarks')
-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 0043d845a..9129181e2 100644
--- a/src/bookmarks/ephy-bookmarks.c
+++ b/src/bookmarks/ephy-bookmarks.c
@@ -309,6 +309,17 @@ ephy_bookmarks_class_init (EphyBookmarksClass *klass)
g_type_class_add_private (object_class, sizeof(EphyBookmarksPrivate));
}
+static gboolean
+save_filter (EphyNode *node,
+ EphyBookmarks *bookmarks)
+{
+ EphyBookmarksPrivate *priv = bookmarks->priv;
+
+ return node != priv->bookmarks &&
+ node != priv->favorites &&
+ node != priv->notcategorized;
+}
+
static void
ephy_bookmarks_save (EphyBookmarks *eb)
{
@@ -321,10 +332,8 @@ ephy_bookmarks_save (EphyBookmarks *eb)
(xmlChar *) EPHY_BOOKMARKS_XML_ROOT,
(xmlChar *) EPHY_BOOKMARKS_XML_VERSION,
(xmlChar *) "Do not rely on this file, it's only for internal use. Use bookmarks.rdf instead.",
- eb->priv->keywords,
- 3, eb->priv->bookmarks, eb->priv->favorites, eb->priv->notcategorized,
- eb->priv->bookmarks,
- 0,
+ eb->priv->keywords, (EphyNodeFilterFunc) save_filter, eb,
+ eb->priv->bookmarks, NULL, NULL,
NULL);
/* Export bookmarks in rdf */