[Overview] Correct scroll directions on indicators

When using the scroll wheel on the workspace indicators in single view,
make them use the same interpretation as the scrollbars: scrolling up
moves to the previous workspace, scrolling down to the next one.

https://bugzilla.gnome.org/show_bug.cgi?id=607824
This commit is contained in:
Florian Müllner 2010-01-23 00:49:15 +01:00
parent 337eab614e
commit 8184b2c57b

View File

@ -707,9 +707,9 @@ SingleView.prototype = {
let direction = event.get_scroll_direction();
let activeWorkspaceIndex = global.screen.get_active_workspace_index();
let numWorkspaces = global.screen.n_workspaces;
if (direction == Clutter.ScrollDirection.UP && activeWorkspaceIndex < numWorkspaces - 1) {
if (direction == Clutter.ScrollDirection.DOWN && activeWorkspaceIndex < numWorkspaces - 1) {
this._workspaces[activeWorkspaceIndex+1]._metaWorkspace.activate(global.get_current_time());
} else if (direction == Clutter.ScrollDirection.DOWN && activeWorkspaceIndex > 0) {
} else if (direction == Clutter.ScrollDirection.UP && activeWorkspaceIndex > 0) {
this._workspaces[activeWorkspaceIndex-1]._metaWorkspace.activate(global.get_current_time());
}
}));