changeset 12522:560ddc8d26f3

[gaim-migrate @ 14834] Connect the account-modified signal to a callback to update the menu bar. This ensures the Accounts menu is in sync when changes are made to an account. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Sat, 17 Dec 2005 06:16:35 +0000
parents e9c143acd765
children b5c5c4a57555
files src/gtkblist.c
diffstat 1 files changed, 13 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkblist.c	Sat Dec 17 06:15:15 2005 +0000
+++ b/src/gtkblist.c	Sat Dec 17 06:16:35 2005 +0000
@@ -3445,6 +3445,14 @@
 	update_menu_bar(gtkblist);
 }
 
+static void account_modified(GaimAccount *account, GaimGtkBuddyList *gtkblist)
+{
+	if (!gtkblist)
+		return;
+	
+	update_menu_bar(gtkblist);
+}
+
 static gboolean
 pane_position_cb(GtkPaned *paned, GParamSpec *param_spec, gpointer data)
 {
@@ -3712,12 +3720,15 @@
 			gaim_gtk_blist_sound_method_pref_cb, NULL);
 
 	/* Setup some gaim signal handlers. */
+	gaim_signal_connect(gaim_accounts_get_handle(), "account-enabled",
+			gtkblist, GAIM_CALLBACK(account_enabled), gtkblist);
 	gaim_signal_connect(gaim_accounts_get_handle(), "account-disabled",
 			gtkblist, GAIM_CALLBACK(account_disabled), gtkblist);
 	gaim_signal_connect(gaim_accounts_get_handle(), "account-removed",
 			gtkblist, GAIM_CALLBACK(account_disabled), gtkblist);
-	gaim_signal_connect(gaim_accounts_get_handle(), "account-enabled",
-			gtkblist, GAIM_CALLBACK(account_enabled), gtkblist);
+
+	gaim_signal_connect(gaim_gtk_account_get_handle(), "account-modified",
+			gtkblist, GAIM_CALLBACK(account_modified), gtkblist);
 
 	gaim_signal_connect(gaim_connections_get_handle(), "signed-on",
 						gtkblist, GAIM_CALLBACK(sign_on_off_cb), list);