win: Open dialog and save dialog can have different options.
This commit is contained in:
parent
9ed64548d4
commit
6fced224c7
1 changed files with 3 additions and 1 deletions
|
@ -137,6 +137,7 @@ class FileDialog {
|
||||||
public:
|
public:
|
||||||
FileDialog(const base::FilePath& default_path,
|
FileDialog(const base::FilePath& default_path,
|
||||||
const std::string title,
|
const std::string title,
|
||||||
|
int options,
|
||||||
const std::vector<std::wstring>& file_ext,
|
const std::vector<std::wstring>& file_ext,
|
||||||
const std::vector<std::wstring>& desc_ext)
|
const std::vector<std::wstring>& desc_ext)
|
||||||
: file_ext_(file_ext),
|
: file_ext_(file_ext),
|
||||||
|
@ -150,7 +151,7 @@ class FileDialog {
|
||||||
|
|
||||||
dialog_.reset(new T(
|
dialog_.reset(new T(
|
||||||
file_part.c_str(),
|
file_part.c_str(),
|
||||||
FOS_FORCEFILESYSTEM | FOS_PATHMUSTEXIST | FOS_OVERWRITEPROMPT,
|
options,
|
||||||
NULL,
|
NULL,
|
||||||
filters.data(),
|
filters.data(),
|
||||||
filters.size()));
|
filters.size()));
|
||||||
|
@ -217,6 +218,7 @@ bool ShowSaveDialog(atom::NativeWindow* window,
|
||||||
FileDialog<CShellFileSaveDialog> save_dialog(
|
FileDialog<CShellFileSaveDialog> save_dialog(
|
||||||
default_path,
|
default_path,
|
||||||
title,
|
title,
|
||||||
|
FOS_FORCEFILESYSTEM | FOS_PATHMUSTEXIST | FOS_OVERWRITEPROMPT,
|
||||||
file_ext,
|
file_ext,
|
||||||
std::vector<std::wstring>());
|
std::vector<std::wstring>());
|
||||||
if (!save_dialog.Show(window))
|
if (!save_dialog.Show(window))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue