[gaim-migrate @ 14582]

Thu, 01 Dec 2005 01:01:26 +0000

author
Sadrul Habib Chowdhury <sadrul@pidgin.im>
date
Thu, 01 Dec 2005 01:01:26 +0000
changeset 12278
21bcbadf956d
parent 12277
6e45a609022c
child 12279
9418540cb3bb

[gaim-migrate @ 14582]
sf patch #1370473, from Sadrul Habib Chowdhury
"This patch fixes the idle time tracking for systems
that don't use xscreensaver."

Seems like it would just get rid of some warnings? But
whatever, definitely an improvement

committer: Mark Doliner <markdoliner@pidgin.im>

src/gtkidle.c file | annotate | diff | comparison | revisions
--- a/src/gtkidle.c	Thu Dec 01 00:36:19 2005 +0000
+++ b/src/gtkidle.c	Thu Dec 01 01:01:26 2005 +0000
@@ -57,10 +57,10 @@
  *
  * @return The number of seconds the user has been idle.
  */
+#ifdef USE_SCREENSAVER
 static time_t
 gaim_gtk_get_time_idle()
 {
-#ifdef USE_SCREENSAVER
 # ifndef _WIN32
 	/* Query xscreensaver */
 	static XScreenSaverInfo *mit_info = NULL;
@@ -77,12 +77,16 @@
 	/* Query windows */
 	return (GetTickCount() - wgaim_get_lastactive()) / 1000;
 # endif /* _WIN32 */
+}
 #endif /* USE_SCREENSAVER */
-}
 
 static GaimIdleUiOps ui_ops =
 {
+#ifdef USE_SCREENSAVER
 	gaim_gtk_get_time_idle
+#else
+	NULL
+#endif /* USE_SCREENSAVER */
 };
 
 GaimIdleUiOps *

mercurial