WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 34a5741

Browse files
committed
keyboard: Always fetch the full XkbInfo store except when adding
a layout. This adapts Cinnamon's use of CinnamonDesktop.XkbInfo to linuxmint/cinnamon-desktop@2bb17da29eb, which stops us relying on a setting to load a full XkbInfo model. This setting will still be used directly in the Add Layout dialog, but it would cause problems if the user added an 'extra' layout, then later un-set the 'show-all-sources' toggle. Cinnamon would consider it an invalid layout.
1 parent 81650e3 commit 34a5741

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

files/usr/share/cinnamon/cinnamon-settings/bin/AddKeyboardLayout.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,11 @@ def _reload_all_engines(self):
103103
self.layouts_store.clear()
104104

105105
self.used_ids = set(self.original_used_ids)
106-
self.xkb_info = CinnamonDesktop.XkbInfo()
106+
107+
if self.input_source_settings.get_boolean(SHOW_ALL_SOURCES_KEY):
108+
self.xkb_info = CinnamonDesktop.XkbInfo.new_with_extras()
109+
else:
110+
self.xkb_info = CinnamonDesktop.XkbInfo.new()
107111

108112
self._load_layouts()
109113

files/usr/share/cinnamon/cinnamon-settings/bin/InputSources.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ def __init__(self):
275275
print(e.message)
276276
self._proxy = None
277277

278-
self.xkb_info = CinnamonDesktop.XkbInfo()
278+
self.xkb_info = CinnamonDesktop.XkbInfo.new_with_extras()
279279

280280
self._ibus = IBus.Bus.new()
281281
if not self._ibus.is_connected():

js/ui/keyboardManager.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ let _xkbInfo = null;
3030

3131
function getXkbInfo() {
3232
if (_xkbInfo == null)
33-
_xkbInfo = new CinnamonDesktop.XkbInfo();
33+
_xkbInfo = CinnamonDesktop.XkbInfo.new_with_extras();
3434
return _xkbInfo;
3535
}
3636

@@ -499,7 +499,7 @@ var InputSourceManager = class {
499499
this._ibusManager.connect('property-updated', this._ibusPropertyUpdated.bind(this));
500500
this._ibusManager.connect('set-content-type', this._ibusSetContentType.bind(this));
501501

502-
global.display.connect('modifiers-accelerator-activated', this._modifiersSwitcher.bind(this));
502+
global.display.connect('modifiers-accelerator-activated', () => this._modifiersSwitcher(false));
503503

504504
this._sourcesPerWindow = false;
505505
this._focusWindowNotifyId = 0;

0 commit comments

Comments
 (0)