diff libpurple/account.c @ 16068:ac1a32ebd62c

patch from Simon Wilkinson to support Jabber/XMPP w/o passwords
author Nathan Walp <nwalp@pidgin.im>
date Sun, 15 Apr 2007 00:14:34 +0000
parents 32c366eeeb99
children 4fc51a87ce42 08db93bbd798
line wrap: on
line diff
--- a/libpurple/account.c	Tue Apr 10 22:23:13 2007 +0000
+++ b/libpurple/account.c	Sun Apr 15 00:14:34 2007 +0000
@@ -932,8 +932,9 @@
 	purple_connection_new(account, FALSE, entry);
 }
 
-static void
-request_password(PurpleAccount *account)
+void
+purple_account_request_password(PurpleAccount *account, GCallback ok_cb,
+				GCallback cancel_cb, void *user_data)
 {
 	gchar *primary;
 	const gchar *username;
@@ -965,9 +966,9 @@
                         primary,
                         NULL,
                         fields,
-                        _("OK"), G_CALLBACK(request_password_ok_cb),
-                        _("Cancel"), NULL,
-                        account);
+                        _("OK"), ok_cb,
+                        _("Cancel"), cancel_cb,
+                        user_data);
 	g_free(primary);
 }
 
@@ -1003,7 +1004,7 @@
 	if ((password == NULL) &&
 		!(prpl_info->options & OPT_PROTO_NO_PASSWORD) &&
 		!(prpl_info->options & OPT_PROTO_PASSWORD_OPTIONAL))
-		request_password(account);
+		purple_account_request_password(account, G_CALLBACK(request_password_ok_cb), NULL, account);
 	else
 		purple_connection_new(account, FALSE, password);
 }