# HG changeset patch # User Ka-Hing Cheung # Date 1189564856 0 # Node ID b5a2938b4549db8a7add21cf0ac07c369a78e65c # Parent f6dff814d95fba9bad1a84d26621dba02fd0c6ae Fixes #2502, now we show the status name in the tooltip instead of "Status" if the buddy is not available diff -r f6dff814d95f -r b5a2938b4549 libpurple/protocols/msn/msn.c --- a/libpurple/protocols/msn/msn.c Sun Sep 09 01:42:46 2007 +0000 +++ b/libpurple/protocols/msn/msn.c Wed Sep 12 02:40:56 2007 +0000 @@ -582,13 +582,31 @@ if (purple_presence_is_online(presence)) { - const char *psm, *currentmedia; + const char *psm, *currentmedia, *name; char *tmp; psm = purple_status_get_attr_string(status, "message"); currentmedia = purple_status_get_attr_string(status, "currentmedia"); - if (psm && *psm) { + if (!purple_presence_is_available(presence)) { + name = purple_status_get_name(status); + } else { + name = NULL; + } + + if (name != NULL && *name) { + char *tmp2 = g_markup_escape_text(name, -1); + + if (psm != NULL && *psm) { + tmp = g_markup_escape_text(psm, -1); + purple_notify_user_info_add_pair(user_info, tmp2, tmp); + g_free(tmp); + } else { + purple_notify_user_info_add_pair(user_info, _("Status"), tmp2); + } + + g_free(tmp2); + } else { tmp = g_markup_escape_text(psm, -1); purple_notify_user_info_add_pair(user_info, _("Status"), tmp); g_free(tmp);