From f8d9f3f5d4d9f104118e87dddc3af8d43acb4f92 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Sat, 28 Aug 2004 10:21:06 +0000 Subject: Remove the save timeout on dispose. 2004-08-28 Christian Persch * src/bookmarks/ephy-bookmarksbar-model.c: (ephy_bookmarksbar_model_init), (ephy_bookmarksbar_model_dispose), (ephy_bookmarksbar_model_finalize): Remove the save timeout on dispose. --- ChangeLog | 8 ++++++++ src/bookmarks/ephy-bookmarksbar-model.c | 18 ++++++++++++------ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index e00a15c0c..3c5226f5e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2004-08-28 Christian Persch + + * src/bookmarks/ephy-bookmarksbar-model.c: + (ephy_bookmarksbar_model_init), (ephy_bookmarksbar_model_dispose), + (ephy_bookmarksbar_model_finalize): + + Remove the save timeout on dispose. + 2004-08-28 Christian Persch * src/ephy-window.c: (ephy_window_init): diff --git a/src/bookmarks/ephy-bookmarksbar-model.c b/src/bookmarks/ephy-bookmarksbar-model.c index 5cb28a7f2..0bbcad7c5 100755 --- a/src/bookmarks/ephy-bookmarksbar-model.c +++ b/src/bookmarks/ephy-bookmarksbar-model.c @@ -475,6 +475,8 @@ ephy_bookmarksbar_model_init (EphyBookmarksBarModel *model) { model->priv = EPHY_BOOKMARKSBAR_MODEL_GET_PRIVATE (model); + LOG ("EphyBookmarksBarModel initialising") + model->priv->xml_file = g_build_filename (ephy_dot_dir (), EPHY_BOOKMARKSBARS_XML_FILE, NULL); @@ -494,6 +496,14 @@ ephy_bookmarksbar_model_dispose (GObject *object) { EphyBookmarksBarModel *model = EPHY_BOOKMARKSBAR_MODEL (object); + LOG ("EphyBookmarksBarModel disposing") + + if (model->priv->timeout != 0) + { + g_source_remove (model->priv->timeout); + model->priv->timeout = 0; + } + save_changes_idle (model); G_OBJECT_CLASS (parent_class)->dispose (object); @@ -504,14 +514,10 @@ ephy_bookmarksbar_model_finalize (GObject *object) { EphyBookmarksBarModel *model = EPHY_BOOKMARKSBAR_MODEL (object); - if (model->priv->timeout != 0) - { - g_source_remove (model->priv->timeout); - model->priv->timeout = 0; - } - g_free (model->priv->xml_file); + LOG ("EphyBookmarksBarModel finalised") + G_OBJECT_CLASS (parent_class)->finalize (object); } -- cgit v1.2.3