CodeWindow: Rename GetMenuBar() to GetParentMenuBar()

This commit is contained in:
Lioncash 2016-11-04 22:02:36 -04:00
parent 07e3835a49
commit 9543b9d20d
3 changed files with 12 additions and 13 deletions

View File

@ -132,7 +132,7 @@ CCodeWindow::~CCodeWindow()
m_aui_manager.UnInit(); m_aui_manager.UnInit();
} }
wxMenuBar* CCodeWindow::GetMenuBar() wxMenuBar* CCodeWindow::GetParentMenuBar()
{ {
return Parent->GetMenuBar(); return Parent->GetMenuBar();
} }
@ -539,27 +539,27 @@ void CCodeWindow::OnJitMenu(wxCommandEvent& event)
// Shortcuts // Shortcuts
bool CCodeWindow::UseInterpreter() bool CCodeWindow::UseInterpreter()
{ {
return GetMenuBar()->IsChecked(IDM_INTERPRETER); return GetParentMenuBar()->IsChecked(IDM_INTERPRETER);
} }
bool CCodeWindow::BootToPause() bool CCodeWindow::BootToPause()
{ {
return GetMenuBar()->IsChecked(IDM_BOOT_TO_PAUSE); return GetParentMenuBar()->IsChecked(IDM_BOOT_TO_PAUSE);
} }
bool CCodeWindow::AutomaticStart() bool CCodeWindow::AutomaticStart()
{ {
return GetMenuBar()->IsChecked(IDM_AUTOMATIC_START); return GetParentMenuBar()->IsChecked(IDM_AUTOMATIC_START);
} }
bool CCodeWindow::JITNoBlockCache() bool CCodeWindow::JITNoBlockCache()
{ {
return GetMenuBar()->IsChecked(IDM_JIT_NO_BLOCK_CACHE); return GetParentMenuBar()->IsChecked(IDM_JIT_NO_BLOCK_CACHE);
} }
bool CCodeWindow::JITNoBlockLinking() bool CCodeWindow::JITNoBlockLinking()
{ {
return GetMenuBar()->IsChecked(IDM_JIT_NO_BLOCK_LINKING); return GetParentMenuBar()->IsChecked(IDM_JIT_NO_BLOCK_LINKING);
} }
// Update GUI // Update GUI

View File

@ -123,8 +123,7 @@ public:
int iNbAffiliation[IDM_DEBUG_WINDOW_LIST_END - IDM_DEBUG_WINDOW_LIST_START]; int iNbAffiliation[IDM_DEBUG_WINDOW_LIST_END - IDM_DEBUG_WINDOW_LIST_START];
private: private:
// Parent interaction wxMenuBar* GetParentMenuBar();
wxMenuBar* GetMenuBar();
void OnCPUMode(wxCommandEvent& event); void OnCPUMode(wxCommandEvent& event);

View File

@ -93,8 +93,8 @@ void CCodeWindow::Save()
IniFile::Section* general = ini.GetOrCreateSection("General"); IniFile::Section* general = ini.GetOrCreateSection("General");
general->Set("DebuggerFont", WxStrToStr(DebuggerFont.GetNativeFontInfoUserDesc())); general->Set("DebuggerFont", WxStrToStr(DebuggerFont.GetNativeFontInfoUserDesc()));
general->Set("AutomaticStart", GetMenuBar()->IsChecked(IDM_AUTOMATIC_START)); general->Set("AutomaticStart", GetParentMenuBar()->IsChecked(IDM_AUTOMATIC_START));
general->Set("BootToPause", GetMenuBar()->IsChecked(IDM_BOOT_TO_PAUSE)); general->Set("BootToPause", GetParentMenuBar()->IsChecked(IDM_BOOT_TO_PAUSE));
const char* SettingName[] = {"Log", "LogConfig", "Console", "Registers", "Breakpoints", const char* SettingName[] = {"Log", "LogConfig", "Console", "Registers", "Breakpoints",
"Memory", "JIT", "Sound", "Video", "Code"}; "Memory", "JIT", "Sound", "Video", "Code"};
@ -102,7 +102,7 @@ void CCodeWindow::Save()
// Save windows settings // Save windows settings
for (int i = IDM_LOG_WINDOW; i <= IDM_VIDEO_WINDOW; i++) for (int i = IDM_LOG_WINDOW; i <= IDM_VIDEO_WINDOW; i++)
ini.GetOrCreateSection("ShowOnStart") ini.GetOrCreateSection("ShowOnStart")
->Set(SettingName[i - IDM_LOG_WINDOW], GetMenuBar()->IsChecked(i)); ->Set(SettingName[i - IDM_LOG_WINDOW], GetParentMenuBar()->IsChecked(i));
// Save notebook affiliations // Save notebook affiliations
std::string section = "P - " + Parent->Perspectives[Parent->ActivePerspective].Name; std::string section = "P - " + Parent->Perspectives[Parent->ActivePerspective].Name;
@ -125,7 +125,7 @@ void CCodeWindow::OnProfilerMenu(wxCommandEvent& event)
Core::SetState(Core::CORE_PAUSE); Core::SetState(Core::CORE_PAUSE);
if (jit != nullptr) if (jit != nullptr)
jit->ClearCache(); jit->ClearCache();
Profiler::g_ProfileBlocks = GetMenuBar()->IsChecked(IDM_PROFILE_BLOCKS); Profiler::g_ProfileBlocks = GetParentMenuBar()->IsChecked(IDM_PROFILE_BLOCKS);
Core::SetState(Core::CORE_RUN); Core::SetState(Core::CORE_RUN);
break; break;
case IDM_WRITE_PROFILE: case IDM_WRITE_PROFILE:
@ -467,7 +467,7 @@ void CCodeWindow::TogglePanel(int id, bool show)
wxPanel* panel = GetUntypedPanel(id); wxPanel* panel = GetUntypedPanel(id);
// Not all the panels (i.e. CodeWindow) have corresponding menu options. // Not all the panels (i.e. CodeWindow) have corresponding menu options.
wxMenuItem* item = GetMenuBar()->FindItem(id); wxMenuItem* item = GetParentMenuBar()->FindItem(id);
if (item) if (item)
item->Check(show); item->Check(show);