pidgin: e4816bb8: The XMPP Console incorrectly shows non-X...

qulogic at pidgin.im qulogic at pidgin.im
Thu May 31 02:21:53 EDT 2012


----------------------------------------------------------------------
Revision: e4816bb833201a5687d3134473e498a7c50123dd
Parent:   bdee35586cbbe160053bb79e5ad2d30ef71a1a75
Author:   qulogic at pidgin.im
Date:     05/31/12 01:38:31
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/e4816bb833201a5687d3134473e498a7c50123dd

Changelog: 

The XMPP Console incorrectly shows non-XMPP accounts that sign on after opening.

Changes against parent bdee35586cbbe160053bb79e5ad2d30ef71a1a75

  patched  pidgin/plugins/xmppconsole.c

-------------- next part --------------
============================================================
--- pidgin/plugins/xmppconsole.c	70e60378a367dba9bbe3050a5177035d39589846
+++ pidgin/plugins/xmppconsole.c	113acc79124d7c25aedc7c253cc7ddde89241092
@@ -654,16 +654,23 @@ signing_on_cb(PurpleConnection *gc)
 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);
 }


More information about the Commits mailing list