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:
{
wxString path = wxFileSelector(
_T("Apply signature file"), wxEmptyString, wxEmptyString, wxEmptyString,
_T("Dolphin Symbole Rename File (*.sym)|*.sym;"), wxFD_OPEN | wxFD_FILE_MUST_EXIST,
this);
_T("Apply signature file"), wxEmptyString,
wxEmptyString, wxEmptyString,
_T("Dolphin Symbol Rename File (*.sym)|*.sym"),
wxFD_OPEN | wxFD_FILE_MUST_EXIST, this);
if (! path.IsEmpty())
{
FILE *f = fopen(path.mb_str(), "r");

View File

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

View File

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