@@ -9,6 +9,7 @@ import nls = require('vs/nls');
99import severity from 'vs/base/common/severity' ;
1010import { TPromise } from 'vs/base/common/winjs.base' ;
1111import { IAction , Action } from 'vs/base/common/actions' ;
12+ import { Separator } from 'vs/base/browser/ui/actionbar/actionbar' ;
1213import { IMessageService , CloseAction , Severity } from 'vs/platform/message/common/message' ;
1314import pkg from 'vs/platform/node/package' ;
1415import product from 'vs/platform/node/product' ;
@@ -300,35 +301,43 @@ export class LightUpdateContribution implements IGlobalActivity {
300301 }
301302
302303 getActions ( ) : IAction [ ] {
304+ return [
305+ new Action ( 'showCommandPalette' , nls . localize ( 'commandPalette' , "Command Palette..." ) , undefined , true , ( ) => this . commandService . executeCommand ( 'workbench.action.showCommands' ) ) ,
306+ new Separator ( ) ,
307+ new Action ( 'openKeybindings' , nls . localize ( 'settings' , "Settings" ) , null , true , ( ) => this . commandService . executeCommand ( 'workbench.action.openGlobalSettings' ) ) ,
308+ new Action ( 'openSettings' , nls . localize ( 'keyboardShortcuts' , "Keyboard Shortcuts" ) , null , true , ( ) => this . commandService . executeCommand ( 'workbench.action.openGlobalKeybindings' ) ) ,
309+ new Separator ( ) ,
310+ this . getUpdateAction ( )
311+ ] ;
312+ }
313+
314+ private getUpdateAction ( ) : IAction {
303315 switch ( this . updateService . state ) {
304316 case UpdateState . Uninitialized :
305- return [ new Action ( 'update.notavailable' , nls . localize ( 'not available' , "Updates Not Available" ) , undefined , false ) ] ;
317+ return new Action ( 'update.notavailable' , nls . localize ( 'not available' , "Updates Not Available" ) , undefined , false ) ;
306318
307319 case UpdateState . CheckingForUpdate :
308- return [ new Action ( 'update.checking' , nls . localize ( 'checkingForUpdates' , "Checking For Updates..." ) , undefined , false ) ] ;
320+ return new Action ( 'update.checking' , nls . localize ( 'checkingForUpdates' , "Checking For Updates..." ) , undefined , false ) ;
309321
310322 case UpdateState . UpdateAvailable :
311323 if ( isLinux ) {
312- return [ new Action ( 'update.linux.available' , nls . localize ( 'DownloadUpdate' , "Download Available Update" ) , undefined , true , ( ) =>
313- this . updateService . quitAndInstall ( )
314- ) ] ;
324+ return new Action ( 'update.linux.available' , nls . localize ( 'DownloadUpdate' , "Download Available Update" ) , undefined , true , ( ) =>
325+ this . updateService . quitAndInstall ( ) ) ;
315326 }
316327
317328 const updateAvailableLabel = isWindows
318329 ? nls . localize ( 'DownloadingUpdate' , "Downloading Update..." )
319330 : nls . localize ( 'InstallingUpdate' , "Installing Update..." ) ;
320331
321- return [ new Action ( 'update.available' , updateAvailableLabel , undefined , false ) ] ;
332+ return new Action ( 'update.available' , updateAvailableLabel , undefined , false ) ;
322333
323334 case UpdateState . UpdateDownloaded :
324- return [ new Action ( 'update.restart' , nls . localize ( 'restartToUpdate' , "Restart To Update..." ) , undefined , true , ( ) =>
325- this . updateService . quitAndInstall ( )
326- ) ] ;
335+ return new Action ( 'update.restart' , nls . localize ( 'restartToUpdate' , "Restart To Update..." ) , undefined , true , ( ) =>
336+ this . updateService . quitAndInstall ( ) ) ;
327337
328338 default :
329- return [ new Action ( 'update.check' , nls . localize ( 'checkForUpdates' , "Check For Updates..." ) , undefined , this . updateService . state === UpdateState . Idle , ( ) =>
330- this . updateService . checkForUpdates ( true )
331- ) ] ;
339+ return new Action ( 'update.check' , nls . localize ( 'checkForUpdates' , "Check For Updates..." ) , undefined , this . updateService . state === UpdateState . Idle , ( ) =>
340+ this . updateService . checkForUpdates ( true ) ) ;
332341 }
333342 }
334343}
0 commit comments