[gnome-settings-daemon/gnome-3-6] power: fix a warning at startup



commit 179a11eea29872cf8f46543ca576024f0c4b120d
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Tue Nov 13 08:55:10 2012 -0500

    power: fix a warning at startup
    
    idle_configure() will call idle_is_session_inhibited(), which will warn
    if the session proxy is not available. This will always be the case when
    idle_configure() is called at startup, since we create it
    asynchronously, so we'll always warn.
    Remove the warning by moving the idle_configure() call to the session
    proxy ready callback.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=688253

 plugins/power/gsd-power-manager.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
index 1c594d8..3396bb8 100644
--- a/plugins/power/gsd-power-manager.c
+++ b/plugins/power/gsd-power-manager.c
@@ -3363,10 +3363,12 @@ session_proxy_ready_cb (GObject *source_object,
                 g_warning ("Could not connect to gnome-session: %s",
                            error->message);
                 g_error_free (error);
-                return;
+        } else {
+                g_signal_connect (manager->priv->session_proxy, "g-signal",
+                                  G_CALLBACK (idle_dbus_signal_cb), manager);
         }
-        g_signal_connect (manager->priv->session_proxy, "g-signal",
-                          G_CALLBACK (idle_dbus_signal_cb), manager);
+
+        idle_configure (manager);
 }
 
 static void
@@ -3907,7 +3909,6 @@ gsd_power_manager_start (GsdPowerManager *manager,
 
         /* coldplug the engine */
         engine_coldplug (manager);
-        idle_configure (manager);
 
         /* set the initial dim time that can adapt for the user */
         refresh_idle_dim_settings (manager);



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