changeset 15053:06b0b50d3617

[gaim-migrate @ 17837] Get rid of a silly prompt and skip straight to asking the Gaim user to enter a message to use when requesting authorization when adding an ICQ user to your buddylist committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Tue, 28 Nov 2006 08:44:12 +0000
parents 51f3c0df6ab4
children f58283ce58ea
files libgaim/protocols/oscar/oscar.c
diffstat 1 files changed, 12 insertions(+), 33 deletions(-) [+]
line wrap: on
line diff
--- a/libgaim/protocols/oscar/oscar.c	Tue Nov 28 07:26:00 2006 +0000
+++ b/libgaim/protocols/oscar/oscar.c	Tue Nov 28 08:44:12 2006 +0000
@@ -2147,16 +2147,6 @@
 }
 
 static void
-gaim_auth_request_msgprompt(struct name_data *data)
-{
-	gaim_request_input(data->gc, NULL, _("Authorization Request Message:"),
-					   NULL, _("Please authorize me!"), TRUE, FALSE, NULL,
-					   _("OK"), G_CALLBACK(gaim_auth_request),
-					   _("Cancel"), G_CALLBACK(oscar_free_name_data),
-					   data);
-}
-
-static void
 gaim_auth_dontrequest(struct name_data *data)
 {
 	GaimConnection *gc = data->gc;
@@ -2170,31 +2160,19 @@
 
 
 static void
-gaim_auth_sendrequest(GaimConnection *gc, char *name)
+gaim_auth_sendrequest(GaimConnection *gc, const char *name)
 {
-	struct name_data *data = g_new0(struct name_data, 1);
-	GaimBuddy *buddy;
-	gchar *dialog_msg, *nombre;
-
-	buddy = gaim_find_buddy(gc->account, name);
-	if (buddy && (gaim_buddy_get_alias_only(buddy)))
-		nombre = g_strdup_printf("%s (%s)", name, gaim_buddy_get_alias_only(buddy));
-	else
-		nombre = NULL;
-
-	dialog_msg = g_strdup_printf(_("The user %s requires authorization before being added to a buddy list.  Do you want to send an authorization request?"), (nombre ? nombre : name));
+	struct name_data *data;
+
+	data = g_new0(struct name_data, 1);
 	data->gc = gc;
 	data->name = g_strdup(name);
-	data->nick = NULL;
-
-	gaim_request_action(gc, NULL, _("Request Authorization"), dialog_msg,
-						0, data, 2,
-						_("_Request Authorization"),
-						G_CALLBACK(gaim_auth_request_msgprompt),
-						_("Cancel"), G_CALLBACK(gaim_auth_dontrequest));
-
-	g_free(dialog_msg);
-	g_free(nombre);
+
+	gaim_request_input(data->gc, NULL, _("Authorization Request Message:"),
+					   NULL, _("Please authorize me!"), TRUE, FALSE, NULL,
+					   _("OK"), G_CALLBACK(gaim_auth_request),
+					   _("Cancel"), G_CALLBACK(gaim_auth_dontrequest),
+					   data);
 }
 
 
@@ -5821,7 +5799,8 @@
 	aim_locate_getinfoshort(gc->proto_data, gaim_buddy_get_name(buddy), 0x00000003);
 }
 
-GList *oscar_buddy_menu(GaimBuddy *buddy) {
+static GList *
+oscar_buddy_menu(GaimBuddy *buddy) {
 
 	GaimConnection *gc;
 	OscarData *od;