Skip to content

Commit

Permalink
mod: optional use systemPreference.serUserDefault
Browse files Browse the repository at this point in the history
  • Loading branch information
jooy2 committed Jan 21, 2024
1 parent 9d17962 commit 9116b0b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
10 changes: 8 additions & 2 deletions src/main/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { app, WebContents, RenderProcessGoneDetails } from 'electron'
import Constants from './utils/Constants'
import { createErrorWindow, createMainWindow } from './MainRunner'
import { macOSDisableDefaultMenuItem } from './utils/Menus'

let mainWindow
let errorWindow
Expand All @@ -10,7 +9,14 @@ app.on('ready', async () => {
if (Constants.IS_DEV_ENV) {
import('./index.dev')
}
macOSDisableDefaultMenuItem()

// Disable special menus on macOS by uncommenting the following, if necessary
/*
if (Constants.IS_MAC) {
systemPreferences.setUserDefault('NSDisabledDictationMenuItem', 'boolean', true)
systemPreferences.setUserDefault('NSDisabledCharacterPaletteMenuItem', 'boolean', true)
}
*/

mainWindow = await createMainWindow(mainWindow)
})
Expand Down
13 changes: 0 additions & 13 deletions src/main/utils/Menus.ts

This file was deleted.

0 comments on commit 9116b0b

Please sign in to comment.