diff options
| author | _ov4 <ov4@ov4.org> | 2026-10-22 02:53:04 +0000 |
|---|---|---|
| committer | _ov4 <ov4@ov4.org> | 2026-10-22 02:53:04 +0000 |
| commit | 21eb7861f1ca534b39b81a08a49c843c29ee48b6 (patch) | |
| tree | 406de8332f199b3a50680a329e5eff48c10daaae /bundle/src-tauri/src/menu.rs | |
| parent | 68d939ad652c7fca7fe7de7b55e51e0f34374f19 (diff) | |
fix(bundle): ask about unsaved changes when quitting with Cmd+Q
The predefined macOS Quit terminated the app without closing its
windows, so their unsaved-changes prompts never ran. Quit now closes
every window and the app exits after the last one.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'bundle/src-tauri/src/menu.rs')
| -rw-r--r-- | bundle/src-tauri/src/menu.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bundle/src-tauri/src/menu.rs b/bundle/src-tauri/src/menu.rs index ab2dd32..dad3779 100644 --- a/bundle/src-tauri/src/menu.rs +++ b/bundle/src-tauri/src/menu.rs @@ -39,8 +39,8 @@ pub fn build<R: Runtime>(app: &AppHandle<R>) -> tauri::Result<Menu<R>> { .maximize() .build()?; let menu = MenuBuilder::new(app); - // macOS shows the first submenu as the application menu. Quit skips unsaved-changes - // prompts, so other platforms close windows instead. + // macOS shows the first submenu as the application menu. The predefined Quit terminates + // without closing windows, skipping their unsaved-changes prompts, so "quit" closes them. #[cfg(target_os = "macos")] let menu = menu.item( &SubmenuBuilder::new(app, "CPSC Bundle") @@ -52,7 +52,7 @@ pub fn build<R: Runtime>(app: &AppHandle<R>) -> tauri::Result<Menu<R>> { .hide_others() .show_all() .separator() - .quit() + .item(&item("quit", "Quit CPSC Bundle", "CmdOrCtrl+Q")?) .build()?, ); menu.items(&[&file, &edit, &run, &window]).build() |
