/pidgin/main: c5bf67fcaad0: MXit: Remove all reference to Hidden...

Andrew Victor andrew.victor at mxit.com
Wed Jan 16 04:39:52 EST 2013


Changeset: c5bf67fcaad08d78d915b82becef5a5aeae16cd2
Author:	 Andrew Victor <andrew.victor at mxit.com>
Date:	 2013-01-16 10:23 +0200
Branch:	 release-2.x.y
URL: http://hg.pidgin.im/pidgin/main/rev/c5bf67fcaad0

Description:

MXit: Remove all reference to Hidden Number since it's no longer supported.

diffstat:

 ChangeLog                           |  1 +
 libpurple/protocols/mxit/actions.c  |  7 -------
 libpurple/protocols/mxit/mxit.c     |  4 ----
 libpurple/protocols/mxit/profile.c  |  3 ---
 libpurple/protocols/mxit/profile.h  |  1 -
 libpurple/protocols/mxit/protocol.c |  6 +-----
 libpurple/protocols/mxit/protocol.h |  2 +-
 libpurple/protocols/mxit/roster.h   |  2 +-
 8 files changed, 4 insertions(+), 22 deletions(-)

diffs (113 lines):

diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -40,6 +40,7 @@ version 2.10.7:
 	  them from normal messages.
 	* Add support for typing notification.
 	* Add support for the Relationship Status profile attribute.
+	* Remove all reference to Hidden Number.
 
 	Yahoo!:
 	* Fix a double-free in profile/picture loading code. (Mihai Serban)
diff --git a/libpurple/protocols/mxit/actions.c b/libpurple/protocols/mxit/actions.c
--- a/libpurple/protocols/mxit/actions.c
+++ b/libpurple/protocols/mxit/actions.c
@@ -85,13 +85,6 @@ out:
 		g_string_append( attributes, attrib );
 		acount++;
 
-		/* force hidden if disabled */
-		if ( profile->hidden == FALSE ) {
-			g_snprintf( attrib, sizeof( attrib ), "\01%s\01%i\01%s", CP_PROFILE_HIDENUMBER, CP_PROFILE_TYPE_BOOL, "1" );
-			g_string_append( attributes, attrib );
-			acount++;
-		}
-
 		/* update birthday */
 		g_strlcpy( profile->birthday, bday, sizeof( profile->birthday ) );
 		g_snprintf( attrib, sizeof( attrib ), "\01%s\01%i\01%s", CP_PROFILE_BIRTHDATE, CP_PROFILE_TYPE_UTF8, profile->birthday );
diff --git a/libpurple/protocols/mxit/mxit.c b/libpurple/protocols/mxit/mxit.c
--- a/libpurple/protocols/mxit/mxit.c
+++ b/libpurple/protocols/mxit/mxit.c
@@ -358,10 +358,6 @@ static void mxit_tooltip( PurpleBuddy* b
 	/* rejection message */
 	if ( ( contact->subtype == MXIT_SUBTYPE_REJECTED ) && ( contact->msg != NULL ) )
 		purple_notify_user_info_add_pair( info, _( "Rejection Message" ), contact->msg );
-
-	/* hidden number */
-	if ( contact->flags & MXIT_CFLAG_HIDDEN )
-		purple_notify_user_info_add_pair( info, _( "Hidden Number" ), _( "Yes" ) );
 }
 
 
diff --git a/libpurple/protocols/mxit/profile.c b/libpurple/protocols/mxit/profile.c
--- a/libpurple/protocols/mxit/profile.c
+++ b/libpurple/protocols/mxit/profile.c
@@ -251,9 +251,6 @@ void mxit_show_profile( struct MXitSessi
 
 		/* subscription type */
 		purple_notify_user_info_add_pair( info, _( "Subscription" ), mxit_convert_subtype_to_name( contact->subtype ) );
-
-		/* hidden number */
-		purple_notify_user_info_add_pair( info, _( "Hidden Number" ), ( contact->flags & MXIT_CFLAG_HIDDEN ) ? _( "Yes" ) : _( "No" ) );
 	}
 	else {
 		/* this is an invite */
diff --git a/libpurple/protocols/mxit/profile.h b/libpurple/protocols/mxit/profile.h
--- a/libpurple/protocols/mxit/profile.h
+++ b/libpurple/protocols/mxit/profile.h
@@ -63,7 +63,6 @@ struct MXitProfile {
 
 	int			flags;								/* user's profile flags */
 	gint64		lastonline;							/* user's last-online timestamp */
-	gboolean	hidden;								/* set if the user's mxitid should remain hidden */
 };
 
 struct MXitSession;
diff --git a/libpurple/protocols/mxit/protocol.c b/libpurple/protocols/mxit/protocol.c
--- a/libpurple/protocols/mxit/protocol.c
+++ b/libpurple/protocols/mxit/protocol.c
@@ -1448,7 +1448,7 @@ static void mxit_parse_cmd_login( struct
 	PurpleStatus*	status;
 	int				presence;
 	const char*		statusmsg;
-	const char*		profilelist[] = { CP_PROFILE_BIRTHDATE, CP_PROFILE_GENDER, CP_PROFILE_HIDENUMBER, CP_PROFILE_FULLNAME,
+	const char*		profilelist[] = { CP_PROFILE_BIRTHDATE, CP_PROFILE_GENDER, CP_PROFILE_FULLNAME,
 									CP_PROFILE_TITLE, CP_PROFILE_FIRSTNAME, CP_PROFILE_LASTNAME, CP_PROFILE_EMAIL,
 									CP_PROFILE_MOBILENR, CP_PROFILE_WHEREAMI, CP_PROFILE_ABOUTME, CP_PROFILE_RELATIONSHIP, CP_PROFILE_FLAGS };
 
@@ -1810,10 +1810,6 @@ static void mxit_parse_cmd_extprofile( s
 			/* gender */
 			profile->male = ( fvalue[0] == '1' );
 		}
-		else if ( strcmp( CP_PROFILE_HIDENUMBER, fname ) == 0 ) {
-			/* hide number */
-			profile->hidden = ( fvalue[0] == '1' );
-		}
 		else if ( strcmp( CP_PROFILE_FULLNAME, fname ) == 0 ) {
 			/* nickname */
 			g_strlcpy( profile->nickname, fvalue, sizeof( profile->nickname ) );
diff --git a/libpurple/protocols/mxit/protocol.h b/libpurple/protocols/mxit/protocol.h
--- a/libpurple/protocols/mxit/protocol.h
+++ b/libpurple/protocols/mxit/protocol.h
@@ -189,7 +189,7 @@
 /* extended profile attribute fields */
 #define		CP_PROFILE_BIRTHDATE	"birthdate"				/* Birthdate (String - ISO 8601 format) */
 #define		CP_PROFILE_GENDER		"gender"				/* Gender (Boolean - 0=female, 1=male) */
-#define		CP_PROFILE_HIDENUMBER	"hidenumber"			/* Hide Number (Boolean - 0=false, 1=true) */
+// #define		CP_PROFILE_HIDENUMBER	"hidenumber"			/* Hide Number (Boolean - 0=false, 1=true) (DEPRECATED) */
 #define		CP_PROFILE_FULLNAME		"fullname"				/* Fullname (UTF8 String) */
 #define		CP_PROFILE_STATUS		"statusmsg"				/* Status Message (UTF8 String) */
 #define		CP_PROFILE_PREVSTATUS	"prevstatusmsgs"		/* Previous Status Messages (UTF8 String) */
diff --git a/libpurple/protocols/mxit/roster.h b/libpurple/protocols/mxit/roster.h
--- a/libpurple/protocols/mxit/roster.h
+++ b/libpurple/protocols/mxit/roster.h
@@ -74,7 +74,7 @@
 
 
 /* MXit contact flags */
-#define		MXIT_CFLAG_HIDDEN			0x02
+//#define		MXIT_CFLAG_HIDDEN			0x02		/* (DEPRECATED) */
 #define		MXIT_CFLAG_GATEWAY			0x04
 #define		MXIT_CFLAG_FOCUS_SEND_BLANK	0x20000
 



More information about the Commits mailing list