diff pidgin/plugins/xmppconsole.c @ 29499:8b469e799ed9

xmppconsole: Properly catch things before an account is "signed on". IOW, while it's still connecting, because Tobias wants to see the authentication exchange.
author Paul Aurich <paul@darkrain42.org>
date Sun, 28 Feb 2010 19:09:20 +0000
parents c095f1795112
children 6ca9aa923250
line wrap: on
line diff
--- a/pidgin/plugins/xmppconsole.c	Sat Feb 27 04:02:50 2010 +0000
+++ b/pidgin/plugins/xmppconsole.c	Sun Feb 28 19:09:20 2010 +0000
@@ -621,7 +621,7 @@
 }
 
 static void
-signed_on_cb(PurpleConnection *gc)
+signing_on_cb(PurpleConnection *gc)
 {
 	if (!console)
 		return;
@@ -630,7 +630,9 @@
 	console->accounts = g_list_append(console->accounts, gc);
 	console->count++;
 
-	if (console->count > 1)
+	if (console->count == 1)
+		console->gc = gc;
+	else
 		gtk_widget_show_all(console->hbox);
 }
 
@@ -680,8 +682,8 @@
 			    PURPLE_CALLBACK(xmlnode_received_cb), NULL);
 	purple_signal_connect(jabber, "jabber-sending-text", xmpp_console_handle,
 			    PURPLE_CALLBACK(xmlnode_sent_cb), NULL);
-	purple_signal_connect(purple_connections_get_handle(), "signed-on",
-			    plugin, PURPLE_CALLBACK(signed_on_cb), NULL);
+	purple_signal_connect(purple_connections_get_handle(), "signing-on",
+			    plugin, PURPLE_CALLBACK(signing_on_cb), NULL);
 	purple_signal_connect(purple_connections_get_handle(), "signed-off",
 			    plugin, PURPLE_CALLBACK(signed_off_cb), NULL);