changeset 30283:b6b0c80f9dde

Implemented new naming conventions * changed MXitId to UID * changed nickname to Display Name * changed loginname to MXit ID
author pieter.loubser@mxit.com
date Mon, 14 Jun 2010 12:16:50 +0000
parents 1dc5382d91d5
children 3221b1107811
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
diffstat 6 files changed, 16 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/mxit/actions.c	Wed Jun 02 21:55:44 2010 +0000
+++ b/libpurple/protocols/mxit/actions.c	Mon Jun 14 12:16:50 2010 +0000
@@ -225,12 +225,14 @@
 	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 );
--- a/libpurple/protocols/mxit/login.c	Wed Jun 02 21:55:44 2010 +0000
+++ b/libpurple/protocols/mxit/login.c	Mon Jun 14 12:16:50 2010 +0000
@@ -238,7 +238,7 @@
 	/* 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 @@
 	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 @@
 				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;
--- a/libpurple/protocols/mxit/mxit.c	Wed Jun 02 21:55:44 2010 +0000
+++ b/libpurple/protocols/mxit/mxit.c	Mon Jun 14 12:16:50 2010 +0000
@@ -578,7 +578,7 @@
 
 	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;
 }
--- a/libpurple/protocols/mxit/mxit.h	Wed Jun 02 21:55:44 2010 +0000
+++ b/libpurple/protocols/mxit/mxit.h	Mon Jun 14 12:16:50 2010 +0000
@@ -151,7 +151,7 @@
 
 	/* 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 */
--- a/libpurple/protocols/mxit/profile.c	Wed Jun 02 21:55:44 2010 +0000
+++ b/libpurple/protocols/mxit/profile.c	Mon Jun 14 12:16:50 2010 +0000
@@ -120,7 +120,7 @@
 		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" ) );
--- a/libpurple/protocols/mxit/protocol.c	Wed Jun 02 21:55:44 2010 +0000
+++ b/libpurple/protocols/mxit/protocol.c	Mon Jun 14 12:16:50 2010 +0000
@@ -1304,7 +1304,7 @@
 
 	/* 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 @@
 	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;