pidgin.mxit: 0277aa1f: If a contact did not have a status-messa...
andrew.victor at mxit.com
andrew.victor at mxit.com
Sat Aug 13 11:11:09 EDT 2011
----------------------------------------------------------------------
Revision: 0277aa1f960a0348a5696381da98307525be8b53
Parent: 335b92252f3e64385ecc93d3a4178817afdf6467
Author: andrew.victor at mxit.com
Date: 08/13/11 11:08:30
Branch: im.pidgin.pidgin.mxit
URL: http://d.pidgin.im/viewmtn/revision/info/0277aa1f960a0348a5696381da98307525be8b53
Changelog:
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.
Changes against parent 335b92252f3e64385ecc93d3a4178817afdf6467
patched libpurple/protocols/mxit/mxit.c
-------------- next part --------------
============================================================
--- libpurple/protocols/mxit/mxit.c 670231af387c6cfb68e2fde64ebbc76b7600ae02
+++ libpurple/protocols/mxit/mxit.c 0484144a2c480b0846f0727327a4b27f0b07230f
@@ -309,19 +309,18 @@ char* mxit_status_text( PurpleBuddy* bud
*/
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