gnome-screensaver r1562 - in trunk: . src



Author: mccann
Date: Wed Nov 19 18:13:43 2008
New Revision: 1562
URL: http://svn.gnome.org/viewvc/gnome-screensaver?rev=1562&view=rev

Log:
2008-11-19  William Jon McCann  <jmccann redhat com>

	* src/gs-idle-monitor.c (send_fake_event),
	(handle_alarm_notify_event), (_xsync_alarm_set):
	Use gs-debug.

	* src/test-idle-ext.c (main):
	Drop some stuff we don't need.



Modified:
   trunk/ChangeLog
   trunk/src/gs-idle-monitor.c
   trunk/src/test-idle-ext.c

Modified: trunk/src/gs-idle-monitor.c
==============================================================================
--- trunk/src/gs-idle-monitor.c	(original)
+++ trunk/src/gs-idle-monitor.c	Wed Nov 19 18:13:43 2008
@@ -36,6 +36,7 @@
 #include <gdk/gdkx.h>
 #include <gdk/gdk.h>
 
+#include "gs-debug.h"
 #include "gs-idle-monitor.h"
 
 static void gs_idle_monitor_class_init (GSIdleMonitorClass *klass);
@@ -137,6 +138,8 @@
                 return FALSE;
         }
 
+        gs_debug ("GSIdleMonitor: sending fake key");
+
         XLockDisplay (GDK_DISPLAY());
         XTestFakeKeyEvent (GDK_DISPLAY(),
                            *monitor->priv->keycode,
@@ -183,7 +186,7 @@
                 return;
         }
 
-        g_debug ("Watch %d fired, idle time = %lld",
+        gs_debug ("Watch %d fired, idle time = %lld",
                  watch->id,
                  _xsyncvalue_to_int64 (alarm_event->counter_value));
 
@@ -203,7 +206,7 @@
 
         if (! res) {
                 /* reset all timers */
-                g_debug ("GSIdleMonitor: callback returned FALSE; resetting idle time");
+                gs_debug ("GSIdleMonitor: callback returned FALSE; resetting idle time");
                 gs_idle_monitor_reset (monitor);
         }
 }
@@ -445,15 +448,23 @@
 
         attr.trigger.test_type = XSyncPositiveTransition;
         if (watch->xalarm_positive != None) {
+                gs_debug ("GSIdleMonitor: updating alarm for positive transition wait=%lld",
+                          _xsyncvalue_to_int64 (attr.trigger.wait_value));
                 XSyncChangeAlarm (GDK_DISPLAY (), watch->xalarm_positive, flags, &attr);
         } else {
+                gs_debug ("GSIdleMonitor: creating new alarm for positive transition wait=%lld",
+                          _xsyncvalue_to_int64 (attr.trigger.wait_value));
                 watch->xalarm_positive = XSyncCreateAlarm (GDK_DISPLAY (), flags, &attr);
         }
 
         attr.trigger.test_type = XSyncNegativeTransition;
         if (watch->xalarm_negative != None) {
+                gs_debug ("GSIdleMonitor: updating alarm for negative transition wait=%lld",
+                          _xsyncvalue_to_int64 (attr.trigger.wait_value));
                 XSyncChangeAlarm (GDK_DISPLAY (), watch->xalarm_negative, flags, &attr);
         } else {
+                gs_debug ("GSIdleMonitor: creating new alarm for positive transition wait=%lld",
+                          _xsyncvalue_to_int64 (attr.trigger.wait_value));
                 watch->xalarm_negative = XSyncCreateAlarm (GDK_DISPLAY (), flags, &attr);
         }
 

Modified: trunk/src/test-idle-ext.c
==============================================================================
--- trunk/src/test-idle-ext.c	(original)
+++ trunk/src/test-idle-ext.c	Wed Nov 19 18:13:43 2008
@@ -22,6 +22,7 @@
  */
 
 #include <stdlib.h>
+#include <string.h>
 
 #include <X11/Xlib.h>
 #include <X11/extensions/sync.h>
@@ -154,16 +155,6 @@
 main (int    argc,
       char **argv)
 {
-        GError *error = NULL;
-
-#ifdef ENABLE_NLS
-        bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
-# ifdef HAVE_BIND_TEXTDOMAIN_CODESET
-        bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
-# endif
-        textdomain (GETTEXT_PACKAGE);
-#endif
-
         gdk_init (&argc, &argv);
 
         init_xsync ();



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]