mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 04:38:49 +00:00
CodeWindow: Hide GetMenuBar()
This eliminates public usage of the GetMenuBar() function in CodeWindow. The benefit of this is it also gets rid of the need to perform direct access across the config dialog and the main frame. It also gets rid of the use of the main_frame global. GetMenuBar() will be removed entirely from CodeWindow in a follow-up that also removes any related remnants of code made obsolete with its removal.
This commit is contained in:
parent
5ae6c21c2e
commit
5d4c714662
4 changed files with 19 additions and 18 deletions
|
@ -210,7 +210,8 @@ void CFrame::BindDebuggerMenuBarUpdateEvents()
|
|||
Bind(wxEVT_UPDATE_UI, &CFrame::OnEnableMenuItemIfCPUCanStep, this, IDM_STEPOUT);
|
||||
Bind(wxEVT_UPDATE_UI, &CFrame::OnEnableMenuItemIfCPUCanStep, this, IDM_STEPOVER);
|
||||
|
||||
Bind(wxEVT_UPDATE_UI, &CFrame::OnEnableMenuItemIfCorePaused, this, IDM_INTERPRETER);
|
||||
Bind(wxEVT_UPDATE_UI, &CFrame::OnUpdateInterpreterMenuItem, this, IDM_INTERPRETER);
|
||||
|
||||
Bind(wxEVT_UPDATE_UI, &CFrame::OnEnableMenuItemIfCorePaused, this, IDM_JIT_OFF);
|
||||
Bind(wxEVT_UPDATE_UI, &CFrame::OnEnableMenuItemIfCorePaused, this, IDM_JIT_LS_OFF);
|
||||
Bind(wxEVT_UPDATE_UI, &CFrame::OnEnableMenuItemIfCorePaused, this, IDM_JIT_LSLXZ_OFF);
|
||||
|
@ -1086,6 +1087,16 @@ void CFrame::OnEnableMenuItemIfCPUCanStep(wxUpdateUIEvent& event)
|
|||
event.Enable(Core::GetState() != Core::CORE_UNINITIALIZED && CPU::IsStepping());
|
||||
}
|
||||
|
||||
void CFrame::OnUpdateInterpreterMenuItem(wxUpdateUIEvent& event)
|
||||
{
|
||||
OnEnableMenuItemIfCorePaused(event);
|
||||
|
||||
if (GetMenuBar()->FindItem(IDM_INTERPRETER)->IsChecked())
|
||||
return;
|
||||
|
||||
event.Check(SConfig::GetInstance().iCPUCore == PowerPC::CORE_INTERPRETER);
|
||||
}
|
||||
|
||||
void CFrame::ClearStatusBar()
|
||||
{
|
||||
if (this->GetStatusBar()->IsEnabled())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue