[gnome-shell] KeyboardStatus: add "Show layout" item
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] KeyboardStatus: add "Show layout" item
- Date: Mon, 21 Feb 2011 17:49:31 +0000 (UTC)
commit 0064ca35825b8beb10c809a82c9d7c6b8c08dd96
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Sat Feb 5 19:30:16 2011 +0100
KeyboardStatus: add "Show layout" item
Add a menu item that opens a dialog showing the current keyboard
layout. Uses the new utility in libgnomekbd.
https://bugzilla.gnome.org/show_bug.cgi?id=641415
js/ui/status/keyboard.js | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/status/keyboard.js b/js/ui/status/keyboard.js
index 111c3c0..883c534 100644
--- a/js/ui/status/keyboard.js
+++ b/js/ui/status/keyboard.js
@@ -11,6 +11,7 @@ const St = imports.gi.St;
const PopupMenu = imports.ui.popupMenu;
const PanelMenu = imports.ui.panelMenu;
+const Util = imports.misc.util;
const Gettext = imports.gettext.domain('gnome-shell');
const _ = Gettext.gettext;
@@ -69,8 +70,11 @@ XKBIndicator.prototype = {
this._sync_config();
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
+ this.menu.addAction(_("Show Keyboard Layout..."), Lang.bind(this, function() {
+ Util.spawn(['gkbd-keyboard-display', '-g', this._config.get_current_group() + 1]);
+ }));
this.menu.addAction(_("Localization Settings"), function() {
- GLib.spawn_command_line_async('gnome-control-center region');
+ Util.spawn(['gnome-control-center', 'region']);
});
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]