Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions emain/emain-window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,13 +260,9 @@ export class WaveBrowserWindow extends BaseWindow {
const numWindows = waveWindowMap.size;
const fullConfig = await RpcApi.GetFullConfigCommand(ElectronWshClient);
if (numWindows > 1 || !fullConfig.settings["window:savelastwindow"]) {
console.log("numWindows > 1 or user does not want last window saved", numWindows);
if (fullConfig.settings["window:confirmclose"]) {
console.log("confirmclose", this.waveWindowId);
const workspace = await WorkspaceService.GetWorkspace(this.workspaceId);
console.log("workspace", workspace);
if (isNonEmptyUnsavedWorkspace(workspace)) {
console.log("workspace has no name, icon, and multiple tabs", workspace);
const choice = dialog.showMessageBoxSync(this, {
type: "question",
buttons: ["Cancel", "Close Window"],
Expand All @@ -275,15 +271,12 @@ export class WaveBrowserWindow extends BaseWindow {
"Window has unsaved tabs, closing window will delete existing tabs.\n\nContinue?",
});
if (choice === 0) {
console.log("user cancelled close window", this.waveWindowId);
return;
}
}
}
console.log("deleteAllowed = true", this.waveWindowId);
this.deleteAllowed = true;
}
console.log("canClose = true", this.waveWindowId);
this.canClose = true;
this.close();
});
Expand Down
1 change: 0 additions & 1 deletion emain/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ function getWindowWebContents(window: electron.BaseWindow): electron.WebContents

async function getWorkspaceMenu(ww?: WaveBrowserWindow): Promise<Electron.MenuItemConstructorOptions[]> {
const workspaceList = await RpcApi.WorkspaceListCommand(ElectronWshClient);
console.log("workspaceList:", workspaceList);
const workspaceMenu: Electron.MenuItemConstructorOptions[] = [
{
label: "Create Workspace",
Expand Down
Loading