mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-05-05 10:42:39 +00:00
DolphinWX: Make the main config dialog modeless
This commit is contained in:
parent
bfa9cc2736
commit
c2d00d25fe
8 changed files with 81 additions and 41 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue