pidgin: d6694598: Show invite message entry in Finch's Add...

qulogic at pidgin.im qulogic at pidgin.im
Sun Mar 20 20:33:02 EDT 2011


----------------------------------------------------------------------
Revision: d6694598818096696ba2ceefe6d9cb240851e1f6
Parent:   263fb40c821964de0d52cc232890fa54cea5b2c6
Author:   qulogic at pidgin.im
Date:     03/20/11 18:13:41
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/d6694598818096696ba2ceefe6d9cb240851e1f6

Changelog: 

Show invite message entry in Finch's Add Buddy dialog.

Changes against parent 263fb40c821964de0d52cc232890fa54cea5b2c6

  patched  finch/gntblist.c

-------------- next part --------------
============================================================
--- finch/gntblist.c	9e21aaef31baacd8331062abbcf2c14e34bbb711
+++ finch/gntblist.c	b84805c84bbdb9efc7f992128395b4f30b63c511
@@ -626,6 +626,7 @@ add_buddy_cb(void *data, PurpleRequestFi
 	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 @@ add_buddy_cb(void *data, PurpleRequestFi
 		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 @@ finch_request_add_buddy(PurpleAccount *a
 	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");


More information about the Commits mailing list