Some cases where where uses of wxFileSelector with

wxFileSelectorDefaultWildcardStr had been copy-pasted and
changed to use specific filetypes had retained the extranous
format arguments to wxString::Format.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5957 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Soren Jorvang 2010-07-23 23:50:09 +00:00
parent 669de4890a
commit 2d06b4114b
3 changed files with 25 additions and 34 deletions

View file

@ -285,9 +285,10 @@ void CCodeWindow::OnSymbolsMenu(wxCommandEvent& event)
case IDM_RENAME_SYMBOLS: case IDM_RENAME_SYMBOLS:
{ {
wxString path = wxFileSelector( wxString path = wxFileSelector(
_T("Apply signature file"), wxEmptyString, wxEmptyString, wxEmptyString, _T("Apply signature file"), wxEmptyString,
_T("Dolphin Symbole Rename File (*.sym)|*.sym;"), wxFD_OPEN | wxFD_FILE_MUST_EXIST, wxEmptyString, wxEmptyString,
this); _T("Dolphin Symbol Rename File (*.sym)|*.sym"),
wxFD_OPEN | wxFD_FILE_MUST_EXIST, this);
if (! path.IsEmpty()) if (! path.IsEmpty())
{ {
FILE *f = fopen(path.mb_str(), "r"); FILE *f = fopen(path.mb_str(), "r");

View file

@ -1086,12 +1086,7 @@ void CFrame::OnLoadWiiMenu(wxCommandEvent& event)
wxString path = wxFileSelector( wxString path = wxFileSelector(
_T("Select the System Menu wad extracted from the update partition of a disc"), _T("Select the System Menu wad extracted from the update partition of a disc"),
wxEmptyString, wxEmptyString, wxEmptyString, wxEmptyString, wxEmptyString, wxEmptyString,
wxString::Format _T("System Menu (*.wad)|*.wad"),
(
_T("System Menu wad|*.wad"),
wxFileSelectorDefaultWildcardStr,
wxFileSelectorDefaultWildcardStr
),
wxFD_OPEN | wxFD_PREVIEW | wxFD_FILE_MUST_EXIST, wxFD_OPEN | wxFD_PREVIEW | wxFD_FILE_MUST_EXIST,
this); this);

View file

@ -556,26 +556,23 @@ void CMemcardManager::CopyDeleteClick(wxCommandEvent& event)
slot = SLOT_A; slot = SLOT_A;
case ID_SAVEIMPORT_B: case ID_SAVEIMPORT_B:
{ {
wxString fileName = wxFileSelector(wxT("Select a save file to import"), wxString fileName = wxFileSelector(
(strcmp(DefaultIOPath.c_str(), "/Users/GC") == 0) ? wxString::FromAscii(""): wxString::From8BitData(DefaultIOPath.c_str()), wxEmptyString, wxEmptyString, wxString::Format wxT("Select a save file to import"),
( (strcmp(DefaultIOPath.c_str(), "/Users/GC") == 0)
wxT("Gamecube save files(*.gci,*.gcs,*.sav)|*.gci;*.gcs;*.sav|") ? wxString::FromAscii("")
wxT("Native GCI files (*.gci)|*.gci|") : wxString::From8BitData(DefaultIOPath.c_str()),
wxT("MadCatz Gameshark files(*.gcs)|*.gcs|") wxEmptyString, wxEmptyString,
wxT("Datel MaxDrive/Pro files(*.sav)|*.sav"), wxT("Gamecube save files(*.gci,*.gcs,*.sav)"
wxFileSelectorDefaultWildcardStr, "|*.gci;*.gcs;*.sav|")
wxFileSelectorDefaultWildcardStr wxT("Native GCI files(*.gci)|*.gci|"
), "MadCatz Gameshark files(*.gcs)|*.gcs|"
"Datel MaxDrive/Pro files(*.sav)|*.sav"),
wxFD_OPEN | wxFD_FILE_MUST_EXIST); wxFD_OPEN | wxFD_FILE_MUST_EXIST);
if (!fileName.empty() && !fileName2.empty()) if (!fileName.empty() && !fileName2.empty())
{ {
wxString temp2 = wxFileSelector(wxT("Save GCI as.."), wxString temp2 = wxFileSelector(wxT("Save GCI as.."),
wxEmptyString, wxEmptyString, wxT(".gci"), wxString::Format wxEmptyString, wxEmptyString, wxT(".gci"),
(
wxT("GCI File(*.gci)|*.gci"), wxT("GCI File(*.gci)|*.gci"),
wxFileSelectorDefaultWildcardStr,
wxFileSelectorDefaultWildcardStr
),
wxFD_OVERWRITE_PROMPT|wxFD_SAVE); wxFD_OVERWRITE_PROMPT|wxFD_SAVE);
if (temp2.empty()) break; if (temp2.empty()) break;
fileName2 = temp2.mb_str(); fileName2 = temp2.mb_str();
@ -597,15 +594,13 @@ void CMemcardManager::CopyDeleteClick(wxCommandEvent& event)
memoryCard[slot]->DEntry_GameCode(index,tempC); memoryCard[slot]->DEntry_GameCode(index,tempC);
memoryCard[slot]->DEntry_FileName(index,tempC2); memoryCard[slot]->DEntry_FileName(index,tempC2);
sprintf(tempC, "%s_%s.gci", tempC, tempC2); sprintf(tempC, "%s_%s.gci", tempC, tempC2);
wxString fileName = wxFileSelector(wxT("Export save as.."), wxString::From8BitData(DefaultIOPath.c_str()), wxString fileName = wxFileSelector(
wxString::From8BitData(tempC), wxT(".gci"), wxString::Format wxT("Export save as.."),
( wxString::From8BitData(DefaultIOPath.c_str()),
wxT("Native GCI files (*.gci)|*.gci|") wxString::From8BitData(tempC), wxT(".gci"),
wxT("MadCatz Gameshark files(*.gcs)|*.gcs|") wxT("Native GCI files (*.gci)|*.gci|"
wxT("Datel MaxDrive/Pro files(*.sav)|*.sav"), "MadCatz Gameshark files(*.gcs)|*.gcs|"
wxFileSelectorDefaultWildcardStr, "Datel MaxDrive/Pro files(*.sav)|*.sav"),
wxFileSelectorDefaultWildcardStr
),
wxFD_OVERWRITE_PROMPT|wxFD_SAVE); wxFD_OVERWRITE_PROMPT|wxFD_SAVE);
if (fileName.length() > 0) if (fileName.length() > 0)