changeset 12278:25d7ef365dbf

[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: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Thu, 01 Dec 2005 01:01:26 +0000
parents 739e3aca067a
children 234c25bc5d49
files src/gtkidle.c
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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 *