[gnome-shell/wip/re-search: 138/151] workspaceThumbnail: React to scroll event
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/re-search: 138/151] workspaceThumbnail: React to scroll event
- Date: Thu, 1 Nov 2012 17:00:09 +0000 (UTC)
commit 96191a9c966ca415ebf36dff6f19d7f786395ec0
Author: Tanner Doshier <doshitan gmail com>
Date: Wed Jul 25 15:15:26 2012 -0500
workspaceThumbnail: React to scroll event
https://bugzilla.gnome.org/show_bug.cgi?id=682050
js/ui/workspaceThumbnail.js | 13 +++++++++++++
js/ui/workspacesView.js | 13 -------------
2 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/js/ui/workspaceThumbnail.js b/js/ui/workspaceThumbnail.js
index 8487208..9697aa1 100644
--- a/js/ui/workspaceThumbnail.js
+++ b/js/ui/workspaceThumbnail.js
@@ -541,6 +541,8 @@ const ThumbnailsBox = new Lang.Class({
this.actor.connect('button-press-event', function() { return true; });
this.actor.connect('button-release-event', Lang.bind(this, this._onButtonRelease));
+ this.actor.connect('scroll-event',
+ Lang.bind(this, this._onScrollEvent));
Main.overview.connect('app-drag-begin',
Lang.bind(this, this._onDragBegin));
@@ -1186,5 +1188,16 @@ const ThumbnailsBox = new Lang.Class({
},
onCompleteScope: this
});
+ },
+
+ _onScrollEvent: function (actor, event) {
+ switch (event.get_scroll_direction()) {
+ case Clutter.ScrollDirection.UP:
+ Main.wm.actionMoveWorkspace(Meta.MotionDirection.UP);
+ break;
+ case Clutter.ScrollDirection.DOWN:
+ Main.wm.actionMoveWorkspace(Meta.MotionDirection.DOWN);
+ break;
+ }
}
});
diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js
index 79f0ff7..039ad9b 100644
--- a/js/ui/workspacesView.js
+++ b/js/ui/workspacesView.js
@@ -471,8 +471,6 @@ const WorkspacesDisplay = new Lang.Class({
controls.track_hover = true;
controls.connect('notify::hover',
Lang.bind(this, this._onControlsHoverChanged));
- controls.connect('scroll-event',
- Lang.bind(this, this._onScrollEvent));
this._primaryIndex = Main.layoutManager.primaryIndex;
@@ -1024,17 +1022,6 @@ const WorkspacesDisplay = new Lang.Class({
// might as well avoid it.
Meta.later_add(Meta.LaterType.BEFORE_REDRAW,
Lang.bind(this, this._updateZoom));
- },
-
- _onScrollEvent: function (actor, event) {
- switch ( event.get_scroll_direction() ) {
- case Clutter.ScrollDirection.UP:
- Main.wm.actionMoveWorkspace(Meta.MotionDirection.UP);
- break;
- case Clutter.ScrollDirection.DOWN:
- Main.wm.actionMoveWorkspace(Meta.MotionDirection.DOWN);
- break;
- }
}
});
Signals.addSignalMethods(WorkspacesDisplay.prototype);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]