added menubar update OnActivate for multiple frames with their own menubars, it's not perfect (menu merge) would be better, but at last something
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9441 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -230,7 +230,7 @@ void wxFrame::SetMenuBar(wxMenuBar *menuBar)
|
||||
|
||||
m_frameMenuBar = NULL;
|
||||
m_frameMenuBar = menuBar;
|
||||
m_frameMenuBar->MacInstallMenuBar() ;
|
||||
// m_frameMenuBar->MacInstallMenuBar() ;
|
||||
m_frameMenuBar->Attach(this);
|
||||
}
|
||||
|
||||
@@ -283,9 +283,14 @@ void wxFrame::OnActivate(wxActivateEvent& event)
|
||||
)
|
||||
{
|
||||
child->SetFocus();
|
||||
return;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( m_frameMenuBar != NULL )
|
||||
{
|
||||
m_frameMenuBar->MacInstallMenuBar() ;
|
||||
}
|
||||
}
|
||||
|
||||
void wxFrame::DoGetClientSize(int *x, int *y) const
|
||||
|
@@ -631,6 +631,9 @@ void wxMenuBar::RebuildAccelTable()
|
||||
|
||||
void wxMenuBar::MacInstallMenuBar()
|
||||
{
|
||||
if ( s_macInstalledMenuBar == this )
|
||||
return ;
|
||||
|
||||
Handle menubar = ::GetNewMBar( kwxMacMenuBarResource ) ;
|
||||
wxString message ;
|
||||
wxCHECK_RET( menubar != NULL, "can't read MBAR resource" );
|
||||
|
@@ -230,7 +230,7 @@ void wxFrame::SetMenuBar(wxMenuBar *menuBar)
|
||||
|
||||
m_frameMenuBar = NULL;
|
||||
m_frameMenuBar = menuBar;
|
||||
m_frameMenuBar->MacInstallMenuBar() ;
|
||||
// m_frameMenuBar->MacInstallMenuBar() ;
|
||||
m_frameMenuBar->Attach(this);
|
||||
}
|
||||
|
||||
@@ -283,9 +283,14 @@ void wxFrame::OnActivate(wxActivateEvent& event)
|
||||
)
|
||||
{
|
||||
child->SetFocus();
|
||||
return;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( m_frameMenuBar != NULL )
|
||||
{
|
||||
m_frameMenuBar->MacInstallMenuBar() ;
|
||||
}
|
||||
}
|
||||
|
||||
void wxFrame::DoGetClientSize(int *x, int *y) const
|
||||
|
@@ -631,6 +631,9 @@ void wxMenuBar::RebuildAccelTable()
|
||||
|
||||
void wxMenuBar::MacInstallMenuBar()
|
||||
{
|
||||
if ( s_macInstalledMenuBar == this )
|
||||
return ;
|
||||
|
||||
Handle menubar = ::GetNewMBar( kwxMacMenuBarResource ) ;
|
||||
wxString message ;
|
||||
wxCHECK_RET( menubar != NULL, "can't read MBAR resource" );
|
||||
|
Reference in New Issue
Block a user