mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-25 18:55:29 -06:00
Electron-47
1. Added a default language ('en-US') for windows
2. Included app.asar.unpacked dir in the windows installer as `spawn-rx` module is required for spellchecker to work.
This commit is contained in:
committed by
Kiran Niranjan
parent
e21f7adfaa
commit
ae0398d8d0
@@ -1,5 +1,6 @@
|
||||
const { remote } = require('electron');
|
||||
const { MenuItem } = remote;
|
||||
const { isMac } = require('./../utils/misc');
|
||||
const { SpellCheckHandler, ContextMenuListener, ContextMenuBuilder } = require('electron-spellchecker');
|
||||
|
||||
class SpellCheckHelper {
|
||||
@@ -14,6 +15,15 @@ class SpellCheckHelper {
|
||||
initializeSpellChecker() {
|
||||
this.spellCheckHandler.attachToInput();
|
||||
|
||||
// This is only for window as in mac the
|
||||
// language is switched w.r.t to the current system language.
|
||||
//
|
||||
// In windows we need to implement RxJS observable
|
||||
// in order to switch language dynamically
|
||||
if (!isMac) {
|
||||
this.spellCheckHandler.switchLanguage('en-US');
|
||||
}
|
||||
|
||||
const contextMenuBuilder = new ContextMenuBuilder(this.spellCheckHandler, null, false, SpellCheckHelper.processMenu);
|
||||
this.contextMenuListener = new ContextMenuListener((info) => {
|
||||
contextMenuBuilder.showPopupMenu(info);
|
||||
|
||||
Reference in New Issue
Block a user