[gnome-shell] Revert "KeyboardStatus: handle modifier key indicators"
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] Revert "KeyboardStatus: handle modifier key indicators"
- Date: Sat, 29 Jan 2011 18:34:37 +0000 (UTC)
commit 0244c6d5b85cb30f6466fa08400a19f68693c823
Author: Florian Müllner <fmuellner gnome org>
Date: Fri Jan 28 23:51:04 2011 +0100
Revert "KeyboardStatus: handle modifier key indicators"
The 'show-keyboard-leds-indicator' key has been removed from
the schema.
This reverts commit 20f49e8c8917bff0d6e17ba6218fcbaec3b016e9.
js/ui/panel.js | 16 +--------------
js/ui/status/keyboard.js | 49 ----------------------------------------------
2 files changed, 1 insertions(+), 64 deletions(-)
---
diff --git a/js/ui/panel.js b/js/ui/panel.js
index c1baf2c..1b8863f 100644
--- a/js/ui/panel.js
+++ b/js/ui/panel.js
@@ -43,10 +43,6 @@ const STANDARD_TRAY_ICON_SHELL_IMPLEMENTATION = {
if (Config.HAVE_BLUETOOTH)
STANDARD_TRAY_ICON_SHELL_IMPLEMENTATION['bluetooth'] = imports.ui.status.bluetooth.Indicator;
-const STANDARD_TRAY_INDICATOR_FACTORIES = [
- imports.ui.status.keyboard.ModifierIndicatorFactory
-];
-
// in org.gnome.desktop.interface
const CLOCK_FORMAT_KEY = 'clock-format';
@@ -813,16 +809,13 @@ Panel.prototype = {
/* right */
- // On-off indicators (for keyboard leds and accessx) are in indicatorBox
- // System status applets live in statusBox, and legacy tray icons
+ // System status applets live in statusBox, while legacy tray icons
// live in trayBox
// The trayBox is hidden when there are no tray icons.
- this._indicatorBox = new St.BoxLayout({ name: 'indicatorBox' });
this._trayBox = new St.BoxLayout({ name: 'legacyTray' });
this._statusBox = new St.BoxLayout({ name: 'statusTray' });
this._trayBox.hide();
- this._rightBox.add(this._indicatorBox);
this._rightBox.add(this._trayBox);
this._rightBox.add(this._statusBox);
@@ -874,13 +867,6 @@ Panel.prototype = {
},
startStatusArea: function() {
- for (let i = 0; i < STANDARD_TRAY_INDICATOR_FACTORIES.length; i++) {
- let factory = new STANDARD_TRAY_INDICATOR_FACTORIES[i];
- let indicators = factory.getIndicators();
- for (let j = 0; j < indicators.length; j++)
- this._indicatorBox.add(indicators[j]);
- }
-
for (let i = 0; i < STANDARD_TRAY_ICON_ORDER.length; i++) {
let role = STANDARD_TRAY_ICON_ORDER[i];
let constructor = STANDARD_TRAY_ICON_SHELL_IMPLEMENTATION[role];
diff --git a/js/ui/status/keyboard.js b/js/ui/status/keyboard.js
index 3813c62..6e6ccee 100644
--- a/js/ui/status/keyboard.js
+++ b/js/ui/status/keyboard.js
@@ -204,52 +204,3 @@ XKBIndicator.prototype = {
this._labelActors[i].allocate_align_fill(box, 0.5, 0, false, false, flags);
}
};
-
-function ModifierIndicatorFactory() {
- this._init.call(this);
-}
-
-ModifierIndicatorFactory.prototype = {
- _init: function() {
- this._settings = new Gio.Settings({ schema: INDICATOR_SCHEMA });
- this._settings.connect('changed::show-keyboard-leds-indicator', Lang.bind(this, this._changed));
-
- this._config = Gkbd.Configuration.get();
- this._config.connect('indicators-changed', Lang.bind(this, this._changed));
-
- this._scrollLock = new St.Icon({ icon_name: 'kbdled-scroll-lock', icon_type: St.IconType.SYMBOLIC, style_class: 'system-status-icon' });
- this._numLock = new St.Icon({ icon_name: 'kbdled-num-lock', icon_type: St.IconType.SYMBOLIC, style_class: 'system-status-icon' });
- this._capsLock = new St.Icon({ icon_name: 'kbdled-caps-lock', icon_type: St.IconType.SYMBOLIC, style_class: 'system-status-icon' });
-
- this._changed();
- },
-
- getIndicators: function() {
- return [this._scrollLock, this._numLock, this._capsLock];
- },
-
- _changed: function() {
- let enable = this._settings.get_boolean('show-keyboard-leds-indicator');
-
- if (enable) {
- if (this._config.get_scroll_lock_state())
- this._scrollLock.show();
- else
- this._scrollLock.hide();
-
- if (this._config.get_num_lock_state())
- this._numLock.show();
- else
- this._numLock.hide();
-
- if (this._config.get_caps_lock_state())
- this._capsLock.show();
- else
- this._capsLock.hide();
- } else {
- this._scrollLock.hide();
- this._numLock.hide();
- this._capsLock.hide();
- }
- }
-};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]