Mercurial > pidgin
diff src/protocols/bonjour/bonjour.c @ 12339:fdac1c5e6c68
[gaim-migrate @ 14643]
Don't show offline bonjour uses as away. Of course, the only time you
would ever have an offline bonjour user is if you add some random person
to your buddy list
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 05 Dec 2005 03:42:48 +0000 |
parents | 4d3119205a33 |
children | 488a305f9aff |
line wrap: on
line diff
--- a/src/protocols/bonjour/bonjour.c Mon Dec 05 03:35:28 2005 +0000 +++ b/src/protocols/bonjour/bonjour.c Mon Dec 05 03:42:48 2005 +0000 @@ -39,6 +39,12 @@ #include "jabber.h" #include "buddy.h" +/* + * TODO: Should implement an add_buddy callback that removes the buddy + * from the local list. Bonjour manages buddies for you, and + * adding someone locally by hand is stupid. + */ + static char *default_firstname; static char *default_lastname; static char *default_hostname; @@ -281,7 +287,7 @@ presence = gaim_buddy_get_presence(buddy); - if (!gaim_presence_is_available(presence)) + if (gaim_presence_is_online(presence) && !gaim_presence_is_available(presence)) *se = "away"; } @@ -292,10 +298,10 @@ presence = gaim_buddy_get_presence(buddy); - if (gaim_presence_is_available(presence)) - return g_strdup(""); - else + if (gaim_presence_is_online(presence) && !gaim_presence_is_available(presence)) return g_strdup("Away"); + + return NULL; } static char *