changeset 32811:3d69d8e964a3

The XMPP Console incorrectly shows non-XMPP accounts that sign on after opening.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Thu, 31 May 2012 05:38:31 +0000
parents 58a36b827f45
children 43e89b279eb4
files pidgin/plugins/xmppconsole.c
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/plugins/xmppconsole.c	Thu May 31 05:32:47 2012 +0000
+++ b/pidgin/plugins/xmppconsole.c	Thu May 31 05:38:31 2012 +0000
@@ -654,16 +654,23 @@
 static void
 signing_on_cb(PurpleConnection *gc)
 {
+	PurpleAccount *account;
+
 	if (!console)
 		return;
 
-	gtk_combo_box_append_text(GTK_COMBO_BOX(console->dropdown), purple_account_get_username(purple_connection_get_account(gc)));
+	account = purple_connection_get_account(gc);
+	if (strcmp(purple_account_get_protocol_id(account), "prpl-jabber"))
+		return;
+
+	gtk_combo_box_append_text(GTK_COMBO_BOX(console->dropdown), purple_account_get_username(account));
 	console->accounts = g_list_append(console->accounts, gc);
 	console->count++;
 
 	if (console->count == 1) {
 		console->gc = gc;
 		gtk_webview_load_html_string(GTK_WEBVIEW(console->webview), EMPTY_HTML);
+		gtk_combo_box_set_active(GTK_COMBO_BOX(console->dropdown), 0);
 	} else
 		gtk_widget_show_all(console->hbox);
 }