From b5fa48f48589e8a77258ed408162eddab7dfa959 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 16 Sep 2011 09:42:43 -0400 Subject: [PATCH] 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 file changed, 7 insertions(+), 5 deletions(-) diff --git a/js/ui/status/keyboard.js b/js/ui/status/keyboard.js index 5a12df17a..3c8999753 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'); },