From 40b6ff9e29d8e36d3bb811bc5e1bd19af6dd36a6 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Sun, 6 Jul 2003 11:10:31 +0000 Subject: Make sure we ever save bookmarks after changes, so they dont get lost on 2003-07-06 Marco Pesenti Gritti * src/bookmarks/ephy-bookmarks-import.c: (ephy_bookmarks_import_mozilla), (ephy_bookmarks_import_xbel): * src/bookmarks/ephy-bookmarks.c: (ephy_bookmarks_init_defaults), (save_bookmarks_delayed), (ephy_bookmarks_set_dirty), (bookmarks_changed_cb), (bookmarks_removed_cb), (ephy_bookmarks_init), (ephy_bookmarks_finalize), (ephy_bookmarks_add): * src/bookmarks/ephy-bookmarks.h: * src/bookmarks/ephy-new-bookmark.c: (ephy_new_bookmark_add): * src/ephy-shell.c: (ephy_shell_finalize), (ephy_shell_get_toolbars_model): * src/ephy-toolbars-model.c: (item_added), (item_removed), (toolbar_added), (toolbar_removed), (ephy_toolbars_model_init), (ephy_toolbars_model_finalize): Make sure we ever save bookmarks after changes, so they dont get lost on crashes. --- src/ephy-shell.c | 32 -------------------------------- 1 file changed, 32 deletions(-) (limited to 'src') diff --git a/src/ephy-shell.c b/src/ephy-shell.c index 0d9fac6f3..ab53ae065 100644 --- a/src/ephy-shell.c +++ b/src/ephy-shell.c @@ -197,18 +197,6 @@ ephy_shell_init (EphyShell *gs) } } -static void -save_toolbars (EggToolbarsModel *model) -{ - char *xml_file; - - xml_file = g_build_filename (ephy_dot_dir (), - "ephy-toolbar.xml", - NULL); - egg_toolbars_model_save (model, xml_file); - g_free (xml_file); -} - static void ephy_shell_finalize (GObject *object) { @@ -226,7 +214,6 @@ ephy_shell_finalize (GObject *object) LOG ("Unref toolbars model") if (gs->priv->toolbars_model) { - save_toolbars (EGG_TOOLBARS_MODEL (gs->priv->toolbars_model)); g_object_unref (G_OBJECT (gs->priv->toolbars_model)); } @@ -534,30 +521,11 @@ ephy_shell_get_toolbars_model (EphyShell *gs) { if (gs->priv->toolbars_model == NULL) { - char *xml_file; - EggToolbarsModel *model; EphyBookmarks *bookmarks; bookmarks = ephy_shell_get_bookmarks (gs); gs->priv->toolbars_model = ephy_toolbars_model_new (bookmarks); - model = EGG_TOOLBARS_MODEL (gs->priv->toolbars_model); - - xml_file = g_build_filename (ephy_dot_dir (), - "ephy-toolbar.xml", - NULL); - if (g_file_test (xml_file, G_FILE_TEST_EXISTS)) - { - egg_toolbars_model_load (model, xml_file); - } - else - { - const char *default_xml; - - default_xml = ephy_file ("epiphany-toolbar.xml"); - egg_toolbars_model_load (model, default_xml); - } - g_free (xml_file); g_object_set (bookmarks, "toolbars_model", gs->priv->toolbars_model, NULL); -- cgit v1.2.3