Skip to content

Commit 2813827

Browse files
authored
Added Close and Close All menu items to the File menu.
2 parents 594205e + 754494b commit 2813827

File tree

13 files changed

+222
-138
lines changed

13 files changed

+222
-138
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"@wasm-fmt/clang-format": "^19.1.7",
6363
"autoprefixer": "^10.4.21",
6464
"cmake-js": "^7.3.0",
65-
"electron": "^35.0.2",
65+
"electron": "^35.0.3",
6666
"electron-builder": "^25.1.8",
6767
"electron-settings": "^4.0.4",
6868
"electron-vite": "^3.0.0",

pnpm-lock.yaml

Lines changed: 66 additions & 66 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/electronAPI.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ interface IElectronAPI {
77

88
// Renderer process asking the main process to do something for it.
99

10-
disableMainMenu: () => void
11-
enableMainMenu: () => void
10+
enableDisableMainMenu: (enable: boolean) => void
11+
enableDisableFileCloseAndCloseAllMenuItems: (enable: boolean) => void
1212
filePath: (file: File) => string
1313
resetAll: () => void
1414

@@ -17,10 +17,11 @@ interface IElectronAPI {
1717
onAbout: (callback: () => void) => void
1818
onAction: (callback: (action: string) => void) => void
1919
onCheckForUpdates: (callback: () => void) => void
20-
onDisableUi: (callback: () => void) => void
21-
onEnableUi: (callback: () => void) => void
20+
onEnableDisableUi: (callback: (enable: boolean) => void) => void
2221
onOpen: (callback: (filePath: string) => void) => void
2322
onOpenRemote: (callback: () => void) => void
23+
onClose: (callback: () => void) => void
24+
onCloseAll: (callback: () => void) => void
2425
onResetAll: (callback: () => void) => void
2526
onSettings: (callback: () => void) => void
2627
}

src/libopencor/locAPI.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ class FileManager {
2828
if (cppVersion()) {
2929
_locAPI.fileManagerUnmanage(path)
3030
} else {
31-
const files = this._fileManager.files()
31+
const files = this._fileManager.files
3232

3333
for (let i = 0; i < files.size(); ++i) {
3434
const file = files.get(i)
3535

36-
if (file.fileName() === path) {
36+
if (file.fileName === path) {
3737
this._fileManager.unmanage(file)
3838

3939
break

0 commit comments

Comments
 (0)