Mercurial > pidgin
diff src/protocols/yahoo/yahoo.c @ 10992:2bda44d66641
[gaim-migrate @ 12830]
Try to get the prpl tooltip_text even if the buddy is logged off. This doesn't appear to cause any problems with the existing prpls, but I didn't exactly go over them with a fine tooth comb ... if you know what I mean.
committer: Tailor Script <tailor@pidgin.im>
| author | Daniel Atallah <daniel.atallah@gmail.com> |
|---|---|
| date | Thu, 09 Jun 2005 04:42:27 +0000 |
| parents | b4919e8c634c |
| children | 50224ac8184d |
line wrap: on
line diff
--- a/src/protocols/yahoo/yahoo.c Thu Jun 09 04:38:10 2005 +0000 +++ b/src/protocols/yahoo/yahoo.c Thu Jun 09 04:42:27 2005 +0000 @@ -2662,7 +2662,7 @@ char *yahoo_tooltip_text(GaimBuddy *b) { YahooFriend *f; - char *escaped, *status, *stealth = NULL; + char *escaped, *status = NULL, *stealth = NULL; GString *s = g_string_new(""); f = yahoo_friend_find(b->account->gc, b->name); @@ -2681,6 +2681,8 @@ return NULL; status = g_strdup(yahoo_friend_get_status_message(f)); break; + case YAHOO_STATUS_OFFLINE: + break; default: status = g_strdup(yahoo_get_status_string(f->status)); break; @@ -2700,10 +2702,12 @@ } } - escaped = g_markup_escape_text(status, strlen(status)); - g_string_append_printf(s, _("\n<b>%s:</b> %s"), _("Status"), escaped); - g_free(status); - g_free(escaped); + if (status != NULL) { + escaped = g_markup_escape_text(status, strlen(status)); + g_string_append_printf(s, _("\n<b>%s:</b> %s"), _("Status"), escaped); + g_free(status); + g_free(escaped); + } if (stealth != NULL) g_string_append_printf(s, _("\n<b>%s:</b> %s"),
