kbd-status: Remove support for disabling the indicator
The status icon should always be visible if more than two layouts are configured. The settings key which was used to enforce hiding the icon in this case as well has already been removed from the g-s-d schema, causing an error on startup.
This commit is contained in:
parent
7496a7ff3b
commit
11064c0e35
@ -15,8 +15,6 @@ const PanelMenu = imports.ui.panelMenu;
|
|||||||
const Gettext = imports.gettext.domain('gnome-shell');
|
const Gettext = imports.gettext.domain('gnome-shell');
|
||||||
const _ = Gettext.gettext;
|
const _ = Gettext.gettext;
|
||||||
|
|
||||||
const INDICATOR_SCHEMA = 'org.gnome.settings-daemon.plugins.keyboard';
|
|
||||||
|
|
||||||
function LayoutMenuItem() {
|
function LayoutMenuItem() {
|
||||||
this._init.apply(this, arguments);
|
this._init.apply(this, arguments);
|
||||||
}
|
}
|
||||||
@ -62,10 +60,6 @@ XKBIndicator.prototype = {
|
|||||||
this._labelActors = [ ];
|
this._labelActors = [ ];
|
||||||
this._layoutItems = [ ];
|
this._layoutItems = [ ];
|
||||||
|
|
||||||
this._indicatorSettings = new Gio.Settings({ schema: INDICATOR_SCHEMA });
|
|
||||||
this._indicatorSettings.connect('changed::disable-indicator', Lang.bind(this, this._sync_config));
|
|
||||||
|
|
||||||
this._disableIndicator = false;
|
|
||||||
this._showFlags = false;
|
this._showFlags = false;
|
||||||
this._config = Gkbd.Configuration.get();
|
this._config = Gkbd.Configuration.get();
|
||||||
this._config.connect('changed', Lang.bind(this, this._sync_config));
|
this._config.connect('changed', Lang.bind(this, this._sync_config));
|
||||||
@ -81,8 +75,6 @@ XKBIndicator.prototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
_sync_config: function() {
|
_sync_config: function() {
|
||||||
this._disableIndicator = this._indicatorSettings.get_boolean('disable-indicator');
|
|
||||||
|
|
||||||
this._showFlags = this._config.if_flags_shown();
|
this._showFlags = this._config.if_flags_shown();
|
||||||
if (this._showFlags) {
|
if (this._showFlags) {
|
||||||
this._container.set_skip_paint(this._iconActor, false);
|
this._container.set_skip_paint(this._iconActor, false);
|
||||||
@ -91,7 +83,7 @@ XKBIndicator.prototype = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let groups = this._config.get_group_names();
|
let groups = this._config.get_group_names();
|
||||||
if (groups.length > 1 && !this._disableIndicator) {
|
if (groups.length > 1) {
|
||||||
this.actor.show();
|
this.actor.show();
|
||||||
} else {
|
} else {
|
||||||
this.menu.close();
|
this.menu.close();
|
||||||
|
Loading…
Reference in New Issue
Block a user