libgaim/idle.c

changeset 14999
7b3992f19766
parent 14254
77edc7a6191a
child 18067
ce02548a6b6a
child 20470
77693555855f
child 20472
6a6d2ef151e6
--- 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"))))
 	{

mercurial