aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-toolbars-model.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-06-12 00:14:59 +0800
committerChristian Persch <chpe@src.gnome.org>2004-06-12 00:14:59 +0800
commitd3938a1cec5e2520289e37ff1ce5e2f808c97f03 (patch)
tree9bbe3b9627571500cc8ad9184de7720054297c8d /src/ephy-toolbars-model.c
parentbf52ee9c4c4c1882ecd6bc72719c4361ad535d11 (diff)
downloadgsoc2013-epiphany-d3938a1cec5e2520289e37ff1ce5e2f808c97f03.tar.gz
gsoc2013-epiphany-d3938a1cec5e2520289e37ff1ce5e2f808c97f03.tar.zst
gsoc2013-epiphany-d3938a1cec5e2520289e37ff1ce5e2f808c97f03.zip
Save the toolbars models from dispose, not from finalize, since you cannot
2004-06-11 Christian Persch <chpe@cvs.gnome.org> * src/bookmarks/ephy-bookmarks.c: (ephy_bookmarks_finalize): * src/bookmarks/ephy-bookmarksbar-model.c: (ephy_bookmarksbar_model_dispose), (ephy_bookmarksbar_model_finalize), (ephy_bookmarksbar_model_class_init): * src/ephy-toolbars-model.c: (ephy_toolbars_model_dispose), (ephy_toolbars_model_finalize), (ephy_toolbars_model_class_init): Save the toolbars models from dispose, not from finalize, since you cannot emit signals from the latter (the get_item_* signals are emitted while saving).
Diffstat (limited to 'src/ephy-toolbars-model.c')
-rwxr-xr-xsrc/ephy-toolbars-model.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/ephy-toolbars-model.c b/src/ephy-toolbars-model.c
index b730b93e2..a1dfdda83 100755
--- a/src/ephy-toolbars-model.c
+++ b/src/ephy-toolbars-model.c
@@ -220,6 +220,16 @@ ephy_toolbars_model_init (EphyToolbarsModel *model)
}
static void
+ephy_toolbars_model_dispose (GObject *object)
+{
+ EphyToolbarsModel *model = EPHY_TOOLBARS_MODEL (object);
+
+ save_changes_idle (model);
+
+ G_OBJECT_CLASS (parent_class)->dispose (object);
+}
+
+static void
ephy_toolbars_model_finalize (GObject *object)
{
EphyToolbarsModel *model = EPHY_TOOLBARS_MODEL (object);
@@ -230,9 +240,6 @@ ephy_toolbars_model_finalize (GObject *object)
model->priv->timeout = 0;
}
- /* FIXME: we should detect when item data changes, and save then instead */
- save_changes_idle (model);
-
g_free (model->priv->xml_file);
G_OBJECT_CLASS (parent_class)->finalize (object);
@@ -245,6 +252,7 @@ ephy_toolbars_model_class_init (EphyToolbarsModelClass *klass)
parent_class = g_type_class_peek_parent (klass);
+ object_class->dispose = ephy_toolbars_model_dispose;
object_class->finalize = ephy_toolbars_model_finalize;
g_type_class_add_private (object_class, sizeof (EphyToolbarsModelPrivate));