Skip to content

Commit 072cc74

Browse files
committed
[email protected]: Move settings to the context menu, disable
layout preview when the layout is not xkb.
1 parent 11d9e01 commit 072cc74

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

files/usr/share/cinnamon/applets/[email protected]/applet.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,12 @@ class CinnamonKeyboardApplet extends Applet.Applet {
7676
this._propSection = new PopupMenu.PopupMenuSection();
7777
this.menu.addMenuItem(this._propSection);
7878
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
79-
this.menu.addAction(_("Show Keyboard Layout"), () => this._showActiveLayout());
79+
this.showLayoutAction = this.menu.addAction(_("Show Keyboard Layout"), () => this._showActiveLayout());
8080
this.menu.addAction(_("Show Character Table"), () => {
8181
Main.overview.hide();
8282
Util.spawn(['gucharmap']);
8383
});
84-
this.menu.addSettingsAction(_("Keyboard layouts"), 'keyboard', "layouts");
84+
this._applet_context_menu.addSettingsAction(_("Manage keyboard layouts"), 'keyboard', "layouts");
8585

8686
this._inputSourcesManager = KeyboardManager.getInputSourceManager();
8787
this._signalManager.connect(this._inputSourcesManager, "sources-changed", this._onSourcesChanged.bind(this));
@@ -218,6 +218,8 @@ class CinnamonKeyboardApplet extends Applet.Applet {
218218
this.actor.hide();
219219
}
220220

221+
this.showLayoutAction.setSensitive(selected.type === 'xkb');
222+
221223
this._updatePropertySection(selected.properties);
222224
}
223225

0 commit comments

Comments
 (0)