[gnome-settings-daemon] media-keys: Don't show a level when muted



commit 7492d534e67ac70305566b398b4fd76745f21c31
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Sep 7 18:18:24 2011 +0100

    media-keys: Don't show a level when muted
    
    As discussed in:
    https://bugzilla.gnome.org/show_bug.cgi?id=644537#c4

 plugins/media-keys/gsd-media-keys-manager.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/plugins/media-keys/gsd-media-keys-manager.c b/plugins/media-keys/gsd-media-keys-manager.c
index 69afaad..3a5c3cb 100644
--- a/plugins/media-keys/gsd-media-keys-manager.c
+++ b/plugins/media-keys/gsd-media-keys-manager.c
@@ -622,8 +622,12 @@ update_dialog (GsdMediaKeysManager *manager,
                gboolean sound_changed,
                gboolean quiet)
 {
-        vol = (int) (100 * (double) vol / PA_VOLUME_NORM);
-        vol = CLAMP (vol, 0, 100);
+        if (!muted) {
+                vol = (int) (100 * (double) vol / PA_VOLUME_NORM);
+                vol = CLAMP (vol, 0, 100);
+        } else {
+                vol = 0.0;
+        }
 
         dialog_init (manager);
         gsd_media_keys_window_set_volume_muted (GSD_MEDIA_KEYS_WINDOW (manager->priv->dialog),



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