From 3550e13cd3e02e85962755851ce3ae2329ed02e3 Mon Sep 17 00:00:00 2001 From: Sjoerd Simons Date: Thu, 4 Mar 2010 12:21:54 +0000 Subject: Connect to the accounts signals in one central place --- src/empathy-accounts-dialog.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c index 75357be9c..ac0f27b96 100644 --- a/src/empathy-accounts-dialog.c +++ b/src/empathy-accounts-dialog.c @@ -417,11 +417,6 @@ empathy_account_dialog_account_created_cb (EmpathyAccountWidget *widget_object, gtk_widget_set_sensitive (priv->button_remove, TRUE); gtk_widget_set_sensitive (priv->button_import, TRUE); - empathy_signal_connect_weak (account, "status-changed", - G_CALLBACK (accounts_dialog_connection_changed_cb), G_OBJECT (dialog)); - empathy_signal_connect_weak (account, "presence-changed", - G_CALLBACK (accounts_dialog_presence_changed_cb), G_OBJECT (dialog)); - if (settings) g_object_unref (settings); } @@ -1665,6 +1660,11 @@ accounts_dialog_add_account (EmpathyAccountsDialog *dialog, G_CALLBACK (accounts_dialog_account_display_name_changed_cb), G_OBJECT (dialog)); + empathy_signal_connect_weak (account, "status-changed", + G_CALLBACK (accounts_dialog_connection_changed_cb), G_OBJECT (dialog)); + empathy_signal_connect_weak (account, "presence-changed", + G_CALLBACK (accounts_dialog_presence_changed_cb), G_OBJECT (dialog)); + g_object_unref (settings); } @@ -1870,11 +1870,6 @@ accounts_dialog_accounts_setup (EmpathyAccountsDialog *dialog) for (l = accounts; l; l = l->next) { accounts_dialog_add_account (dialog, l->data); - - empathy_signal_connect_weak (l->data, "status-changed", - G_CALLBACK (accounts_dialog_connection_changed_cb), G_OBJECT (dialog)); - empathy_signal_connect_weak (l->data, "presence-changed", - G_CALLBACK (accounts_dialog_presence_changed_cb), G_OBJECT (dialog)); } g_list_free (accounts); -- cgit v1.2.3