changeset 32812:43e89b279eb4

No need to search for accounts when we already have a list of them.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Thu, 31 May 2012 05:45:28 +0000
parents 3d69d8e964a3
children b31f7945d9b6
files pidgin/plugins/xmppconsole.c
diffstat 1 files changed, 1 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/plugins/xmppconsole.c	Thu May 31 05:38:31 2012 +0000
+++ b/pidgin/plugins/xmppconsole.c	Thu May 31 05:45:28 2012 +0000
@@ -755,12 +755,7 @@
 	if (!console)
 		return;
 
-	account = purple_accounts_find(gtk_combo_box_get_active_text(GTK_COMBO_BOX(console->dropdown)),
-				    "prpl-jabber");
-	if (!account || !purple_account_get_connection(account))
-		return;
-
-	console->gc = purple_account_get_connection(account);
+	console->gc = g_list_nth_data(console->accounts, gtk_combo_box_get_active(GTK_COMBO_BOX(console->dropdown)));
 	gtk_webview_load_html_string(GTK_WEBVIEW(console->webview), EMPTY_HTML);
 }