Add option to search subfolders for iso directories

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2867 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
LPFaint99
2009-04-05 06:46:18 +00:00
parent 472e67333f
commit b19309fdb3
5 changed files with 32 additions and 1 deletions

View File

@ -75,6 +75,7 @@ EVT_CHOICE(ID_WII_IPL_LNG, CConfigMain::WiiSettingsChanged)
EVT_LISTBOX(ID_ISOPATHS, CConfigMain::ISOPathsSelectionChanged)
EVT_BUTTON(ID_ADDISOPATH, CConfigMain::AddRemoveISOPaths)
EVT_BUTTON(ID_REMOVEISOPATH, CConfigMain::AddRemoveISOPaths)
EVT_CHECKBOX(ID_RECERSIVEISOPATH, CConfigMain::RecursiveDirectoryChanged)
EVT_FILEPICKER_CHANGED(ID_DEFAULTISO, CConfigMain::DefaultISOChanged)
EVT_DIRPICKER_CHANGED(ID_DVDROOT, CConfigMain::DVDRootChanged)
@ -441,7 +442,8 @@ void CConfigMain::CreateGUIControls()
AddISOPath = new wxButton(PathsPage, ID_ADDISOPATH, wxT("Add..."), wxDefaultPosition, wxDefaultSize, 0);
RemoveISOPath = new wxButton(PathsPage, ID_REMOVEISOPATH, wxT("Remove"), wxDefaultPosition, wxDefaultSize, 0);
RemoveISOPath->Enable(false);
RecersiveISOPath = new wxCheckBox(PathsPage, ID_RECERSIVEISOPATH, wxT("Search Subfolders"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
RecersiveISOPath->SetValue(SConfig::GetInstance().m_RecersiveISOFolder);
DefaultISOText = new wxStaticText(PathsPage, ID_DEFAULTISO_TEXT, wxT("Default ISO:"), wxDefaultPosition, wxDefaultSize);
DefaultISO = new wxFilePickerCtrl(PathsPage, ID_DEFAULTISO, wxEmptyString, wxT("Choose a default ISO:"),
wxString::Format(wxT("All GC/Wii images (gcm, iso, gcz)|*.gcm;*.iso;*.gcz|All files (%s)|%s"), wxFileSelectorDefaultWildcardStr, wxFileSelectorDefaultWildcardStr),
@ -457,6 +459,7 @@ void CConfigMain::CreateGUIControls()
sbISOPaths->Add(ISOPaths, 1, wxEXPAND|wxALL, 0);
sISOButtons = new wxBoxSizer(wxHORIZONTAL);
sISOButtons->Add(RecersiveISOPath, 0, wxALL, 0);
sISOButtons->AddStretchSpacer(1);
sISOButtons->Add(AddISOPath, 0, wxALL, 0);
sISOButtons->Add(RemoveISOPath, 0, wxALL, 0);
@ -838,6 +841,12 @@ void CConfigMain::AddRemoveISOPaths(wxCommandEvent& event)
SConfig::GetInstance().m_ISOFolder.push_back(std::string(ISOPaths->GetStrings()[i].ToAscii()));
}
void CConfigMain::RecursiveDirectoryChanged(wxCommandEvent& WXUNUSED (event))
{
SConfig::GetInstance().m_RecersiveISOFolder = RecersiveISOPath->IsChecked();
bRefreshList = true;
}
void CConfigMain::DefaultISOChanged(wxFileDirPickerEvent& WXUNUSED (event))
{
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDefaultGCM = DefaultISO->GetPath().ToAscii();