[gnome-shell] workspaceThumbnails: Allow mousewheel scrolling
- From: Adel Gadllah <agadllah src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] workspaceThumbnails: Allow mousewheel scrolling
- Date: Fri, 18 Feb 2011 17:12:18 +0000 (UTC)
commit 1b4cff7cdce0129284bf810d6a76c17130bd5375
Author: Sardem FF7 <sardemff7 pub gmail com>
Date: Sat Feb 12 10:11:20 2011 +0100
workspaceThumbnails: Allow mousewheel scrolling
Allow the user to switch the active workspace by using
the mousewheel over the workspace thumbnails.
https://bugzilla.gnome.org/show_bug.cgi?id=642303
js/ui/workspacesView.js | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js
index f63e3fc..e3e2426 100644
--- a/js/ui/workspacesView.js
+++ b/js/ui/workspacesView.js
@@ -630,6 +630,9 @@ WorkspacesDisplay.prototype = {
controls.track_hover = true;
controls.connect('notify::hover',
Lang.bind(this, this._onControlsHoverChanged));
+ controls.connect('scroll-event',
+ Lang.bind(this, this._onScrollEvent));
+
this._thumbnailsBox = new WorkspaceThumbnail.ThumbnailsBox();
controls.add_actor(this._thumbnailsBox.actor);
@@ -925,6 +928,17 @@ WorkspacesDisplay.prototype = {
// 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.actionMoveWorkspaceUp();
+ break;
+ case Clutter.ScrollDirection.DOWN:
+ Main.wm.actionMoveWorkspaceDown();
+ break;
+ }
}
};
Signals.addSignalMethods(WorkspacesDisplay.prototype);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]