Don't default to "Open", "Save", just let OS decide
This commit is contained in:
parent
40c531737d
commit
84cce6c2c1
4 changed files with 9 additions and 13 deletions
|
@ -78,7 +78,7 @@ void AtomDownloadManagerDelegate::OnDownloadPathGenerated(
|
|||
|
||||
base::FilePath path;
|
||||
if (file_dialog::ShowSaveDialog(window, item->GetURL().spec(),
|
||||
"Save", default_path,
|
||||
"", default_path,
|
||||
file_dialog::Filters(), &path)) {
|
||||
// Remember the last selected download directory.
|
||||
AtomBrowserContext* browser_context = static_cast<AtomBrowserContext*>(
|
||||
|
|
|
@ -389,7 +389,7 @@ void CommonWebContentsDelegate::DevToolsSaveToFile(
|
|||
} else {
|
||||
file_dialog::Filters filters;
|
||||
base::FilePath default_path(base::FilePath::FromUTF8Unsafe(url));
|
||||
if (!file_dialog::ShowSaveDialog(owner_window(), url, "Save", default_path,
|
||||
if (!file_dialog::ShowSaveDialog(owner_window(), url, "", default_path,
|
||||
filters, &path)) {
|
||||
base::StringValue url_value(url);
|
||||
web_contents_->CallClientFunction(
|
||||
|
@ -455,7 +455,7 @@ void CommonWebContentsDelegate::DevToolsAddFileSystem(
|
|||
base::FilePath default_path;
|
||||
std::vector<base::FilePath> paths;
|
||||
int flag = file_dialog::FILE_DIALOG_OPEN_DIRECTORY;
|
||||
if (!file_dialog::ShowOpenDialog(owner_window(), "", "Open", default_path,
|
||||
if (!file_dialog::ShowOpenDialog(owner_window(), "", "", default_path,
|
||||
filters, flag, &paths))
|
||||
return;
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ void WebDialogHelper::RunFileChooser(content::WebContents* web_contents,
|
|||
base::FilePath path;
|
||||
if (file_dialog::ShowSaveDialog(window_,
|
||||
base::UTF16ToUTF8(params.title),
|
||||
"Save",
|
||||
"",
|
||||
params.default_file_name,
|
||||
filters,
|
||||
&path)) {
|
||||
|
@ -115,7 +115,7 @@ void WebDialogHelper::RunFileChooser(content::WebContents* web_contents,
|
|||
prefs::kSelectFileLastDirectory).Append(params.default_file_name);
|
||||
if (file_dialog::ShowOpenDialog(window_,
|
||||
base::UTF16ToUTF8(params.title),
|
||||
"Open",
|
||||
"",
|
||||
default_file_path,
|
||||
filters,
|
||||
flags,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue