# HG changeset patch # User Daniel Atallah # Date 1163048681 0 # Node ID 762896fc844901d25ca4f3f3c5e79cab8f9a63a8 # Parent 5025e146a87689b59c09316ff9b78f64e0fa3b1d [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. committer: Tailor Script diff -r 5025e146a876 -r 762896fc8449 libgaim/idle.c --- 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")))) {