diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2009-10-19 21:26:42 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2009-10-19 21:27:42 +0800 |
commit | 80a7e18a8f783db81140aed9cefcd08f6b33e330 (patch) | |
tree | bc4b51d6216895a940db1f567bc17d68faf2a034 /libempathy-gtk | |
parent | 2ca081a4e27d46599053779c641e4646046f42ae (diff) | |
download | gsoc2013-empathy-80a7e18a8f783db81140aed9cefcd08f6b33e330.tar gsoc2013-empathy-80a7e18a8f783db81140aed9cefcd08f6b33e330.tar.gz gsoc2013-empathy-80a7e18a8f783db81140aed9cefcd08f6b33e330.tar.bz2 gsoc2013-empathy-80a7e18a8f783db81140aed9cefcd08f6b33e330.tar.lz gsoc2013-empathy-80a7e18a8f783db81140aed9cefcd08f6b33e330.tar.xz gsoc2013-empathy-80a7e18a8f783db81140aed9cefcd08f6b33e330.tar.zst gsoc2013-empathy-80a7e18a8f783db81140aed9cefcd08f6b33e330.zip |
rename contact_list_store_finalize to contact_list_store_dispose
This method just disconnect signals, release references and remove idle
callbacks so it should really be a dispose, not a finalize.
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-contact-list-store.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/libempathy-gtk/empathy-contact-list-store.c b/libempathy-gtk/empathy-contact-list-store.c index 6d6e422bd..1ef9aef75 100644 --- a/libempathy-gtk/empathy-contact-list-store.c +++ b/libempathy-gtk/empathy-contact-list-store.c @@ -64,6 +64,7 @@ typedef struct { EmpathyContactListStoreSort sort_criterium; guint inhibit_active; guint setup_idle_id; + gboolean dispose_has_run; } EmpathyContactListStorePriv; typedef struct { @@ -84,7 +85,7 @@ typedef struct { gboolean remove; } ShowActiveData; -static void contact_list_store_finalize (GObject *object); +static void contact_list_store_dispose (GObject *object); static void contact_list_store_get_property (GObject *object, guint param_id, GValue *value, @@ -216,7 +217,7 @@ empathy_contact_list_store_class_init (EmpathyContactListStoreClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - object_class->finalize = contact_list_store_finalize; + object_class->dispose = contact_list_store_dispose; object_class->get_property = contact_list_store_get_property; object_class->set_property = contact_list_store_set_property; @@ -288,11 +289,15 @@ empathy_contact_list_store_init (EmpathyContactListStore *store) } static void -contact_list_store_finalize (GObject *object) +contact_list_store_dispose (GObject *object) { EmpathyContactListStorePriv *priv = GET_PRIV (object); GList *contacts, *l; + if (priv->dispose_has_run) + return; + priv->dispose_has_run = TRUE; + contacts = empathy_contact_list_get_members (priv->list); for (l = contacts; l; l = l->next) { g_signal_handlers_disconnect_by_func (l->data, @@ -319,7 +324,7 @@ contact_list_store_finalize (GObject *object) g_source_remove (priv->setup_idle_id); } - G_OBJECT_CLASS (empathy_contact_list_store_parent_class)->finalize (object); + G_OBJECT_CLASS (empathy_contact_list_store_parent_class)->dispose (object); } static void |