summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/FrameTools.cpp
diff options
context:
space:
mode:
authorMat M <mathew1800@gmail.com>2016-11-06 08:21:02 -0500
committerGitHub <noreply@github.com>2016-11-06 08:21:02 -0500
commit136a10482f099aec67cebd8673388f54b78458b6 (patch)
tree11fec99892342dc65ded42979b6b5274cfdee204 /Source/Core/DolphinWX/FrameTools.cpp
parent3924a9994297661a4a5d0609f304a14bde8f8464 (diff)
parentc2d00d25fe8b2f46eb35f039bc664b73669c3755 (diff)
Merge pull request #4427 from lioncash/config-update
DolphinWX: Enable/disable config UI options based on core state
Diffstat (limited to 'Source/Core/DolphinWX/FrameTools.cpp')
-rw-r--r--Source/Core/DolphinWX/FrameTools.cpp27
1 files changed, 13 insertions, 14 deletions
diff --git a/Source/Core/DolphinWX/FrameTools.cpp b/Source/Core/DolphinWX/FrameTools.cpp
index cb4297585f..ee9903ea5a 100644
--- a/Source/Core/DolphinWX/FrameTools.cpp
+++ b/Source/Core/DolphinWX/FrameTools.cpp
@@ -256,18 +256,13 @@ wxToolBar* CFrame::OnCreateToolBar(long style, wxWindowID id, const wxString& na
return new MainToolBar{type, this, id, wxDefaultPosition, wxDefaultSize, style};
}
-void CFrame::OpenGeneralConfiguration(int tab)
+void CFrame::OpenGeneralConfiguration(wxWindowID tab_id)
{
- CConfigMain config_main(this);
- if (tab > -1)
- config_main.SetSelectedTab(tab);
+ if (tab_id > wxID_ANY)
+ m_main_config_dialog->SetSelectedTab(tab_id);
- HotkeyManagerEmu::Enable(false);
- if (config_main.ShowModal() == wxID_OK)
- UpdateGameList();
- HotkeyManagerEmu::Enable(true);
-
- UpdateGUI();
+ m_main_config_dialog->Show();
+ m_main_config_dialog->SetFocus();
}
// Menu items
@@ -734,13 +729,11 @@ void CFrame::OnBootDrive(wxCommandEvent& event)
BootGame(drives[event.GetId() - IDM_DRIVE1]);
}
-// Refresh the file list and browse for a favorites directory
void CFrame::OnRefresh(wxCommandEvent& WXUNUSED(event))
{
UpdateGameList();
}
-// Create screenshot
void CFrame::OnScreenshot(wxCommandEvent& WXUNUSED(event))
{
Core::SaveScreenShot();
@@ -1067,6 +1060,11 @@ void CFrame::OnReloadThemeBitmaps(wxCommandEvent& WXUNUSED(event))
UpdateGameList();
}
+void CFrame::OnReloadGameList(wxCommandEvent& WXUNUSED(event))
+{
+ UpdateGameList();
+}
+
void CFrame::OnEnableMenuItemIfCoreInitialized(wxUpdateUIEvent& event)
{
event.Enable(Core::GetState() != Core::CORE_UNINITIALIZED);
@@ -1531,8 +1529,9 @@ void CFrame::UpdateGUI()
void CFrame::UpdateGameList()
{
- if (m_GameListCtrl)
- m_GameListCtrl->ReloadList();
+ wxCommandEvent event{DOLPHIN_EVT_RELOAD_GAMELIST, GetId()};
+ event.SetEventObject(this);
+ wxPostEvent(m_GameListCtrl, event);
}
void CFrame::GameListChanged(wxCommandEvent& event)