diff options
| author | Chris Burgener <christhecoolist@gmail.com> | 2016-06-30 20:46:52 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-06-30 20:46:52 -0400 |
| commit | 046c96f1b825756ce598f9c84b82f204d66b4aab (patch) | |
| tree | 1a7b82ffe25bb225ed5e78416832b72894849cab /Source/Core/DolphinWX/Config/PathConfigPane.cpp | |
| parent | eccda1dde6648351376bb36840176d040107ae1a (diff) | |
| parent | e92ff9d09f31cad57134969d99633fca52e98dac (diff) | |
Merge pull request #3944 from RisingFog/configurable_dump_path
Add Dump Path to Configuration Menu
Diffstat (limited to 'Source/Core/DolphinWX/Config/PathConfigPane.cpp')
| -rw-r--r-- | Source/Core/DolphinWX/Config/PathConfigPane.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/Core/DolphinWX/Config/PathConfigPane.cpp b/Source/Core/DolphinWX/Config/PathConfigPane.cpp index 5dcdd9f4f7..48eaaada0d 100644 --- a/Source/Core/DolphinWX/Config/PathConfigPane.cpp +++ b/Source/Core/DolphinWX/Config/PathConfigPane.cpp @@ -55,6 +55,9 @@ void PathConfigPane::InitializeGUI() m_nand_root_dirpicker = new wxDirPickerCtrl(this, wxID_ANY, wxEmptyString, _("Choose a NAND root directory:"), wxDefaultPosition, wxDefaultSize, wxDIRP_USE_TEXTCTRL | wxDIRP_SMALL); + m_dump_path_dirpicker = + new wxDirPickerCtrl(this, wxID_ANY, wxEmptyString, _("Choose a dump directory:"), + wxDefaultPosition, wxDefaultSize, wxDIRP_USE_TEXTCTRL | wxDIRP_SMALL); m_iso_paths_listbox->Bind(wxEVT_LISTBOX, &PathConfigPane::OnISOPathSelectionChanged, this); m_recursive_iso_paths_checkbox->Bind(wxEVT_CHECKBOX, @@ -67,6 +70,7 @@ void PathConfigPane::InitializeGUI() m_apploader_path_filepicker->Bind(wxEVT_FILEPICKER_CHANGED, &PathConfigPane::OnApploaderPathChanged, this); m_nand_root_dirpicker->Bind(wxEVT_DIRPICKER_CHANGED, &PathConfigPane::OnNANDRootChanged, this); + m_dump_path_dirpicker->Bind(wxEVT_DIRPICKER_CHANGED, &PathConfigPane::OnDumpPathChanged, this); wxBoxSizer* const iso_button_sizer = new wxBoxSizer(wxHORIZONTAL); iso_button_sizer->Add(m_recursive_iso_paths_checkbox, 0, wxALL | wxALIGN_CENTER); @@ -94,6 +98,9 @@ void PathConfigPane::InitializeGUI() picker_sizer->Add(new wxStaticText(this, wxID_ANY, _("Wii NAND Root:")), wxGBPosition(3, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL | wxALL, 5); picker_sizer->Add(m_nand_root_dirpicker, wxGBPosition(3, 1), wxDefaultSpan, wxEXPAND | wxALL, 5); + picker_sizer->Add(new wxStaticText(this, wxID_ANY, _("Dump Path:")), wxGBPosition(4, 0), + wxDefaultSpan, wxALIGN_CENTER_VERTICAL | wxALL, 5); + picker_sizer->Add(m_dump_path_dirpicker, wxGBPosition(4, 1), wxDefaultSpan, wxEXPAND | wxALL, 5); picker_sizer->AddGrowableCol(1); // Populate the Paths page @@ -113,6 +120,7 @@ void PathConfigPane::LoadGUIValues() m_dvd_root_dirpicker->SetPath(StrToWxStr(startup_params.m_strDVDRoot)); m_apploader_path_filepicker->SetPath(StrToWxStr(startup_params.m_strApploader)); m_nand_root_dirpicker->SetPath(StrToWxStr(SConfig::GetInstance().m_NANDPath)); + m_dump_path_dirpicker->SetPath(StrToWxStr(SConfig::GetInstance().m_DumpPath)); // Update selected ISO paths for (const std::string& folder : SConfig::GetInstance().m_ISOFolder) @@ -200,6 +208,14 @@ void PathConfigPane::OnNANDRootChanged(wxCommandEvent& event) main_frame->UpdateWiiMenuChoice(); } +void PathConfigPane::OnDumpPathChanged(wxCommandEvent& event) +{ + std::string dump_path = SConfig::GetInstance().m_DumpPath = + WxStrToStr(m_dump_path_dirpicker->GetPath()); + + m_dump_path_dirpicker->SetPath(StrToWxStr(dump_path)); +} + void PathConfigPane::SaveISOPathChanges() { SConfig::GetInstance().m_ISOFolder.clear(); |
