changeset 31403:68c6d980e35c

Show invite message entry in Finch's Add Buddy dialog.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Sun, 20 Mar 2011 22:13:41 +0000
parents c0a122c22475
children 7e20e5bbaf2b
files finch/gntblist.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/finch/gntblist.c	Sun Mar 20 22:04:23 2011 +0000
+++ b/finch/gntblist.c	Sun Mar 20 22:13:41 2011 +0000
@@ -626,6 +626,7 @@
 	const char *username = purple_request_fields_get_string(allfields, "screenname");
 	const char *alias = purple_request_fields_get_string(allfields, "alias");
 	const char *group = purple_request_fields_get_string(allfields, "group");
+	const char *invite = purple_request_fields_get_string(allfields, "invite");
 	PurpleAccount *account = purple_request_fields_get_account(allfields, "account");
 	const char *error = NULL;
 	PurpleGroup *grp;
@@ -662,7 +663,7 @@
 		purple_blist_add_buddy(buddy, NULL, grp, NULL);
 	}
 
-	purple_account_add_buddy(account, buddy);
+	purple_account_add_buddy_with_invite(account, buddy, invite);
 }
 
 static void
@@ -680,6 +681,9 @@
 	field = purple_request_field_string_new("alias", _("Alias (optional)"), alias, FALSE);
 	purple_request_field_group_add_field(group, field);
 
+	field = purple_request_field_string_new("invite", _("Invite message (optional)"), NULL, FALSE);
+	purple_request_field_group_add_field(group, field);
+
 	field = purple_request_field_string_new("group", _("Add in group"), grp, FALSE);
 	purple_request_field_group_add_field(group, field);
 	purple_request_field_set_type_hint(field, "group");