volume: Fix initial visibility of input
Currently the visibility of input volume is only updated when a stream is added/removed - apparently no one noticed until now, as in the normal user session we get away with this as long as we have some startup sound, but this is not the case in the lock screen, so we may end up showing input volume incorrectly. https://bugzilla.gnome.org/show_bug.cgi?id=684611
This commit is contained in:
parent
6a739afd25
commit
908bf3b117
@ -63,10 +63,7 @@ const VolumeMenu = new Lang.Class({
|
|||||||
this.addMenuItem(this._inputTitle);
|
this.addMenuItem(this._inputTitle);
|
||||||
this.addMenuItem(this._inputSlider);
|
this.addMenuItem(this._inputSlider);
|
||||||
|
|
||||||
if (this._control.get_state() == Gvc.MixerControlState.READY) {
|
this._onControlStateChanged();
|
||||||
this._readOutput();
|
|
||||||
this._readInput();
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
scroll: function(direction) {
|
scroll: function(direction) {
|
||||||
@ -95,6 +92,7 @@ const VolumeMenu = new Lang.Class({
|
|||||||
if (this._control.get_state() == Gvc.MixerControlState.READY) {
|
if (this._control.get_state() == Gvc.MixerControlState.READY) {
|
||||||
this._readOutput();
|
this._readOutput();
|
||||||
this._readInput();
|
this._readInput();
|
||||||
|
this._maybeShowInput();
|
||||||
} else {
|
} else {
|
||||||
this.emit('icon-changed', null);
|
this.emit('icon-changed', null);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user