aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2009-08-07 01:19:49 +0800
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-08-22 21:21:07 +0800
commitf9cbc778a336d3a891d67914d289841222fb679b (patch)
tree55c800bea3cb1c624eae73c2ec7df8c2da9fd23a /src
parentb264035637b60c6fc09839f2a58f2bc16f573113 (diff)
downloadgsoc2013-empathy-f9cbc778a336d3a891d67914d289841222fb679b.tar
gsoc2013-empathy-f9cbc778a336d3a891d67914d289841222fb679b.tar.gz
gsoc2013-empathy-f9cbc778a336d3a891d67914d289841222fb679b.tar.bz2
gsoc2013-empathy-f9cbc778a336d3a891d67914d289841222fb679b.tar.lz
gsoc2013-empathy-f9cbc778a336d3a891d67914d289841222fb679b.tar.xz
gsoc2013-empathy-f9cbc778a336d3a891d67914d289841222fb679b.tar.zst
gsoc2013-empathy-f9cbc778a336d3a891d67914d289841222fb679b.zip
Implement dispose
Diffstat (limited to 'src')
-rw-r--r--src/empathy-account-assistant.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/empathy-account-assistant.c b/src/empathy-account-assistant.c
index dc83330a0..5bcd602e7 100644
--- a/src/empathy-account-assistant.c
+++ b/src/empathy-account-assistant.c
@@ -68,6 +68,8 @@ typedef struct {
EmpathyAccountSettings *settings;
GtkWindow *parent_window;
+
+ gboolean dispose_run;
} EmpathyAccountAssistantPriv;
static GtkWidget *
@@ -625,6 +627,26 @@ do_constructed (GObject *object)
}
static void
+do_dispose (GObject *obj)
+{
+ EmpathyAccountAssistantPriv *priv = GET_PRIV (obj);
+
+ if (priv->dispose_run)
+ return;
+
+ priv->dispose_run = TRUE;
+
+ if (priv->settings != NULL)
+ {
+ g_object_unref (priv->settings);
+ priv->settings = NULL;
+ }
+
+ if (G_OBJECT_CLASS (empathy_account_assistant_parent_class)->dispose != NULL)
+ G_OBJECT_CLASS (empathy_account_assistant_parent_class)->dispose (obj);
+}
+
+static void
empathy_account_assistant_class_init (EmpathyAccountAssistantClass *klass)
{
GObjectClass *oclass = G_OBJECT_CLASS (klass);
@@ -633,6 +655,7 @@ empathy_account_assistant_class_init (EmpathyAccountAssistantClass *klass)
oclass->get_property = do_get_property;
oclass->set_property = do_set_property;
oclass->constructed = do_constructed;
+ oclass->dispose = do_dispose;
param_spec = g_param_spec_object ("parent-window",
"parent-window", "The parent window",