diff libgaim/account.c @ 15057:f227feab8c78

[gaim-migrate @ 17841] Ok... let's throw this to the wild. Support for "So-and-so want's authorization" in the core. It creates a new mini-dialog in the blist for this with an Authorize and Deny button, which do as you might imagine. Clicking Authorize will also spawn an "Add buddy" dialog if that person isn't already a buddy. I'm not sure I like this, since I never add buddies that I authorize, but it seems the best option. I considered a checkbox in the dialog (but it only applies when you hit "Authorize," which could be weird), and a third "Authorize and Add" button (but that was too big for the blist). I'll come back to the UI later, I'm sure. I'd like to see that the prpl changes all work. Yahoo, especially, looked confusing, and had the most changes. I'm mostly happy with this. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Wed, 29 Nov 2006 01:13:21 +0000
parents 577ddea3ab82
children 97ae8709d6dc
line wrap: on
line diff
--- a/libgaim/account.c	Tue Nov 28 21:29:12 2006 +0000
+++ b/libgaim/account.c	Wed Nov 29 01:13:21 2006 +0000
@@ -1051,6 +1051,23 @@
 		ui_ops->request_add(account, remote_user, id, alias, message);
 }
 
+void
+gaim_account_request_authorization(GaimAccount *account, const char *remote_user,
+			           const char *id, const char *alias, const char *message,
+				   GCallback auth_cb, GCallback deny_cb, void *user_data)
+{
+        GaimAccountUiOps *ui_ops;
+
+	g_return_if_fail(account     != NULL);
+        g_return_if_fail(remote_user != NULL);
+
+        ui_ops = gaim_accounts_get_ui_ops();
+
+        if (ui_ops != NULL && ui_ops->request_authorize != NULL)
+               ui_ops->request_authorize(account, remote_user, id, alias, message, auth_cb, deny_cb, user_data);
+						
+}
+
 static void
 change_password_cb(GaimAccount *account, GaimRequestFields *fields)
 {