Kaynağa Gözat

Add shortcut for recents

Lutz Roeder 8 yıl önce
ebeveyn
işleme
2fbdaa647a
1 değiştirilmiş dosya ile 2 ekleme ve 1 silme
  1. 2 1
      src/app.js

+ 2 - 1
src/app.js

@@ -232,10 +232,11 @@ class Application {
         var menuRecentsTemplate = [];
         if (this._configuration && this._configuration.recents) {
             this._configuration.recents = this._configuration.recents.filter(recent => fs.existsSync(recent.path));
-            this._configuration.recents.forEach((recent) => {
+            this._configuration.recents.forEach((recent, index) => {
                 var file = recent.path;
                 menuRecentsTemplate.push({ 
                     label: Application.minimizePath(recent.path),
+                    accelerator: ((process.platform === 'darwin') ? 'Cmd+' : 'Ctrl+') + index.toString(),
                     click: () => { this.openFile(file); }
                 });
             });