Frame: Separate menu creation into individual functions

Keeps related menu items together based on top level menu. This will be
more convenient in the future when debugger menu bar item handling is
moved to CFrame, as it won't be a huge amount of code in one function.

This also makes it easier to locate menu bar code whenever it needs to be
changed.
This commit is contained in:
Lioncash
2016-10-10 16:41:58 -04:00
parent a583d36c7f
commit 6420a1c715
3 changed files with 238 additions and 203 deletions

View File

@ -401,10 +401,10 @@ CFrame::CFrame(wxFrame* parent, wxWindowID id, const wxString& title, wxRect geo
GetStatusBar()->Hide();
// Give it a menu bar
wxMenuBar* menubar_active = CreateMenu();
wxMenuBar* menubar_active = CreateMenuBar();
SetMenuBar(menubar_active);
// Create a menubar to service requests while the real menubar is hidden from the screen
m_menubar_shadow = CreateMenu();
m_menubar_shadow = CreateMenuBar();
// ---------------
// Main panel
@ -1306,7 +1306,7 @@ void CFrame::DoFullscreen(bool enable_fullscreen)
// Recreate the menubar if needed.
if (wxFrame::GetMenuBar() == nullptr)
{
SetMenuBar(CreateMenu());
SetMenuBar(CreateMenuBar());
}
// Show statusbar if enabled