Mercurial > pidgin.yaz
diff src/status.c @ 11935:cb73483c9f63
[gaim-migrate @ 14226]
Here are buddy-status-changed and buddy-idle-changed signals, to replace
buddy-away, buddy-back, buddy-idle, and buddy-unidle. It it now possible to
detect when a buddy goes from one away-state to another away-state without
coming back in between.
I'm not really sure I like how buddy-idle-changed works here, but it felt
better to keep it consistent. It currently only fires on idle and unidle and
not on just-more-idle, though that's easy to change if we decide plugins might
want to know as idle time increases.
I think I got all the doxygen and ChangeLog.API stuff, someone yell if I
missed something.
committer: Tailor Script <tailor@pidgin.im>
author | Etan Reisner <pidgin@unreliablesource.net> |
---|---|
date | Mon, 31 Oct 2005 22:02:30 +0000 |
parents | 58b8251c3d60 |
children | 0fab529c01fc |
line wrap: on
line diff
--- a/src/status.c Mon Oct 31 20:35:59 2005 +0000 +++ b/src/status.c Mon Oct 31 22:02:30 2005 +0000 @@ -1263,8 +1263,6 @@ if (!old_idle && idle) { - gaim_signal_emit(gaim_blist_get_handle(), "buddy-idle", buddy); - if (gaim_prefs_get_bool("/core/logging/log_system")) { GaimLog *log = gaim_account_get_log(buddy->account); @@ -1278,8 +1276,6 @@ } else if (old_idle && !idle) { - gaim_signal_emit(gaim_blist_get_handle(), "buddy-unidle", buddy); - if (gaim_prefs_get_bool("/core/logging/log_system")) { GaimLog *log = gaim_account_get_log(buddy->account); @@ -1292,6 +1288,10 @@ } } + if (old_idle != idle) + gaim_signal_emit(gaim_blist_get_handle(), "buddy-idle-changed", buddy, + old_idle, idle); + gaim_contact_invalidate_priority_buddy(gaim_buddy_get_contact(buddy)); if (ops != NULL && ops->update != NULL)