From 1ffbaefc6b9d99f76fb666215709b6ab4e83d547 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Sun, 11 May 2003 12:24:35 +0000 Subject: Update 2003-05-11 Marco Pesenti Gritti * lib/egg/egg-action.c: * lib/egg/eggseparatortoolitem.c: * lib/egg/eggtoggletoolbutton.c: * lib/egg/eggtoolbar.c: * lib/egg/eggtoolbutton.c: * lib/egg/eggtoolitem.c: * lib/egg/eggtoolitem.h: Update * src/bookmarks/Makefile.am: * src/bookmarks/ephy-bookmarks.c: * src/bookmarks/ephy-bookmarks-export.c: * src/bookmarks/ephy-bookmarks-export.h: Export bookmarks in an rdf format (RSS was perfect, so I just used it instead of inventing a new one). This is useful to ensure compatibility in case of database formats changes. It will be used also as import format for ephy. Also I think it can be easily displayed, need to talk with Edd about the css url though. Thanks to Edd Dumbill for the help with this. --- src/bookmarks/Makefile.am | 2 ++ src/bookmarks/ephy-bookmarks.c | 11 ++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/bookmarks/Makefile.am b/src/bookmarks/Makefile.am index 04ecbe356..6df51dd14 100644 --- a/src/bookmarks/Makefile.am +++ b/src/bookmarks/Makefile.am @@ -24,6 +24,8 @@ libephybookmarks_la_SOURCES = \ ephy-bookmark-action.h \ ephy-bookmarks-editor.c \ ephy-bookmarks-editor.h \ + ephy-bookmarks-export.c \ + ephy-bookmarks-export.h \ ephy-bookmarks-import.c \ ephy-bookmarks-import.h \ ephy-bookmark-properties.c \ diff --git a/src/bookmarks/ephy-bookmarks.c b/src/bookmarks/ephy-bookmarks.c index 084d8a343..b67e5cd11 100644 --- a/src/bookmarks/ephy-bookmarks.c +++ b/src/bookmarks/ephy-bookmarks.c @@ -24,6 +24,7 @@ #include "ephy-tree-model-node.h" #include "ephy-node-common.h" #include "ephy-toolbars-model.h" +#include "ephy-bookmarks-export.h" #include #include @@ -243,7 +244,7 @@ ephy_bookmarks_init_defaults (EphyBookmarks *eb) ephy_bookmarks_add (eb, default_bookmarks[i].title, default_bookmarks[i].location, default_bookmarks[i].smart_url); - + id = ephy_bookmarks_get_bookmark_id (eb, default_bookmarks[i].location); ephy_toolbars_model_add_bookmark (model, FALSE, id); } @@ -289,6 +290,7 @@ ephy_bookmarks_save (EphyBookmarks *eb) xmlNodePtr root; GPtrArray *children; int i; + char *rdf_file; LOG ("Saving bookmarks") @@ -329,6 +331,13 @@ ephy_bookmarks_save (EphyBookmarks *eb) xmlSaveFormatFile (eb->priv->xml_file, doc, 1); xmlFreeDoc(doc); + + /* Export bookmarks in rdf */ + rdf_file = g_build_filename (ephy_dot_dir (), + "bookmarks.rdf", + NULL); + ephy_bookmarks_export_rdf (eb, rdf_file); + g_free (rdf_file); } static double -- cgit v1.2.3