changeset 8295:bc850664b559

[gaim-migrate @ 9019] take advantage of chip's new thing committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Thu, 19 Feb 2004 14:52:09 +0000
parents d5e59ea083be
children dd6fe7d965aa
files src/protocols/jabber/xdata.c
diffstat 1 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/jabber/xdata.c	Thu Feb 19 09:47:44 2004 +0000
+++ b/src/protocols/jabber/xdata.c	Thu Feb 19 14:52:09 2004 +0000
@@ -30,7 +30,8 @@
 	JABBER_X_DATA_TEXT_MULTI,
 	JABBER_X_DATA_LIST_SINGLE,
 	JABBER_X_DATA_LIST_MULTI,
-	JABBER_X_DATA_BOOLEAN
+	JABBER_X_DATA_BOOLEAN,
+	JABBER_X_DATA_JID_SINGLE
 } jabber_x_data_field_type;
 
 struct jabber_x_data_data {
@@ -60,6 +61,7 @@
 
 			switch(type) {
 				case JABBER_X_DATA_TEXT_SINGLE:
+				case JABBER_X_DATA_JID_SINGLE:
 					{
 					const char *value = gaim_request_field_string_get_value(field);
 					fieldnode = xmlnode_new_child(result, "field");
@@ -312,7 +314,12 @@
 					value ? value : "", FALSE);
 			gaim_request_field_group_add_field(group, field);
 
-			g_hash_table_replace(data->fields, g_strdup(var), GINT_TO_POINTER(JABBER_X_DATA_TEXT_SINGLE));
+			if(!strcmp(type, "jid-single")) {
+				gaim_request_field_set_type_hint(field, "screenname");
+				g_hash_table_replace(data->fields, g_strdup(var), GINT_TO_POINTER(JABBER_X_DATA_JID_SINGLE));
+			} else {
+				g_hash_table_replace(data->fields, g_strdup(var), GINT_TO_POINTER(JABBER_X_DATA_TEXT_SINGLE));
+			}
 
 			if(value)
 				g_free(value);