[gnome-shell] windowMenu: Only add workspace actions when enabled by session mode



commit 9f366118f070b53093feaf41bbd22ed83168d2cf
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri May 23 18:38:23 2014 +0200

    windowMenu: Only add workspace actions when enabled by session mode
    
    When workspaces are disabled by the session mode, all workspace
    related actions don't make sense. Worse, the "Move to Workspace ..."
    actions allow sending windows into a nirvana with no means to
    get them back.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=730653

 js/ui/windowMenu.js |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/windowMenu.js b/js/ui/windowMenu.js
index 395ccfe..cca5504 100644
--- a/js/ui/windowMenu.js
+++ b/js/ui/windowMenu.js
@@ -81,7 +81,9 @@ const WindowMenu = new Lang.Class({
             type == Meta.WindowType.SPLASHSCREEN)
             item.setSensitive(false);
 
-        if (!Meta.prefs_get_workspaces_only_on_primary() || window.is_on_primary_monitor()) {
+        if (Main.sessionMode.hasWorkspaces &&
+            (!Meta.prefs_get_workspaces_only_on_primary() ||
+             window.is_on_primary_monitor())) {
             let isSticky = window.is_on_all_workspaces();
 
             item = this.addAction(_("Always on Visible Workspace"), Lang.bind(this, function() {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]