# HG changeset patch # User Mark Doliner # Date 1133754168 0 # Node ID fdac1c5e6c6840e26bf59b799219a89c77e8b7c2 # Parent 1f6aac8205408835faac761121f6cd3e6533f299 [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 diff -r 1f6aac820540 -r fdac1c5e6c68 src/protocols/bonjour/bonjour.c --- 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 *