[gnome-settings-daemon] media-keys: Really fix warning with brightness keys



commit 81ae3f1865eb7e2edaf98ce960e93966c4a56797
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Jul 5 15:43:51 2013 +0200

    media-keys: Really fix warning with brightness keys
    
    https://bugzilla.gnome.org/show_bug.cgi?id=703623

 plugins/media-keys/gsd-media-keys-manager.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/plugins/media-keys/gsd-media-keys-manager.c b/plugins/media-keys/gsd-media-keys-manager.c
index 8e81d89..9d463d8 100644
--- a/plugins/media-keys/gsd-media-keys-manager.c
+++ b/plugins/media-keys/gsd-media-keys-manager.c
@@ -1837,7 +1837,7 @@ update_screen_cb (GObject             *source_object,
                   gpointer             user_data)
 {
         GError *error = NULL;
-        guint percentage;
+        int percentage;
         GVariant *new_percentage;
         GsdMediaKeysManager *manager = GSD_MEDIA_KEYS_MANAGER (user_data);
 
@@ -1851,8 +1851,9 @@ update_screen_cb (GObject             *source_object,
         }
 
         /* update the dialog with the new value */
-        g_variant_get (new_percentage, "(u)", &percentage);
-        show_osd (manager, "display-brightness-symbolic", NULL, percentage);
+        g_variant_get (new_percentage, "(i)", &percentage);
+        if (percentage >= 0)
+                show_osd (manager, "display-brightness-symbolic", NULL, percentage);
         g_variant_unref (new_percentage);
 }
 


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