mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
🍎 Add additional options for Mac's open dialog
Support an additional attributes available in macOS's NSOpenPanel: message.
This commit is contained in:
@@ -71,6 +71,7 @@ void ShowOpenDialog(const std::string& title,
|
||||
const base::FilePath& default_path,
|
||||
const file_dialog::Filters& filters,
|
||||
int properties,
|
||||
const std::string& message,
|
||||
atom::NativeWindow* window,
|
||||
mate::Arguments* args) {
|
||||
v8::Local<v8::Value> peek = args->PeekNext();
|
||||
@@ -79,11 +80,11 @@ void ShowOpenDialog(const std::string& title,
|
||||
peek,
|
||||
&callback)) {
|
||||
file_dialog::ShowOpenDialog(window, title, button_label, default_path,
|
||||
filters, properties, callback);
|
||||
filters, properties, message, callback);
|
||||
} else {
|
||||
std::vector<base::FilePath> paths;
|
||||
if (file_dialog::ShowOpenDialog(window, title, button_label, default_path,
|
||||
filters, properties, &paths))
|
||||
filters, properties, message, &paths))
|
||||
args->Return(paths);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user