aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-10-15 00:15:17 +0800
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-10-15 00:54:31 +0800
commit882784309a8bce349edff3632877f62f77003d01 (patch)
treee35e4c7c71dd4b00d857f86828b549bf5317cea5 /libempathy-gtk
parent0eb14eeb66bbec5985a12c0be24bf45d00ed311c (diff)
downloadgsoc2013-empathy-882784309a8bce349edff3632877f62f77003d01.tar
gsoc2013-empathy-882784309a8bce349edff3632877f62f77003d01.tar.gz
gsoc2013-empathy-882784309a8bce349edff3632877f62f77003d01.tar.bz2
gsoc2013-empathy-882784309a8bce349edff3632877f62f77003d01.tar.lz
gsoc2013-empathy-882784309a8bce349edff3632877f62f77003d01.tar.xz
gsoc2013-empathy-882784309a8bce349edff3632877f62f77003d01.tar.zst
gsoc2013-empathy-882784309a8bce349edff3632877f62f77003d01.zip
Use empathy_signal_connect_weak
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-presence-chooser.c26
1 files changed, 10 insertions, 16 deletions
diff --git a/libempathy-gtk/empathy-presence-chooser.c b/libempathy-gtk/empathy-presence-chooser.c
index ab48775fa..9108a58ec 100644
--- a/libempathy-gtk/empathy-presence-chooser.c
+++ b/libempathy-gtk/empathy-presence-chooser.c
@@ -102,8 +102,6 @@ typedef struct {
EmpathyIdle *idle;
EmpathyConnectivity *connectivity;
- gulong state_change_signal_id;
-
gboolean editing_status;
int block_set_editing;
int block_changed;
@@ -828,28 +826,28 @@ empathy_presence_chooser_init (EmpathyPresenceChooser *chooser)
priv->account_manager = empathy_account_manager_dup_singleton ();
- g_signal_connect (priv->account_manager, "account-created",
+ empathy_signal_connect_weak (priv->account_manager, "account-created",
G_CALLBACK (presence_chooser_account_manager_account),
- chooser);
- g_signal_connect (priv->account_manager, "account-deleted",
+ G_OBJECT (chooser));
+ empathy_signal_connect_weak (priv->account_manager, "account-deleted",
G_CALLBACK (presence_chooser_account_manager_account),
- chooser);
- g_signal_connect (priv->account_manager, "account-enabled",
+ G_OBJECT (chooser));
+ empathy_signal_connect_weak (priv->account_manager, "account-enabled",
G_CALLBACK (presence_chooser_account_manager_account),
- chooser);
- g_signal_connect (priv->account_manager, "account-disabled",
+ G_OBJECT (chooser));
+ empathy_signal_connect_weak (priv->account_manager, "account-disabled",
G_CALLBACK (presence_chooser_account_manager_account),
- chooser);
+ G_OBJECT (chooser));
/* FIXME: this string sucks */
gtk_widget_set_tooltip_text (GTK_WIDGET (chooser),
_("Set your presence and current status"));
priv->connectivity = empathy_connectivity_dup_singleton ();
- priv->state_change_signal_id = g_signal_connect (priv->connectivity,
+ empathy_signal_connect_weak (priv->connectivity,
"state-change",
G_CALLBACK (presence_chooser_connectivity_state_change),
- chooser);
+ G_OBJECT (chooser));
presence_chooser_update_sensitivity (chooser);
}
@@ -877,10 +875,6 @@ presence_chooser_finalize (GObject *object)
object);
g_object_unref (priv->idle);
- g_signal_handler_disconnect (priv->connectivity,
- priv->state_change_signal_id);
- priv->state_change_signal_id = 0;
-
g_object_unref (priv->connectivity);
G_OBJECT_CLASS (empathy_presence_chooser_parent_class)->finalize (object);