* Add bool parameter to WindowDidResignKey indicating whether the menu bar
should be changed to the common menubar or remain installed. * Add back some assertions to ensure the code is working as intended. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24108 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
a912c1849d
commit
c1f12896c2
@ -43,7 +43,7 @@ public:
|
||||
void SetMainMenuBar(wxMenuBar* menubar);
|
||||
void CocoaInternalIdle();
|
||||
void WindowDidBecomeKey(wxTopLevelWindowNative *win);
|
||||
void WindowDidResignKey(wxTopLevelWindowNative *win);
|
||||
void WindowDidResignKey(wxTopLevelWindowNative *win, bool uninstallMenuBar = true);
|
||||
void WindowDidBecomeMain(wxTopLevelWindowNative *win);
|
||||
void WindowDidResignMain(wxTopLevelWindowNative *win);
|
||||
void UpdateWindowMenuBar(wxTopLevelWindowNative *win);
|
||||
|
@ -161,21 +161,22 @@ void wxMenuBarManager::InstallMainMenu()
|
||||
|
||||
void wxMenuBarManager::WindowDidBecomeKey(wxTopLevelWindowNative *win)
|
||||
{
|
||||
// wxASSERT(!m_windowKey);
|
||||
wxASSERT(!m_windowKey);
|
||||
m_windowKey = win;
|
||||
InstallMenuBarForWindow(win);
|
||||
}
|
||||
|
||||
void wxMenuBarManager::WindowDidResignKey(wxTopLevelWindowNative *win)
|
||||
void wxMenuBarManager::WindowDidResignKey(wxTopLevelWindowNative *win, bool uninstallMenuBar)
|
||||
{
|
||||
wxASSERT(m_windowKey==win);
|
||||
m_windowKey = NULL;
|
||||
SetMenuBar(NULL);
|
||||
if(uninstallMenuBar)
|
||||
SetMenuBar(NULL);
|
||||
}
|
||||
|
||||
void wxMenuBarManager::WindowDidBecomeMain(wxTopLevelWindowNative *win)
|
||||
{
|
||||
// wxASSERT(!m_windowMain);
|
||||
wxASSERT(!m_windowMain);
|
||||
m_windowMain = win;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user