/pidgin/main: 3fa3e6160228: Backported from 3.0.0-devel:
Andrew Victor
andrew.victor at mxit.com
Sat Jul 28 18:48:58 EDT 2012
Changeset: 3fa3e616022894082cc72552c7be6006652b980c
Author: Andrew Victor <andrew.victor at mxit.com>
Date: 2012-07-28 22:22 +0200
Branch: mxit-2.x.y
URL: http://hg.pidgin.im/pidgin/main/rev/3fa3e6160228
Description:
Backported from 3.0.0-devel:
If a contact did not have a status-message or mood set, the "status_text"
callback would return an empty ("") string.
This causes the buddy list (with buddy details enabled) to display the
contact's alias not in line with the status icon - which looked odd.
Now we return NULL if there is no status-message or mood set.
(Ref: http://pidgin.im/pipermail/commits/2011-August/019653.html)
diffstat:
libpurple/protocols/mxit/mxit.c | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
diffs (30 lines):
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 */
- return g_strdup( contact-> statusMsg );
- }
- else {
- /* mood */
- return g_strdup( mxit_convert_mood_to_name( contact->mood ) );
- }
+ if ( contact->statusMsg ) /* status message */
+ text = g_strdup( contact-> statusMsg );
+ else if ( contact->mood != MXIT_MOOD_NONE ) /* mood */
+ text = g_strdup( mxit_convert_mood_to_name( contact->mood ) );
+
+ return text;
}
More information about the Commits
mailing list