Skip to content

Implement file dialogs API on Windows - #93

Merged
zcbenz merged 7 commits into
masterfrom
file-dialog
Sep 24, 2013
Merged

zcbenz merged 7 commits into
masterfrom
file-dialog

Conversation

@zcbenz

@zcbenz zcbenz commented Sep 18, 2013

Copy link
Copy Markdown
Contributor
  • Rewrite ShowSaveDialog with IFileSaveDialog.
  • Implement ShowOpenDialog on Windows.
  • Work out how to select both file and folder in the open dialog.

@zcbenz

zcbenz commented Sep 19, 2013

Copy link
Copy Markdown
Contributor Author

@paulcbetts It seems that even with IFileDialog it still could not select both file and folder in the same open dialog, after FOS_PICKFOLDERS is included the open dialog would only be able to select folders. Can you have a review of the ShowOpenDialog function and see if I missed something?

Calling require('remote').require('dialog').showOpenDialog({defaultPath: 'C:\\', properties: ['openFile', 'openDirectory']}); in renderer could test this function.

@anaisbetts

Copy link
Copy Markdown
Contributor

It seems that even with IFileDialog it still could not select both file and folder in the same open dialog, after FOS_PICKFOLDERS is included the open dialog would only be able to select folders.

I think we decided that we don't need to be able to pick files and folders in the same dialog, right @probablycorey? You can't pop a dialog in Windows (or in Mac afaik) where you can return a list that has both files and folders in it

@zcbenz

zcbenz commented Sep 20, 2013

Copy link
Copy Markdown
Contributor Author

@paulcbetts I meant dialog.showOpenDialog(properties: ['openFile', 'openDirectory']) should be able to return either a single file or a single folder, but on Windows if openDirectory (e.g. FOS_PICKFOLDERS) is set the dialog would only be able to select a folder. In #10 you said it it was possible so I wonder if I missed something.

On Mac dialog.showOpenDialog(properties: ['openFile', 'openDirectory', 'multiSelections']) would return a list of both files and folders, and Atom relies on this behavior for its Open menu.

zcbenz added a commit that referenced this pull request Sep 24, 2013
Implement file dialogs API on Windows
@zcbenz
zcbenz merged commit 9927b4b into master Sep 24, 2013
@zcbenz
zcbenz deleted the file-dialog branch September 24, 2013 02:08
@zcbenz zcbenz mentioned this pull request Sep 24, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants