Revert "KeyboardStatus: handle modifier key indicators"

The 'show-keyboard-leds-indicator' key has been removed from
the schema.

This reverts commit 20f49e8c89.
This commit is contained in:
Florian Müllner
2011-01-28 23:51:04 +01:00
parent bc6be40fdd
commit 0244c6d5b8
2 changed files with 1 additions and 64 deletions

View File

@ -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();
}
}
};