Add support for a noResolveAliases property
This commit is contained in:
parent
266c78b861
commit
e45d8079b8
3 changed files with 11 additions and 7 deletions
|
@ -23,12 +23,13 @@ typedef std::pair<std::string, std::vector<std::string> > Filter;
|
||||||
typedef std::vector<Filter> Filters;
|
typedef std::vector<Filter> Filters;
|
||||||
|
|
||||||
enum FileDialogProperty {
|
enum FileDialogProperty {
|
||||||
FILE_DIALOG_OPEN_FILE = 1 << 0,
|
FILE_DIALOG_OPEN_FILE = 1 << 0,
|
||||||
FILE_DIALOG_OPEN_DIRECTORY = 1 << 1,
|
FILE_DIALOG_OPEN_DIRECTORY = 1 << 1,
|
||||||
FILE_DIALOG_MULTI_SELECTIONS = 1 << 2,
|
FILE_DIALOG_MULTI_SELECTIONS = 1 << 2,
|
||||||
FILE_DIALOG_CREATE_DIRECTORY = 1 << 3,
|
FILE_DIALOG_CREATE_DIRECTORY = 1 << 3,
|
||||||
FILE_DIALOG_SHOW_HIDDEN_FILES = 1 << 4,
|
FILE_DIALOG_SHOW_HIDDEN_FILES = 1 << 4,
|
||||||
FILE_DIALOG_PROMPT_TO_CREATE = 1 << 5,
|
FILE_DIALOG_PROMPT_TO_CREATE = 1 << 5,
|
||||||
|
FILE_DIALOG_NO_RESOLVE_ALIASES = 1 << 6,
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef base::Callback<void(
|
typedef base::Callback<void(
|
||||||
|
|
|
@ -93,6 +93,8 @@ void SetupDialogForProperties(NSOpenPanel* dialog, int properties) {
|
||||||
[dialog setAllowsMultipleSelection:YES];
|
[dialog setAllowsMultipleSelection:YES];
|
||||||
if (properties & FILE_DIALOG_SHOW_HIDDEN_FILES)
|
if (properties & FILE_DIALOG_SHOW_HIDDEN_FILES)
|
||||||
[dialog setShowsHiddenFiles:YES];
|
[dialog setShowsHiddenFiles:YES];
|
||||||
|
if (properties & FILE_DIALOG_NO_RESOLVE_ALIASES)
|
||||||
|
dialog.resolvesAliases = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Run modal dialog with parent window and return user's choice.
|
// Run modal dialog with parent window and return user's choice.
|
||||||
|
|
|
@ -10,7 +10,8 @@ const fileDialogProperties = {
|
||||||
multiSelections: 1 << 2,
|
multiSelections: 1 << 2,
|
||||||
createDirectory: 1 << 3,
|
createDirectory: 1 << 3,
|
||||||
showHiddenFiles: 1 << 4,
|
showHiddenFiles: 1 << 4,
|
||||||
promptToCreate: 1 << 5
|
promptToCreate: 1 << 5,
|
||||||
|
noResolveAliases: 1 << 6,
|
||||||
}
|
}
|
||||||
|
|
||||||
const messageBoxTypes = ['none', 'info', 'warning', 'error', 'question']
|
const messageBoxTypes = ['none', 'info', 'warning', 'error', 'question']
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue