[gnome-shell] status: don't show 'Show Keyboard Layout' on the login screen



commit b5fa48f48589e8a77258ed408162eddab7dfa959
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Sep 16 09:42:43 2011 -0400

    status: don't show 'Show Keyboard Layout' on the login screen
    
    It does not make a great amount of sense to have this function
    on the login screen. And worse, it does not work, since the greeter
    is currently a modal dialog, so interaction with the opening
    window is impossible.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=659164

 js/ui/status/keyboard.js |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/js/ui/status/keyboard.js b/js/ui/status/keyboard.js
index 5a12df1..3c89997 100644
--- a/js/ui/status/keyboard.js
+++ b/js/ui/status/keyboard.js
@@ -67,11 +67,13 @@ XKBIndicator.prototype = {
 
         this._sync_config();
 
-        this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
-        this.menu.addAction(_("Show Keyboard Layout"), Lang.bind(this, function() {
-            Main.overview.hide();
-            Util.spawn(['gkbd-keyboard-display', '-g', String(this._config.get_current_group() + 1)]);
-        }));
+        if (global.session_type == Shell.SessionType.USER) {
+            this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
+            this.menu.addAction(_("Show Keyboard Layout"), Lang.bind(this, function() {
+                Main.overview.hide();
+                Util.spawn(['gkbd-keyboard-display', '-g', String(this._config.get_current_group() + 1)]);
+            }));
+        }
         this.menu.addSettingsAction(_("Region and Language Settings"), 'gnome-region-panel.desktop');
     },
 



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