# HG changeset patch # User Christian Hammond # Date 1086660305 0 # Node ID 7ae39c31e4011374a0eabb896e6ae546c0b6bc11 # Parent f18eb3f22733bc35fa0e5f17bdb03ca03c9e21b7 [gaim-migrate @ 10031] Revert that for now. I didn't take into account buddys being removed. committer: Tailor Script diff -r f18eb3f22733 -r 7ae39c31e401 src/gtkblist.c --- a/src/gtkblist.c Tue Jun 08 02:02:25 2004 +0000 +++ b/src/gtkblist.c Tue Jun 08 02:05:05 2004 +0000 @@ -3541,6 +3541,8 @@ idle = g_strdup_printf("(%d:%02d)", ihrs, imin); else idle = g_strdup_printf("(%d)", imin); + + gaim_signal_emit(gaim_blist_get_handle(), "buddy-idle-updated", buddy); } if (buddy->evil > 0) diff -r f18eb3f22733 -r 7ae39c31e401 src/server.c --- a/src/server.c Tue Jun 08 02:02:25 2004 +0000 +++ b/src/server.c Tue Jun 08 02:05:05 2004 +0000 @@ -1055,27 +1055,7 @@ g_free(message); } -/* - * NOTE: This is a bit hacky, but needed for core support for the - * buddy-idle-updated signal. It's temporary, and will be replaced - * with better code in the status rewrite. - */ -static GList *idle_buddies = NULL; -static guint idle_buddy_timeout_id = 0; -static gboolean -idle_timeout_cb(void) -{ - GList *l; - - for (l = idle_buddies; l != NULL; l = l->next) - { - gaim_signal_emit(gaim_blist_get_handle(), "buddy-idle-updated", - l->data); - } - - return TRUE; -} void serv_got_update(GaimConnection *gc, const char *name, int loggedin, int evil, time_t signon, time_t idle, int type) @@ -1239,26 +1219,14 @@ if (!old_idle && idle) { gaim_signal_emit(gaim_blist_get_handle(), "buddy-idle", b); - - idle_buddies = g_list_append(idle_buddies, b); - - if (idle_buddy_timeout_id == 0) - { - idle_buddy_timeout_id = gaim_timeout_add(10000, - (GSourceFunc)idle_timeout_cb, NULL); - } } else if (old_idle && !idle) { gaim_signal_emit(gaim_blist_get_handle(), "buddy-unidle", b); - - idle_buddies = g_list_remove(idle_buddies, b); - - if (idle_buddies == NULL) - { - gaim_timeout_remove(idle_buddy_timeout_id); - idle_buddy_timeout_id = 0; - } + } + else if (old_idle != idle) + { + gaim_signal_emit(gaim_blist_get_handle(), "buddy-idle-updated", b); } if (c != NULL)