diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2009-08-07 01:19:49 +0800 |
---|---|---|
committer | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2009-08-22 21:21:07 +0800 |
commit | f9cbc778a336d3a891d67914d289841222fb679b (patch) | |
tree | 55c800bea3cb1c624eae73c2ec7df8c2da9fd23a /src/empathy-account-assistant.c | |
parent | b264035637b60c6fc09839f2a58f2bc16f573113 (diff) | |
download | gsoc2013-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/empathy-account-assistant.c')
-rw-r--r-- | src/empathy-account-assistant.c | 23 |
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", |