[empathy] connect to status-changed signal of new accounts



commit 32f691f2a35bce50b8167b7de32ba357f3e40343
Author: Felix Kaser <f kaser gmx net>
Date:   Mon Dec 28 13:53:29 2009 +0100

    connect to status-changed signal of new accounts
    
    the main window has to listen for status-changed signals of newly created accounts to display error-infobar

 src/empathy-main-window.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/empathy-main-window.c b/src/empathy-main-window.c
index da67156..e77ab9e 100644
--- a/src/empathy-main-window.c
+++ b/src/empathy-main-window.c
@@ -1132,6 +1132,12 @@ main_window_account_validity_changed_cb (TpAccountManager *manager,
 					 gboolean valid,
 					 EmpathyMainWindow *window)
 {
+	if (valid) {
+		g_signal_connect (account, "status-changed",
+				  G_CALLBACK (main_window_connection_changed_cb),
+				  window);
+	}
+
 	main_window_account_removed_cb (manager, account, window);
 }
 
@@ -1201,6 +1207,10 @@ account_manager_prepared_cb (GObject *source_object,
 				  window);
 	}
 
+	g_signal_connect (manager, "account-validity-changed",
+			  G_CALLBACK (main_window_account_validity_changed_cb),
+			  window);
+
 	main_window_update_status (window);
 
 	/* Disable the "Previous Conversations" menu entry if there is no account */



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