aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bookmarks/ephy-bookmarks-import.c4
-rw-r--r--src/bookmarks/ephy-bookmarks.c6
-rw-r--r--src/bookmarks/ephy-bookmarks.h2
-rw-r--r--src/bookmarks/ephy-new-bookmark.c2
4 files changed, 12 insertions, 2 deletions
diff --git a/src/bookmarks/ephy-bookmarks-import.c b/src/bookmarks/ephy-bookmarks-import.c
index ebcc1a0e2..e767ad879 100644
--- a/src/bookmarks/ephy-bookmarks-import.c
+++ b/src/bookmarks/ephy-bookmarks-import.c
@@ -239,6 +239,8 @@ ephy_bookmarks_import_mozilla (EphyBookmarks *bookmarks,
g_free (keyword);
xmlFreeDoc (doc);
+ ephy_bookmarks_save (bookmarks);
+
return TRUE;
}
@@ -261,5 +263,7 @@ ephy_bookmarks_import_xbel (EphyBookmarks *bookmarks,
xmlFreeDoc (doc);
+ ephy_bookmarks_save (bookmarks);
+
return TRUE;
}
diff --git a/src/bookmarks/ephy-bookmarks.c b/src/bookmarks/ephy-bookmarks.c
index 91c3e9c24..f8eb28469 100644
--- a/src/bookmarks/ephy-bookmarks.c
+++ b/src/bookmarks/ephy-bookmarks.c
@@ -247,6 +247,8 @@ ephy_bookmarks_init_defaults (EphyBookmarks *eb)
id = ephy_bookmarks_get_bookmark_id (eb, default_bookmarks[i].location);
ephy_toolbars_model_add_bookmark (model, FALSE, id);
}
+
+ ephy_bookmarks_save (eb);
}
static gboolean
@@ -280,7 +282,7 @@ ephy_bookmarks_load (EphyBookmarks *eb)
return TRUE;
}
-static void
+void
ephy_bookmarks_save (EphyBookmarks *eb)
{
xmlDocPtr doc;
@@ -326,6 +328,7 @@ ephy_bookmarks_save (EphyBookmarks *eb)
ephy_node_thaw (eb->priv->bookmarks);
xmlSaveFormatFile (eb->priv->xml_file, doc, 1);
+ xmlFreeDoc(doc);
}
static double
@@ -721,7 +724,6 @@ ephy_bookmarks_add (EphyBookmarks *eb,
ephy_node_add_child (eb->priv->notcategorized, bm);
ephy_bookmarks_emit_data_changed (eb);
- ephy_bookmarks_save (eb);
return bm;
}
diff --git a/src/bookmarks/ephy-bookmarks.h b/src/bookmarks/ephy-bookmarks.h
index 0ab70af8e..162937c61 100644
--- a/src/bookmarks/ephy-bookmarks.h
+++ b/src/bookmarks/ephy-bookmarks.h
@@ -69,6 +69,8 @@ EphyBookmarks *ephy_bookmarks_new (void);
/* Bookmarks */
+void ephy_bookmarks_save (EphyBookmarks *eb);
+
EphyNode *ephy_bookmarks_add (EphyBookmarks *eb,
const char *title,
const char *url,
diff --git a/src/bookmarks/ephy-new-bookmark.c b/src/bookmarks/ephy-new-bookmark.c
index 6394a308f..ec913b112 100644
--- a/src/bookmarks/ephy-new-bookmark.c
+++ b/src/bookmarks/ephy-new-bookmark.c
@@ -174,6 +174,8 @@ ephy_new_bookmark_add (EphyNewBookmark *new_bookmark)
new_bookmark->priv->location,
new_bookmark->priv->icon);
}
+
+ ephy_bookmarks_save (new_bookmark->priv->bookmarks);
}
static void