# HG changeset patch # User Richard Laager # Date 1137654379 0 # Node ID 07eaae27e674c8fcee43145a8fe582167e3ed728 # Parent 82e9184449658ee097fcceaa04fafee24a3c9e08 [gaim-migrate @ 15297] I hate seeing Jabber statuses (from Adium, IIRC) that say: "Away: Away" committer: Tailor Script diff -r 82e918444965 -r 07eaae27e674 src/protocols/jabber/jabber.c --- a/src/protocols/jabber/jabber.c Thu Jan 19 07:01:58 2006 +0000 +++ b/src/protocols/jabber/jabber.c Thu Jan 19 07:06:19 2006 +0000 @@ -1040,6 +1040,7 @@ for(l=jb->resources; l; l = l->next) { char *text = NULL; char *res = NULL; + const char *state; jbr = l->data; @@ -1055,16 +1056,21 @@ if(jbr->name) res = g_strdup_printf(" (%s)", jbr->name); + state = jabber_buddy_state_get_name(jbr->state); + if (text != NULL && !gaim_utf8_strcasecmp(state, text)) { + g_free(text); + text = NULL; + } + g_string_append_printf(ret, "\n%s%s: %s%s%s", _("Status"), res ? res : "", - jabber_buddy_state_get_name(jbr->state), + state, text ? ": " : "", text ? text : ""); - if(text) - g_free(text); - if(res) - g_free(res); + + g_free(text); + g_free(res); } if(!GAIM_BUDDY_IS_ONLINE(b) && jb->error_msg) {