Mercurial > pidgin.yaz
changeset 10498:aba3000cc50a
[gaim-migrate @ 11790]
Show available messages in oscar tooltips correctly again.
And remove an extra "if (!gaim_status_is_active(status)) return"
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 09 Jan 2005 20:06:25 +0000 |
parents | e6b87f7e8988 |
children | d0c336ad0b27 |
files | src/protocols/oscar/oscar.c |
diffstat | 1 files changed, 8 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/protocols/oscar/oscar.c Sun Jan 09 20:05:08 2005 +0000 +++ b/src/protocols/oscar/oscar.c Sun Jan 09 20:06:25 2005 +0000 @@ -699,15 +699,13 @@ OscarData *od; GaimAccount *account; GaimPresence *presence; - GaimPresence *buddy_presence; + GaimStatus *status; GaimGroup *g = NULL; struct buddyinfo *bi = NULL; char *tmp; od = gc->proto_data; account = gaim_connection_get_account(gc); - presence = gaim_account_get_presence(account); - buddy_presence = gaim_buddy_get_presence(b); if ((str == NULL) || (newline == NULL) || ((b == NULL) && (userinfo == NULL))) return; @@ -719,13 +717,17 @@ b = gaim_find_buddy(account, userinfo->sn); if (b != NULL) + { g = gaim_find_buddys_group(b); + presence = gaim_buddy_get_presence(b); + status = gaim_presence_get_active_status(presence); + } if (userinfo != NULL) bi = g_hash_table_lookup(od->buddyinfo, gaim_normalize(account, userinfo->sn)); if (b != NULL) { - if (gaim_presence_is_online(buddy_presence)) { + if (gaim_presence_is_online(presence)) { if (aim_sn_is_icq(b->name)) { tmp = oscar_icqstatus((b->uc & 0xffff0000) >> 16); oscar_string_append(str, newline, _("Status"), tmp); @@ -766,7 +768,7 @@ } } - if ((bi != NULL) && (bi->availmsg != NULL) && gaim_presence_is_available(presence)) { + if ((bi != NULL) && (bi->availmsg != NULL) && gaim_status_is_available(status)) { tmp = g_markup_escape_text(bi->availmsg, strlen(bi->availmsg)); oscar_string_append(str, newline, _("Available"), tmp); g_free(tmp); @@ -5673,9 +5675,6 @@ status_id = gaim_status_get_id(status); presence = gaim_account_get_presence(account); - if (!gaim_status_is_active(status)) /* Is this right? I'm confused. */ - return; - gaim_debug_info("oscar", "Setting status to %s\n", status_id); if (gc) @@ -5797,7 +5796,7 @@ GaimStatusType *type = gaim_status_get_type(status); int primitive = gaim_status_type_get_primitive(type); - if(!gaim_status_is_active(status)) + if (!gaim_status_is_active(status)) return; if (primitive == !GAIM_STATUS_OFFLINE && !gc) {