comparison pidgin/plugins/xmppconsole.c @ 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
comparison
equal deleted inserted replaced
32811:3d69d8e964a3 32812:43e89b279eb4
753 PurpleAccount *account; 753 PurpleAccount *account;
754 754
755 if (!console) 755 if (!console)
756 return; 756 return;
757 757
758 account = purple_accounts_find(gtk_combo_box_get_active_text(GTK_COMBO_BOX(console->dropdown)), 758 console->gc = g_list_nth_data(console->accounts, gtk_combo_box_get_active(GTK_COMBO_BOX(console->dropdown)));
759 "prpl-jabber");
760 if (!account || !purple_account_get_connection(account))
761 return;
762
763 console->gc = purple_account_get_connection(account);
764 gtk_webview_load_html_string(GTK_WEBVIEW(console->webview), EMPTY_HTML); 759 gtk_webview_load_html_string(GTK_WEBVIEW(console->webview), EMPTY_HTML);
765 } 760 }
766 761
767 static void 762 static void
768 create_console(PurplePluginAction *action) 763 create_console(PurplePluginAction *action)