gaim/gaim

c185fbbafed9
Parents 397a81a11ddd
Children 7de1ace6a7a9
Don't emit buddy-idle/unidle/away/back signals if the buddy actually just
signed off.
--- a/src/blist.c Sat May 14 15:33:56 2005 -0400
+++ b/src/blist.c Sat May 14 16:00:47 2005 -0400
@@ -247,7 +247,8 @@
buddy->uc = status;
gaim_contact_compute_priority_buddy(gaim_buddy_get_contact(buddy));
- if ((status & UC_UNAVAILABLE) != (old_status & UC_UNAVAILABLE)) {
+ if ((buddy->present != GAIM_BUDDY_SIGNING_OFF) && (buddy->present != GAIM_BUDDY_OFFLINE) &&
+ ((status & UC_UNAVAILABLE) != (old_status & UC_UNAVAILABLE))) {
if (status & UC_UNAVAILABLE)
gaim_signal_emit(gaim_blist_get_handle(), "buddy-away", buddy);
else
--- a/src/server.c Sat May 14 15:33:56 2005 -0400
+++ b/src/server.c Sat May 14 16:00:47 2005 -0400
@@ -1270,7 +1270,7 @@
current_time, tmp);
g_free(tmp);
}
- } else if (old_idle && !idle) {
+ } else if (old_idle && !idle && !signing_off) {
if(gaim_prefs_get_bool("/core/logging/log_system") &&
gaim_prefs_get_bool("/core/logging/log_idle_state")) {
GaimAccount *account = gaim_connection_get_account(gc);
@@ -1318,6 +1318,7 @@
gaim_blist_update_buddy_signon(b, signon);
gaim_blist_update_buddy_idle(b, idle);
gaim_blist_update_buddy_evil(b, evil);
+ gaim_blist_update_buddy_presence(b, loggedin);
gaim_blist_update_buddy_status(b, type);
if (!old_idle && idle)
@@ -1328,7 +1329,8 @@
}
else if (old_idle && !idle)
{
- gaim_signal_emit(gaim_blist_get_handle(), "buddy-unidle", b);
+ if (!signing_off)
+ gaim_signal_emit(gaim_blist_get_handle(), "buddy-unidle", b);
remove_idle_buddy(b);
}
@@ -1336,8 +1338,6 @@
if (c != NULL)
gaim_conversation_update(c, GAIM_CONV_UPDATE_AWAY);
- gaim_blist_update_buddy_presence(b, loggedin);
-
for (buddies = gaim_find_buddies(account, name); buddies; buddies = g_slist_remove(buddies, buddies->data)) {
b = buddies->data;
gaim_blist_update_buddy_presence(b, loggedin);