summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/FrameTools.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2016-11-05 20:53:40 -0400
committerLioncash <mathew1800@gmail.com>2016-11-06 08:04:54 -0500
commitc2d00d25fe8b2f46eb35f039bc664b73669c3755 (patch)
treeef25cdc3b6d64d58201c694969afa9586e5b3b8f /Source/Core/DolphinWX/FrameTools.cpp
parentbfa9cc27361415a78ddb366764be6f929bf78d6a (diff)
DolphinWX: Make the main config dialog modeless
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)