pidgin.mxit: 5e100dff: Implemented new naming conventions

pieter.loubser at mxit.com pieter.loubser at mxit.com
Mon Jun 14 08:20:48 EDT 2010


-----------------------------------------------------------------
Revision: 5e100dffc9b7d212a420f899daa1f893a4be6b3c
Ancestor: 819b7b498d49ef63fabf7e08c3a5c9263294a09f
Author: pieter.loubser at mxit.com
Date: 2010-06-14T12:16:50
Branch: im.pidgin.pidgin.mxit
URL: http://d.pidgin.im/viewmtn/revision/info/5e100dffc9b7d212a420f899daa1f893a4be6b3c

Modified files:
        libpurple/protocols/mxit/actions.c
        libpurple/protocols/mxit/login.c
        libpurple/protocols/mxit/mxit.c
        libpurple/protocols/mxit/mxit.h
        libpurple/protocols/mxit/profile.c
        libpurple/protocols/mxit/protocol.c

ChangeLog: 

Implemented new naming conventions
* changed MXitId to UID
* changed nickname to Display Name
* changed loginname to MXit ID


-------------- next part --------------
============================================================
--- libpurple/protocols/mxit/actions.c	09a1faf94e3d8faca80b46b142ea0a1c91f2b36e
+++ libpurple/protocols/mxit/actions.c	124224391d5cf7a01ae4abd409022ee8e41e4694
@@ -225,12 +225,14 @@ static void mxit_cb_action_profile( Purp
 	group = purple_request_field_group_new( NULL );
 	purple_request_fields_add_group( fields, group );
 
-	/* mxitId (read-only) */
-	if ( session->mxitId ) {
-		field = purple_request_field_string_new( "mxitid", _( "Your MXitId" ), session->mxitId, FALSE );
+#if	0
+	/* UID (read-only) */
+	if ( session->uid ) {
+		field = purple_request_field_string_new( "mxitid", _( "Your UID" ), session->uid, FALSE );
 		purple_request_field_string_set_editable( field, FALSE );
 		purple_request_field_group_add_field( group, field );
 	}
+#endif
 
 	/* pin */
 	field = purple_request_field_string_new( "pin", _( "PIN" ), session->acc->password, FALSE );
============================================================
--- libpurple/protocols/mxit/login.c	39098bab736b280eedce55173d685922a5fa7de9
+++ libpurple/protocols/mxit/login.c	a10dab5a9666e795e60966664f9fc109e2cabca9
@@ -238,7 +238,7 @@ static void mxit_cb_register_ok( PurpleC
 	/* nickname */
 	str = purple_request_fields_get_string( fields, "nickname" );
 	if ( ( !str ) || ( strlen( str ) < 3 ) ) {
-		err = _( "The nick name you entered is invalid." );
+		err = _( "The Display Name you entered is invalid." );
 		goto out;
 	}
 	g_strlcpy( profile->nickname, str, sizeof( profile->nickname ) );
@@ -329,12 +329,12 @@ static void mxit_register_view( struct M
 	purple_request_fields_add_group( fields, group );
 
 	/* mxit login name */
-	field = purple_request_field_string_new( "loginname", _( "MXit Login Name" ), purple_account_get_username( session->acc ), FALSE );
+	field = purple_request_field_string_new( "loginname", _( "MXit ID" ), purple_account_get_username( session->acc ), FALSE );
 	purple_request_field_string_set_editable( field, FALSE );
 	purple_request_field_group_add_field( group, field );
 
 	/* nick name (required) */
-	field = purple_request_field_string_new( "nickname", _( "Nick Name" ), profile->nickname, FALSE );
+	field = purple_request_field_string_new( "nickname", _( "Display Name" ), profile->nickname, FALSE );
 	purple_request_field_set_required( field, TRUE );
 	purple_request_field_group_add_field( group, field );
 
@@ -418,10 +418,10 @@ static void mxit_cb_clientinfo2( PurpleU
 				purple_connection_error( session->con, _( "Invalid country selected. Please try again." ) );
 				return;
 			case '6' :
-				purple_connection_error( session->con, _( "Username is not registered. Please register first." ) );
+				purple_connection_error( session->con, _( "The MXit ID you entered is not registered. Please register first." ) );
 				return;
 			case '7' :
-				purple_connection_error( session->con, _( "Username is already registered. Please choose another username." ) );
+				purple_connection_error( session->con, _( "The MXit ID you entered is already registered. Please choose another." ) );
 				/* this user's account already exists, so we need to change the registration login flag to be login */
 				purple_account_set_int( session->acc, MXIT_CONFIG_STATE, MXIT_STATE_LOGIN );
 				return;
============================================================
--- libpurple/protocols/mxit/mxit.c	a1cb4e2f463dd954f5d9c073aa18708ebe4f88e8
+++ libpurple/protocols/mxit/mxit.c	3b38418b69f625ac76b62d9785a96b82c1b70743
@@ -578,7 +578,7 @@ static GHashTable* mxit_get_text_table( 
 
 	table = g_hash_table_new( g_str_hash, g_str_equal );
 
-	g_hash_table_insert( table, "login_label", (gpointer)_( "Your Mobile Number..." ) );
+	g_hash_table_insert( table, "login_label", (gpointer)_( "Your MXit ID..." ) );
 
 	return table;
 }
============================================================
--- libpurple/protocols/mxit/mxit.h	b8ba177f94dec3776b4703c253f1cbc3ab73ad91
+++ libpurple/protocols/mxit/mxit.h	ca90cb4e0826ed8a97559e5b968ded42613b5b0a
@@ -151,7 +151,7 @@ struct MXitSession {
 
 	/* personal (profile) */
 	struct MXitProfile*	profile;					/* user's profile information */
-	char*				mxitId;						/* the user's MXitId */
+	char*				uid;						/* the user's UID */
 
 	/* libpurple */
 	PurpleAccount*		acc;						/* pointer to the libpurple internal account struct */
============================================================
--- libpurple/protocols/mxit/profile.c	d309b2d1d4748a1bb8ce6f21067c4710d9b6189a
+++ libpurple/protocols/mxit/profile.c	0bfa75e5781533d06df731d90cfc6c89f51ce60a
@@ -120,7 +120,7 @@ void mxit_show_profile( struct MXitSessi
 		contact = purple_buddy_get_protocol_data(buddy);
 	}
 
-	purple_notify_user_info_add_pair( info, _( "Nick Name" ), profile->nickname );
+	purple_notify_user_info_add_pair( info, _( "Display Name" ), profile->nickname );
 	purple_notify_user_info_add_pair( info, _( "Birthday" ), profile->birthday );
 	purple_notify_user_info_add_pair( info, _( "Gender" ), profile->male ? _( "Male" ) : _( "Female" ) );
 //	purple_notify_user_info_add_pair( info, _( "Hidden Number" ), profile->hidden ? _( "Yes" ) : _( "No" ) );
============================================================
--- libpurple/protocols/mxit/protocol.c	b9ceffc9dbb27b91d58bc792ac63cda4ea7505c6
+++ libpurple/protocols/mxit/protocol.c	5743ef03d27d58e0b74a46e93b287b4f76b2a4f1
@@ -1304,7 +1304,7 @@ static void mxit_parse_cmd_login( struct
 
 	/* extract MXitId (from protocol 5.9) */
 	if ( records[1]->fcount >= 9 )
-		session->mxitId = g_strdup( records[1]->fields[8]->data );
+		session->uid = g_strdup( records[1]->fields[8]->data );
 
 	/* display the current splash-screen */
 	if ( splash_popup_enabled( session ) )
@@ -2487,8 +2487,8 @@ void mxit_close_connection( struct MXitS
 	mxit_free_emoticon_cache( session );
 
 	/* free allocated memory */
-	if ( session->mxitId )
-		g_free( session->mxitId );
+	if ( session->uid )
+		g_free( session->uid );
 	g_free( session->encpwd );
 	session->encpwd = NULL;
 


More information about the Commits mailing list