Thu, 09 Nov 2006 05:04:41 +0000
[gaim-migrate @ 17709]
If we're not reporting idleness, we should still be able to auto-away.
If "system" idleness is available, use it to determine when to go away; otherwise use "gaim" idleness.
| libgaim/idle.c | file | annotate | diff | comparison | revisions |
--- a/libgaim/idle.c Thu Nov 09 04:49:54 2006 +0000 +++ b/libgaim/idle.c Thu Nov 09 05:04:41 2006 +0000 @@ -143,6 +143,16 @@ /* Auto-away stuff */ auto_away = gaim_prefs_get_bool("/core/away/away_when_idle"); + + /* If we're not reporting idle, we can still do auto-away. + * First try "system" and if that isn't possible, use "gaim" */ + if (!report_idle && auto_away) { + if ((idle_ui_ops != NULL) && (idle_ui_ops->get_time_idle != NULL)) + time_idle = idle_ui_ops->get_time_idle(); + else + time_idle = time(NULL) - last_active_time; + } + if (auto_away && (time_idle > (60 * gaim_prefs_get_int("/core/away/mins_before_away")))) {