[empathy: 3/5] Connect to the accounts signals in one central place



commit 3550e13cd3e02e85962755851ce3ae2329ed02e3
Author: Sjoerd Simons <sjoerd simons collabora co uk>
Date:   Thu Mar 4 12:21:54 2010 +0000

    Connect to the accounts signals in one central place

 src/empathy-accounts-dialog.c |   15 +++++----------
 1 files changed, 5 insertions(+), 10 deletions(-)
---
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index 75357be..ac0f27b 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);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]