Revert "Win: Remove adding default file filter(*.*) in a save dialog."
This reverts commit 00493f64b7
.
This commit is contained in:
parent
9b17241f6f
commit
dacd921a04
1 changed files with 6 additions and 0 deletions
|
@ -34,6 +34,12 @@ bool IsDirectory(const base::FilePath& path) {
|
||||||
void ConvertFilters(const Filters& filters,
|
void ConvertFilters(const Filters& filters,
|
||||||
std::vector<std::wstring>* buffer,
|
std::vector<std::wstring>* buffer,
|
||||||
std::vector<COMDLG_FILTERSPEC>* filterspec) {
|
std::vector<COMDLG_FILTERSPEC>* filterspec) {
|
||||||
|
if (filters.empty()) {
|
||||||
|
COMDLG_FILTERSPEC spec = { L"All Files (*.*)", L"*.*" };
|
||||||
|
filterspec->push_back(spec);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
buffer->reserve(filters.size() * 2);
|
buffer->reserve(filters.size() * 2);
|
||||||
for (size_t i = 0; i < filters.size(); ++i) {
|
for (size_t i = 0; i < filters.size(); ++i) {
|
||||||
const Filter& filter = filters[i];
|
const Filter& filter = filters[i];
|
||||||
|
|
Loading…
Reference in a new issue