aboutsummaryrefslogtreecommitdiffstats
path: root/embed
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 /embed
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 'embed')
-rw-r--r--embed/ephy-favicon-cache.c3
-rw-r--r--embed/ephy-history.c11
2 files changed, 11 insertions, 3 deletions
diff --git a/embed/ephy-favicon-cache.c b/embed/ephy-favicon-cache.c
index 6d7269a48..0e283e229 100644
--- a/embed/ephy-favicon-cache.c
+++ b/embed/ephy-favicon-cache.c
@@ -291,7 +291,8 @@ ephy_favicon_cache_finalize (GObject *object)
EPHY_FAVICON_CACHE_XML_ROOT,
EPHY_FAVICON_CACHE_XML_VERSION,
NULL,
- cache->priv->icons, 0, NULL);
+ cache->priv->icons, NULL, NULL,
+ NULL);
g_free (cache->priv->xml_file);
g_free (cache->priv->directory);
diff --git a/embed/ephy-history.c b/embed/ephy-history.c
index 31873b51f..e6c8f08c9 100644
--- a/embed/ephy-history.c
+++ b/embed/ephy-history.c
@@ -256,6 +256,13 @@ remove_obsolete_pages (EphyHistory *eb)
}
}
+static gboolean
+save_filter (EphyNode *node,
+ EphyNode *page_node)
+{
+ return node != page_node;
+}
+
static void
ephy_history_save (EphyHistory *eb)
{
@@ -275,8 +282,8 @@ ephy_history_save (EphyHistory *eb)
EPHY_HISTORY_XML_VERSION,
NULL, /* comment */
eb->priv->hosts,
- 1, eb->priv->pages,
- eb->priv->pages, 0,
+ (EphyNodeFilterFunc) save_filter, eb->priv->pages,
+ eb->priv->pages, NULL, NULL,
NULL);
if (ret >=0)