[gnome-shell] Reverting "volume: Put canberra sound events on output streams only"
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] Reverting "volume: Put canberra sound events on output streams only"
- Date: Fri, 21 Dec 2012 18:29:21 +0000 (UTC)
commit 6adf5cbee55a8bac7d0df4e88abdd18bf7c4cb2a
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Fri Dec 21 13:28:40 2012 -0500
Reverting "volume: Put canberra sound events on output streams only"
This reverts commit 1964b546278277bbcde187a1b672ae7893b38eed.
This was committed accidentally.
js/ui/status/volume.js | 16 ++++++----------
1 files changed, 6 insertions(+), 10 deletions(-)
---
diff --git a/js/ui/status/volume.js b/js/ui/status/volume.js
index 6376889..b08f3d6 100644
--- a/js/ui/status/volume.js
+++ b/js/ui/status/volume.js
@@ -38,6 +38,7 @@ const StreamSlider = new Lang.Class({
this._title = new PopupMenu.PopupMenuItem(title, { reactive: false });
this._slider = new PopupMenu.PopupSliderMenuItem(0);
this._slider.connect('value-changed', Lang.bind(this, this._sliderChanged));
+ this._slider.connect('drag-end', Lang.bind(this, this._notifyVolumeChange));
this.item.addMenuItem(this._title);
this.item.addMenuItem(this._slider);
@@ -116,6 +117,11 @@ const StreamSlider = new Lang.Class({
this._stream.push_volume();
},
+ _notifyVolumeChange: function() {
+ global.cancel_theme_sound(VOLUME_NOTIFY_ID);
+ global.play_theme_sound(VOLUME_NOTIFY_ID, 'audio-volume-change');
+ },
+
_updateVolume: function() {
let muted = this._stream.is_muted;
this._slider.setValue(muted ? 0 : (this._stream.volume / this._control.get_vol_max_norm()));
@@ -145,11 +151,6 @@ const OutputStreamSlider = new Lang.Class({
Name: 'OutputStreamSlider',
Extends: StreamSlider,
- _init: function(control, title) {
- this.parent(control, title);
- this._slider.connect('drag-end', Lang.bind(this, this._notifyVolumeChange));
- },
-
_connectStream: function(stream) {
this.parent(stream);
this._portChangedId = stream.connect('notify::port', Lang.bind(this, this._portChanged));
@@ -178,11 +179,6 @@ const OutputStreamSlider = new Lang.Class({
this._portChangedId = 0;
},
- _notifyVolumeChange: function() {
- global.cancel_theme_sound(VOLUME_NOTIFY_ID);
- global.play_theme_sound(VOLUME_NOTIFY_ID, 'audio-volume-change');
- },
-
_portChanged: function() {
let hasHeadphones = this._findHeadphones(this._stream);
if (hasHeadphones != this._hasHeadphones) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]