[gnome-session] presence: Add better debug



commit a64d01db925f5b444aaf1fe6b9c5f977b59db7a9
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Jan 23 15:50:59 2013 +0100

    presence: Add better debug
    
    https://bugzilla.gnome.org/show_bug.cgi?id=692395

 gnome-session/gsm-presence.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/gnome-session/gsm-presence.c b/gnome-session/gsm-presence.c
index 5aa6621..9266205 100644
--- a/gnome-session/gsm-presence.c
+++ b/gnome-session/gsm-presence.c
@@ -133,6 +133,7 @@ set_session_idle (GsmPresence   *presence,
 
                 /* restore saved status */
                 gsm_presence_set_status (presence, presence->priv->saved_status, NULL);
+                g_debug ("GsmPresence: setting non-idle status %d", presence->priv->saved_status);
                 presence->priv->saved_status = GSM_PRESENCE_STATUS_AVAILABLE;
         }
 }
@@ -157,7 +158,7 @@ static void
 reset_idle_watch (GsmPresence  *presence)
 {
         if (presence->priv->idle_watch_id > 0) {
-                g_debug ("GsmPresence: removing idle watch");
+                g_debug ("GsmPresence: removing idle watch (%i)", presence->priv->idle_watch_id);
                 gnome_idle_monitor_remove_watch (presence->priv->idle_monitor,
                                                  presence->priv->idle_watch_id);
                 presence->priv->idle_watch_id = 0;
@@ -166,13 +167,14 @@ reset_idle_watch (GsmPresence  *presence)
         if (! presence->priv->screensaver_active
             && presence->priv->idle_enabled
             && presence->priv->idle_timeout > 0) {
-                g_debug ("GsmPresence: adding idle watch");
-
                 presence->priv->idle_watch_id = gnome_idle_monitor_add_watch (presence->priv->idle_monitor,
                                                                               presence->priv->idle_timeout,
                                                                               idle_became_idle_cb,
                                                                               presence,
                                                                               NULL);
+                g_debug ("GsmPresence: adding idle watch (%i) for %d secs",
+                         presence->priv->idle_watch_id,
+                         presence->priv->idle_timeout / 1000);
         }
 }
 
@@ -223,6 +225,9 @@ on_bus_name_owner_changed (DBusGProxy  *bus_proxy,
         } else if (strlen (old_service_name) == 0
                    && strlen (new_service_name) > 0) {
                 /* service added */
+
+                g_debug ("Detected that screensaver has appeared on the bus");
+
                 error = NULL;
                 presence->priv->screensaver_proxy = dbus_g_proxy_new_for_name_owner (presence->priv->bus_connection,
                                                                                      GS_NAME,



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