Add support for a noResolveAliases property

This commit is contained in:
Samuel Attard 2017-02-12 15:23:27 +11:00 committed by Kevin Sawicki
parent 266c78b861
commit e45d8079b8
3 changed files with 11 additions and 7 deletions

View file

@ -29,6 +29,7 @@ enum FileDialogProperty {
FILE_DIALOG_CREATE_DIRECTORY = 1 << 3,
FILE_DIALOG_SHOW_HIDDEN_FILES = 1 << 4,
FILE_DIALOG_PROMPT_TO_CREATE = 1 << 5,
FILE_DIALOG_NO_RESOLVE_ALIASES = 1 << 6,
};
typedef base::Callback<void(

View file

@ -93,6 +93,8 @@ void SetupDialogForProperties(NSOpenPanel* dialog, int properties) {
[dialog setAllowsMultipleSelection:YES];
if (properties & FILE_DIALOG_SHOW_HIDDEN_FILES)
[dialog setShowsHiddenFiles:YES];
if (properties & FILE_DIALOG_NO_RESOLVE_ALIASES)
dialog.resolvesAliases = false;
}
// Run modal dialog with parent window and return user's choice.

View file

@ -10,7 +10,8 @@ const fileDialogProperties = {
multiSelections: 1 << 2,
createDirectory: 1 << 3,
showHiddenFiles: 1 << 4,
promptToCreate: 1 << 5
promptToCreate: 1 << 5,
noResolveAliases: 1 << 6,
}
const messageBoxTypes = ['none', 'info', 'warning', 'error', 'question']