[gnome-shell] Revert "volume.js: make slider menu items activatable"
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] Revert "volume.js: make slider menu items activatable"
- Date: Tue, 19 Jul 2011 23:47:19 +0000 (UTC)
commit d894dedaf60e665b18532aa1a3e42b3ca66cba15
Author: Rui Matos <tiagomatos gmail com>
Date: Wed Jul 20 00:45:29 2011 +0100
Revert "volume.js: make slider menu items activatable"
This reverts commit a50c30a4fde52e0173754f84f2990a4b70ca5b7a.
js/ui/popupMenu.js | 4 ++--
js/ui/status/volume.js | 31 ++-----------------------------
2 files changed, 4 insertions(+), 31 deletions(-)
---
diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js
index 1291cbe..9e256b5 100644
--- a/js/ui/popupMenu.js
+++ b/js/ui/popupMenu.js
@@ -482,8 +482,8 @@ function PopupSliderMenuItem() {
PopupSliderMenuItem.prototype = {
__proto__: PopupBaseMenuItem.prototype,
- _init: function(value, params) {
- PopupBaseMenuItem.prototype._init.call(this, params ? params : { activate: false });
+ _init: function(value) {
+ PopupBaseMenuItem.prototype._init.call(this, { activate: false });
this.actor.connect('key-press-event', Lang.bind(this, this._onKeyPressEvent));
diff --git a/js/ui/status/volume.js b/js/ui/status/volume.js
index 438a872..bd74cd9 100644
--- a/js/ui/status/volume.js
+++ b/js/ui/status/volume.js
@@ -41,7 +41,7 @@ Indicator.prototype = {
this._outputVolumeId = 0;
this._outputMutedId = 0;
this._outputTitle = new PopupMenu.PopupMenuItem(_("Volume"), { reactive: false });
- this._outputSlider = new VolumeSliderMenuItem(0);
+ this._outputSlider = new PopupMenu.PopupSliderMenuItem(0);
this._outputSlider.connect('value-changed', Lang.bind(this, this._sliderChanged, '_output'));
this._outputSlider.connect('drag-end', Lang.bind(this, this._notifyVolumeChange));
this.menu.addMenuItem(this._outputTitle);
@@ -54,7 +54,7 @@ Indicator.prototype = {
this._inputVolumeId = 0;
this._inputMutedId = 0;
this._inputTitle = new PopupMenu.PopupMenuItem(_("Microphone"), { reactive: false });
- this._inputSlider = new VolumeSliderMenuItem(0);
+ this._inputSlider = new PopupMenu.PopupSliderMenuItem(0);
this._inputSlider.connect('value-changed', Lang.bind(this, this._sliderChanged, '_input'));
this._inputSlider.connect('drag-end', Lang.bind(this, this._notifyVolumeChange));
this.menu.addMenuItem(this._inputTitle);
@@ -231,30 +231,3 @@ Indicator.prototype = {
this.setIcon(this._volumeToIcon(this._output.volume));
}
};
-
-function VolumeSliderMenuItem() {
- this._init.apply(this, arguments);
-}
-
-VolumeSliderMenuItem.prototype = {
- __proto__: PopupMenu.PopupSliderMenuItem.prototype,
-
- _init: function(value) {
- PopupMenu.PopupSliderMenuItem.prototype._init.call(this, value, { activate: true });
-
- this.actor.connect('motion-event', Lang.bind(this, this._onMotionEvent));
- },
-
- activate: function(event) {
- this._motionEvent(this.actor, event);
- this.emit('drag-end');
- this.emit('activate', event);
- },
-
- _onMotionEvent: function(actor, event) {
- let button_pressed = Shell.get_event_state(event) & Clutter.ModifierType.BUTTON1_MASK;
- if (button_pressed && !this._dragging)
- return this._motionEvent(actor, event);
- return false;
- }
-};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]