From cabcf1929776aa1dd96f761cb8a5e907472ea63a Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 25 Sep 2014 09:33:17 -0700 Subject: [PATCH 1/3] :penguin: Default to project path in open dialog --- src/browser/atom-application.coffee | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/browser/atom-application.coffee b/src/browser/atom-application.coffee index 7460952a1..5aad02674 100644 --- a/src/browser/atom-application.coffee +++ b/src/browser/atom-application.coffee @@ -492,6 +492,14 @@ class AtomApplication else BrowserWindow.getFocusedWindow() + openOptions = + properties: properties.concat(['multiSelections', 'createDirectory']) + title: 'Open' + + if process.platform is 'linux' + if projectPath = @lastFocusedWindow?.projectPath + openOptions.defaultPath = projectPath + dialog = require 'dialog' - dialog.showOpenDialog parentWindow, title: 'Open', properties: properties.concat(['multiSelections', 'createDirectory']), (pathsToOpen) => + dialog.showOpenDialog parentWindow, openOptions, (pathsToOpen) => @openPaths({pathsToOpen, devMode, safeMode, window}) From 9e0c4d1fb645b8c8c8ea6a34d0f8bab0b471fc34 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 25 Sep 2014 09:35:25 -0700 Subject: [PATCH 2/3] Only set default path when opening files --- src/browser/atom-application.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/browser/atom-application.coffee b/src/browser/atom-application.coffee index 5aad02674..184d5cbb2 100644 --- a/src/browser/atom-application.coffee +++ b/src/browser/atom-application.coffee @@ -496,7 +496,7 @@ class AtomApplication properties: properties.concat(['multiSelections', 'createDirectory']) title: 'Open' - if process.platform is 'linux' + if process.platform is 'linux' and type is 'file' if projectPath = @lastFocusedWindow?.projectPath openOptions.defaultPath = projectPath From 13a5bfd1dd48763ffd2bace4f1fecf378a77d517 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 25 Sep 2014 09:45:54 -0700 Subject: [PATCH 3/3] Set default path on both files and folders --- src/browser/atom-application.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/browser/atom-application.coffee b/src/browser/atom-application.coffee index 184d5cbb2..5aad02674 100644 --- a/src/browser/atom-application.coffee +++ b/src/browser/atom-application.coffee @@ -496,7 +496,7 @@ class AtomApplication properties: properties.concat(['multiSelections', 'createDirectory']) title: 'Open' - if process.platform is 'linux' and type is 'file' + if process.platform is 'linux' if projectPath = @lastFocusedWindow?.projectPath openOptions.defaultPath = projectPath