[gnome-shell] windowMenu: Reinstate left/right window movement
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] windowMenu: Reinstate left/right window movement
- Date: Tue, 23 Jun 2015 00:58:05 +0000 (UTC)
commit cca528a630e5b1668151faf51d755ffd40c3811f
Author: Ron Yorston <rmy pobox com>
Date: Mon Jun 22 22:10:50 2015 +0100
windowMenu: Reinstate left/right window movement
The menu items to move a window to the left/right workspaces were
removed when the window menu was implemented in GNOME Shell. This
is OK for the default vertical layout but not for alternatives.
https://bugzilla.gnome.org/show_bug.cgi?id=751344
js/ui/windowMenu.js | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/windowMenu.js b/js/ui/windowMenu.js
index 1f26eb4..001047a 100644
--- a/js/ui/windowMenu.js
+++ b/js/ui/windowMenu.js
@@ -101,13 +101,22 @@ const WindowMenu = new Lang.Class({
if (!isSticky) {
let workspace = window.get_workspace();
- let idx = workspace.index();
- if (idx > 0) {
+ if (workspace != workspace.get_neighbor(Meta.MotionDirection.LEFT)) {
+ this.addAction(_("Move to Workspace Left"), Lang.bind(this, function(event) {
+ window.change_workspace(workspace.get_neighbor(Meta.MotionDirection.LEFT));
+ }));
+ }
+ if (workspace != workspace.get_neighbor(Meta.MotionDirection.RIGHT)) {
+ this.addAction(_("Move to Workspace Right"), Lang.bind(this, function(event) {
+ window.change_workspace(workspace.get_neighbor(Meta.MotionDirection.RIGHT));
+ }));
+ }
+ if (workspace != workspace.get_neighbor(Meta.MotionDirection.UP)) {
this.addAction(_("Move to Workspace Up"), Lang.bind(this, function(event) {
window.change_workspace(workspace.get_neighbor(Meta.MotionDirection.UP));
}));
}
- if (idx < nWorkspaces) {
+ if (workspace != workspace.get_neighbor(Meta.MotionDirection.DOWN)) {
this.addAction(_("Move to Workspace Down"), Lang.bind(this, function(event) {
window.change_workspace(workspace.get_neighbor(Meta.MotionDirection.DOWN));
}));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]