aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-toolbars-model.c
diff options
context:
space:
mode:
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));