pidgin.mxit: b4547e5d: Specify purple_request_field_set_require...
andrew.victor at mxit.com
andrew.victor at mxit.com
Tue May 25 17:10:53 EDT 2010
-----------------------------------------------------------------
Revision: b4547e5df2f928e2dc0e471d88aa7a8975222c0e
Ancestor: 8b4055200f818c195ef2771f93ac02d9dc87665e
Author: andrew.victor at mxit.com
Date: 2010-05-25T21:08:25
Branch: im.pidgin.pidgin.mxit
URL: http://d.pidgin.im/viewmtn/revision/info/b4547e5df2f928e2dc0e471d88aa7a8975222c0e
Modified files:
libpurple/protocols/mxit/login.c
ChangeLog:
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.
-------------- next part --------------
============================================================
--- libpurple/protocols/mxit/login.c 40f7e9c92d73fa0432bdc326feaac4ae6519841e
+++ libpurple/protocols/mxit/login.c 69634f73e44d7cd8202d919b719b3dfa0c8e15ab
@@ -333,13 +333,15 @@ static void mxit_register_view( struct M
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 @@ static void mxit_register_view( struct M
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 @@ static void mxit_cb_clientinfo1( PurpleU
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! ;-) */
More information about the Commits
mailing list