/pidgin/main: 03bb2e5cb1d0: MXit: The buddy's name was not cente...

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


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

Description:

MXit: The buddy's name was not centered vertically in the buddy-list if they did not have a status-message or mood set.

If Buddy Details is enabled, and the contact has no status-message or mood set,
mxit_status_text would returns an empty string rather than NULL.
This causes Pidgin to display an empty status message, and therfore shift
the buddy's name up slightly making it look uncentered.

diffstat:

 ChangeLog                       |   2 ++
 libpurple/protocols/mxit/mxit.c |  11 +++++------
 2 files changed, 7 insertions(+), 6 deletions(-)

diffs (40 lines):

diff --git a/ChangeLog b/ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -43,6 +43,8 @@ version 2.10.7:
 	* Remove all reference to Hidden Number.
 	* Ignore new invites to join a GroupChat if you're already joined, or
 	  still have a pending invite.
+	* The buddy's name was not centered vertically in the buddy-list if they
+	  did not have a status-message or mood set.
 
 	Yahoo!:
 	* Fix a double-free in profile/picture loading code. (Mihai Serban)
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
@@ -309,19 +309,18 @@ static const char* mxit_list_emblem( Pur
  */
 char* mxit_status_text( PurpleBuddy* buddy )
 {
+	char* text = NULL;
 	struct contact*	contact = purple_buddy_get_protocol_data(buddy);
 
 	if ( !contact )
 		return NULL;
 
-	if ( contact->statusMsg ) {
-		/* status message */
+	if ( contact->statusMsg )							/* status message */
 		return g_strdup( contact-> statusMsg );
-	}
-	else {
-		/* mood */
+	else if ( contact->mood != MXIT_MOOD_NONE )			/* mood */
 		return g_strdup( mxit_convert_mood_to_name( contact->mood ) );
-	}
+
+	return text;
 }
 
 



More information about the Commits mailing list