No need to search for accounts when we already have a list of them.

Thu, 31 May 2012 05:45:28 +0000

author
Elliott Sales de Andrade <qulogic@pidgin.im>
date
Thu, 31 May 2012 05:45:28 +0000
changeset 32997
39bfe55ac9f4
parent 32996
65221079a957
child 32998
ded53a4a9f29

No need to search for accounts when we already have a list of them.

pidgin/plugins/xmppconsole.c file | annotate | diff | comparison | revisions
--- 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);
 }
 

mercurial