Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(624)

Side by Side Diff: chrome/browser/views/shell_dialogs_win.cc

Issue 93019: Properly construct shell filters (forgetting the asterisk means it works but ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/common/win_util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/shell_dialogs.h" 5 #include "chrome/browser/shell_dialogs.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <commdlg.h> 8 #include <commdlg.h>
9 #include <shlobj.h> 9 #include <shlobj.h>
10 #include <atlbase.h> 10 #include <atlbase.h>
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 void SelectFileDialogImpl::ExecuteSelectFile( 332 void SelectFileDialogImpl::ExecuteSelectFile(
333 const ExecuteSelectParams& params) { 333 const ExecuteSelectParams& params) {
334 std::vector<std::wstring> exts; 334 std::vector<std::wstring> exts;
335 for (size_t i=0; i<params.file_types.extensions.size(); ++i) { 335 for (size_t i=0; i<params.file_types.extensions.size(); ++i) {
336 const std::vector<std::wstring>& inner_exts = 336 const std::vector<std::wstring>& inner_exts =
337 params.file_types.extensions[i]; 337 params.file_types.extensions[i];
338 std::wstring ext_string; 338 std::wstring ext_string;
339 for (size_t j=0; j<inner_exts.size(); ++j) { 339 for (size_t j=0; j<inner_exts.size(); ++j) {
340 if (!ext_string.empty()) 340 if (!ext_string.empty())
341 ext_string.push_back(L';'); 341 ext_string.push_back(L';');
342 ext_string.push_back(L'.'); 342 ext_string.append(L"*.");
343 ext_string.append(inner_exts[j]); 343 ext_string.append(inner_exts[j]);
344 } 344 }
345 exts.push_back(ext_string); 345 exts.push_back(ext_string);
346 } 346 }
347 std::wstring filter = win_util::FormatFilterForExtensions( 347 std::wstring filter = win_util::FormatFilterForExtensions(
348 exts, 348 exts,
349 params.file_types.extension_description_overrides, 349 params.file_types.extension_description_overrides,
350 params.file_types.include_all_files); 350 params.file_types.include_all_files);
351 351
352 FilePath path = params.default_path; 352 FilePath path = params.default_path;
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 void SelectFontDialogImpl::FontNotSelected(void* params, RunState run_state) { 724 void SelectFontDialogImpl::FontNotSelected(void* params, RunState run_state) {
725 if (listener_) 725 if (listener_)
726 listener_->FontSelectionCanceled(params); 726 listener_->FontSelectionCanceled(params);
727 EndRun(run_state); 727 EndRun(run_state);
728 } 728 }
729 729
730 // static 730 // static
731 SelectFontDialog* SelectFontDialog::Create(Listener* listener) { 731 SelectFontDialog* SelectFontDialog::Create(Listener* listener) {
732 return new SelectFontDialogImpl(listener); 732 return new SelectFontDialogImpl(listener);
733 } 733 }
OLDNEW
« no previous file with comments | « no previous file | chrome/common/win_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698