[gnome-settings-daemon] power: Be less chatty when optional hardware is not attached



commit c9b807382ee2e4b050357e39b681e6a2f7777187
Author: Richard Hughes <richard hughsie com>
Date:   Fri Sep 9 08:52:15 2011 +0100

    power: Be less chatty when optional hardware is not attached
    
    Resolves https://bugzilla.gnome.org/show_bug.cgi?id=658613

 plugins/power/gpm-phone.c         |    4 +---
 plugins/power/gsd-power-manager.c |    6 +++++-
 2 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/plugins/power/gpm-phone.c b/plugins/power/gpm-phone.c
index 4e635a7..d2f0fd7 100644
--- a/plugins/power/gpm-phone.c
+++ b/plugins/power/gpm-phone.c
@@ -64,10 +64,8 @@ gpm_phone_coldplug (GpmPhone *phone)
         g_return_val_if_fail (phone != NULL, FALSE);
         g_return_val_if_fail (GPM_IS_PHONE (phone), FALSE);
 
-        if (phone->priv->proxy == NULL) {
-                g_warning ("not connected");
+        if (phone->priv->proxy == NULL)
                 return FALSE;
-        }
 
         reply = g_dbus_proxy_call_sync (phone->priv->proxy, "Coldplug",
                         NULL, G_DBUS_CALL_FLAGS_NONE, -1, NULL, &error);
diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
index 9706356..d211a50 100644
--- a/plugins/power/gsd-power-manager.c
+++ b/plugins/power/gsd-power-manager.c
@@ -3095,7 +3095,11 @@ power_keyboard_proxy_ready_cb (GObject             *source_object,
                                         NULL,
                                         &error);
         if (k_now == NULL) {
-                g_warning ("Failed to get brightness: %s", error->message);
+                if (error->domain != G_DBUS_ERROR ||
+                    error->code != G_DBUS_ERROR_UNKNOWN_METHOD) {
+                        g_warning ("Failed to get brightness: %s",
+                                   error->message);
+                }
                 g_error_free (error);
                 goto out;
         }



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