From e53bfad01842429acf37439a935bf4d7622f6417 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Mon, 16 May 2016 10:09:41 +0900 Subject: [PATCH] Fix building on Windows --- atom/browser/ui/file_dialog_win.cc | 8 ++++---- docs/api/dialog.md | 5 ++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/atom/browser/ui/file_dialog_win.cc b/atom/browser/ui/file_dialog_win.cc index e99dcee35c..af699a1039 100644 --- a/atom/browser/ui/file_dialog_win.cc +++ b/atom/browser/ui/file_dialog_win.cc @@ -203,7 +203,7 @@ bool ShowOpenDialog(atom::NativeWindow* parent_window, options |= FOS_ALLOWMULTISELECT; FileDialog open_dialog( - default_path, title, filters, options); + default_path, title, button_label, filters, options); if (!open_dialog.Show(parent_window)) return false; @@ -253,7 +253,7 @@ void ShowOpenDialog(atom::NativeWindow* parent, run_state.dialog_thread->message_loop()->PostTask( FROM_HERE, base::Bind(&RunOpenDialogInNewThread, run_state, parent, title, - default_path, filters, properties, callback)); + button_label, default_path, filters, properties, callback)); } bool ShowSaveDialog(atom::NativeWindow* parent_window, @@ -263,7 +263,7 @@ bool ShowSaveDialog(atom::NativeWindow* parent_window, const Filters& filters, base::FilePath* path) { FileDialog save_dialog( - default_path, title, filters, + default_path, title, button_label, filters, FOS_FORCEFILESYSTEM | FOS_PATHMUSTEXIST | FOS_OVERWRITEPROMPT); if (!save_dialog.Show(parent_window)) return false; @@ -292,7 +292,7 @@ void ShowSaveDialog(atom::NativeWindow* parent, run_state.dialog_thread->message_loop()->PostTask( FROM_HERE, base::Bind(&RunSaveDialogInNewThread, run_state, parent, title, - default_path, filters, callback)); + button_label, default_path, filters, callback)); } } // namespace file_dialog diff --git a/docs/api/dialog.md b/docs/api/dialog.md index bb76056d13..3681a66d7b 100644 --- a/docs/api/dialog.md +++ b/docs/api/dialog.md @@ -28,7 +28,8 @@ The `dialog` module has the following methods: * `options` Object * `title` String * `defaultPath` String - * `buttonLabel` String + * `buttonLabel` String - Custom label for the confirmation button, when + left empty the default label will be used. * `filters` Array * `properties` Array - Contains which features the dialog should use, can contain `openFile`, `openDirectory`, `multiSelections` and @@ -70,6 +71,8 @@ shown. * `options` Object * `title` String * `defaultPath` String + * `buttonLabel` String - Custom label for the confirmation button, when + left empty the default label will be used. * `filters` Array * `callback` Function (optional)