aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-12-21 18:27:56 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-12-22 17:46:19 +0800
commitfd982ae92ddb1e9fd66e8a3fead2363f2028477a (patch)
tree4ac466c45766bce2a9f068e879e041ddd749c5ea /libempathy-gtk
parent4eda4ec0acb993986e378b6b9c5f36f88ff193f1 (diff)
downloadgsoc2013-empathy-fd982ae92ddb1e9fd66e8a3fead2363f2028477a.tar
gsoc2013-empathy-fd982ae92ddb1e9fd66e8a3fead2363f2028477a.tar.gz
gsoc2013-empathy-fd982ae92ddb1e9fd66e8a3fead2363f2028477a.tar.bz2
gsoc2013-empathy-fd982ae92ddb1e9fd66e8a3fead2363f2028477a.tar.lz
gsoc2013-empathy-fd982ae92ddb1e9fd66e8a3fead2363f2028477a.tar.xz
gsoc2013-empathy-fd982ae92ddb1e9fd66e8a3fead2363f2028477a.tar.zst
gsoc2013-empathy-fd982ae92ddb1e9fd66e8a3fead2363f2028477a.zip
account-widget: modernize dipose function
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-account-widget.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c
index a36cbb188..9ca98bc3f 100644
--- a/libempathy-gtk/empathy-account-widget.c
+++ b/libempathy-gtk/empathy-account-widget.c
@@ -115,8 +115,6 @@ struct _EmpathyAccountWidgetPriv {
/* Used for 'special' XMPP account having a service associated ensuring that
* JIDs have a specific suffix; such as Facebook for example */
gchar *jid_suffix;
-
- gboolean dispose_run;
};
enum {
@@ -2057,22 +2055,8 @@ do_dispose (GObject *obj)
{
EmpathyAccountWidget *self = EMPATHY_ACCOUNT_WIDGET (obj);
- if (self->priv->dispose_run)
- return;
-
- self->priv->dispose_run = TRUE;
-
- if (self->priv->settings != NULL)
- {
- g_object_unref (self->priv->settings);
- self->priv->settings = NULL;
- }
-
- if (self->priv->account_manager != NULL)
- {
- g_object_unref (self->priv->account_manager);
- self->priv->account_manager = NULL;
- }
+ g_clear_object (&self->priv->settings);
+ g_clear_object (&self->priv->account_manager);
if (G_OBJECT_CLASS (empathy_account_widget_parent_class)->dispose != NULL)
G_OBJECT_CLASS (empathy_account_widget_parent_class)->dispose (obj);
@@ -2175,8 +2159,6 @@ empathy_account_widget_init (EmpathyAccountWidget *self)
self->priv = G_TYPE_INSTANCE_GET_PRIVATE ((self), EMPATHY_TYPE_ACCOUNT_WIDGET,
EmpathyAccountWidgetPriv);
- self->priv->dispose_run = FALSE;
-
self->ui_details = g_slice_new0 (EmpathyAccountWidgetUIDetails);
}