[gnome-shell] Fix audio volume icon
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [gnome-shell] Fix audio volume icon
- Date: Fri, 22 Oct 2010 14:04:41 +0000 (UTC)
commit 6b47b78d4d220bd7fa44ab4a8fd1ab5671d9d7f1
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Fri Oct 22 15:31:58 2010 +0200
    Fix audio volume icon
    
    _volumeChanged should not update the icon if the sink is muted.
    Fixes the case when shell is started with a muted sink (_mutedChanged
    is called before _volumeChanged).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=632868
 js/ui/status/volume.js |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/status/volume.js b/js/ui/status/volume.js
index 15cc1f1..be8abd6 100644
--- a/js/ui/status/volume.js
+++ b/js/ui/status/volume.js
@@ -102,7 +102,6 @@ Indicator.prototype = {
             this._outputVolumeId = this._output.connect('notify::volume', Lang.bind(this, this._volumeChanged, '_output'));
             this._mutedChanged (null, null, '_output');
             this._volumeChanged (null, null, '_output');
-            this.setIcon(this._volumeToIcon(this._output.volume));
         } else {
             this._outputSwitch.label.text = _("Output: Muted");
             this._outputSwitch.setToggleState(false);
@@ -208,7 +207,7 @@ Indicator.prototype = {
     _volumeChanged: function(object, param_spec, property) {
         this[property+'Slider'].setValue(this[property].volume / VOLUME_MAX);
         this._updateLabel(property);
-        if (property == '_output')
+        if (property == '_output' && !this._output.is_muted)
             this.setIcon(this._volumeToIcon(this._output.volume));
     },
 
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]