changeset 30097:da8c00c5b4e5

Specify purple_request_field_set_required() for the Capcha input textbox. (This resolves an issue with Pidgin on Maemo where the MXit account cannot be activated) Also set the Birthdate, NickName, PIN1 & PIN2 as required fields when registering. It provides better UI-feedback to the user.
author andrew.victor@mxit.com
date Tue, 25 May 2010 21:08:25 +0000
parents 1518b6b70556
children 51c31805d2a7 d7325448badb
files libpurple/protocols/mxit/login.c
diffstat 1 files changed, 9 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/mxit/login.c	Fri May 21 05:35:33 2010 +0000
+++ b/libpurple/protocols/mxit/login.c	Tue May 25 21:08:25 2010 +0000
@@ -333,13 +333,15 @@
 	purple_request_field_string_set_editable( field, FALSE );
 	purple_request_field_group_add_field( group, field );
 
-	/* nick name */
+	/* nick name (required) */
 	field = purple_request_field_string_new( "nickname", _( "Nick Name" ), profile->nickname, FALSE );
+	purple_request_field_set_required( field, TRUE );
 	purple_request_field_group_add_field( group, field );
 
-	/* birthday */
+	/* birthday (required) */
 	field = purple_request_field_string_new( "bday", _( "Birthday" ), profile->birthday, FALSE );
 	purple_request_field_string_set_default_value( field, "YYYY-MM-DD" );
+	purple_request_field_set_required( field, TRUE );
 	purple_request_field_group_add_field( group, field );
 
 	/* gender */
@@ -348,12 +350,14 @@
 	purple_request_field_choice_add( field, _( "Male" ) );			/* 1 */
 	purple_request_field_group_add_field( group, field );
 
-	/* pin */
+	/* pin (required) */
 	field = purple_request_field_string_new( "pin", _( "PIN" ), profile->pin, FALSE );
 	purple_request_field_string_set_masked( field, TRUE );
+	purple_request_field_set_required( field, TRUE );
 	purple_request_field_group_add_field( group, field );
 	field = purple_request_field_string_new( "pin2", _( "Verify PIN" ), "", FALSE );
 	purple_request_field_string_set_masked( field, TRUE );
+	purple_request_field_set_required( field, TRUE );
 	purple_request_field_group_add_field( group, field );
 
 	/* show the form to the user to complete */
@@ -636,8 +640,9 @@
 	field = purple_request_field_image_new( "capcha", _( "Security Code" ), (gchar*) logindata->captcha, logindata->captcha_size );
 	purple_request_field_group_add_field( group, field );
 
-	/* ask for input */
+	/* ask for input (required) */
 	field = purple_request_field_string_new( "code", _( "Enter Security Code" ), NULL, FALSE );
+	purple_request_field_set_required( field, TRUE );
 	purple_request_field_group_add_field( group, field );
 
 	/* choose your country, but be careful, we already know your IP! ;-) */