@@ -28,7 +28,7 @@ import { ITextFileService } from 'vs/workbench/services/textfile/common/textfile
2828import { IHostService } from 'vs/workbench/services/host/browser/host' ;
2929import { AbstractWorkspaceEditingService } from 'vs/workbench/services/workspaces/browser/abstractWorkspaceEditingService' ;
3030import { IElectronService } from 'vs/platform/electron/node/electron' ;
31- import { isMacintosh , isWindows , isLinux } from 'vs/base/common/platform' ;
31+ import { isMacintosh } from 'vs/base/common/platform' ;
3232import { mnemonicButtonLabel } from 'vs/base/common/labels' ;
3333import { BackupFileService } from 'vs/workbench/services/backup/common/backupFileService' ;
3434
@@ -91,22 +91,14 @@ export class NativeWorkspaceEditingService extends AbstractWorkspaceEditingServi
9191 CANCEL
9292 }
9393
94- const save = { label : mnemonicButtonLabel ( nls . localize ( 'save' , "Save" ) ) , result : ConfirmResult . SAVE } ;
95- const dontSave = { label : mnemonicButtonLabel ( nls . localize ( 'doNotSave' , "Don't Save" ) ) , result : ConfirmResult . DONT_SAVE } ;
96- const cancel = { label : nls . localize ( 'cancel' , "Cancel" ) , result : ConfirmResult . CANCEL } ;
97-
98- const buttons : { label : string ; result : ConfirmResult ; } [ ] = [ ] ;
99- if ( isWindows ) {
100- buttons . push ( save , dontSave , cancel ) ;
101- } else if ( isLinux ) {
102- buttons . push ( dontSave , cancel , save ) ;
103- } else {
104- buttons . push ( save , cancel , dontSave ) ;
105- }
106-
94+ const buttons : { label : string ; result : ConfirmResult ; } [ ] = [
95+ { label : mnemonicButtonLabel ( nls . localize ( 'save' , "Save" ) ) , result : ConfirmResult . SAVE } ,
96+ { label : mnemonicButtonLabel ( nls . localize ( 'doNotSave' , "Don't Save" ) ) , result : ConfirmResult . DONT_SAVE } ,
97+ { label : nls . localize ( 'cancel' , "Cancel" ) , result : ConfirmResult . CANCEL }
98+ ] ;
10799 const message = nls . localize ( 'saveWorkspaceMessage' , "Do you want to save your workspace configuration as a file?" ) ;
108100 const detail = nls . localize ( 'saveWorkspaceDetail' , "Save your workspace if you plan to open it again." ) ;
109- const cancelId = buttons . indexOf ( cancel ) ;
101+ const cancelId = 2 ;
110102
111103 const { choice } = await this . dialogService . show ( Severity . Warning , message , buttons . map ( button => button . label ) , { detail, cancelId } ) ;
112104
0 commit comments