# HG changeset patch # User Daniel Atallah # Date 1118292147 0 # Node ID 2bda44d666410f97182354b81ec8066958e15db3 # Parent 1798ad0be4607609f52d70a742ba9c8644744c0d [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 diff -r 1798ad0be460 -r 2bda44d66641 src/gtkblist.c --- a/src/gtkblist.c Thu Jun 09 04:38:10 2005 +0000 +++ b/src/gtkblist.c Thu Jun 09 04:42:27 2005 +0000 @@ -2760,7 +2760,7 @@ /* Logged In */ signon = gaim_presence_get_login_time(presence); - if (signon > 0) + if (GAIM_BUDDY_IS_ONLINE(b) && signon > 0) { tmp = gaim_str_seconds_to_string(time(NULL) - signon); g_string_append_printf(str, _("\nLogged In: %s"), tmp); @@ -2806,7 +2806,8 @@ if (!GAIM_BUDDY_IS_ONLINE(b)) { g_string_append_printf(str, _("\nStatus: Offline")); } - else if (prpl_info && prpl_info->tooltip_text) + + if (prpl_info && prpl_info->tooltip_text) { /* Additional text from the PRPL */ const char *end; diff -r 1798ad0be460 -r 2bda44d66641 src/protocols/yahoo/yahoo.c --- 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%s: %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%s: %s"), _("Status"), escaped); + g_free(status); + g_free(escaped); + } if (stealth != NULL) g_string_append_printf(s, _("\n%s: %s"),