post wxUniv merge fixes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10719 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2001-06-29 16:19:53 +00:00
parent bf7b3e2b9d
commit 90b959aee4
30 changed files with 186 additions and 429 deletions

View File

@@ -347,22 +347,6 @@ bool wxMenu::ProcessCommand(wxCommandEvent & event)
// other
// ---------------------------------------------------------------------------
void wxMenu::Attach(wxMenuBar *menubar)
{
// menu can be in at most one menubar because otherwise they would both
// delete the menu pointer
wxASSERT_MSG( !m_menuBar, wxT("menu belongs to 2 menubars, expect a crash") );
m_menuBar = menubar;
}
void wxMenu::Detach()
{
wxASSERT_MSG( m_menuBar, wxT("can't detach menu if it's not attached") );
m_menuBar = NULL;
}
wxWindow *wxMenu::GetWindow() const
{
if ( m_invokingWindow != NULL )
@@ -979,8 +963,6 @@ bool wxMenuBar::Append(wxMenu *menu, const wxString& title)
if ( !wxMenuBarBase::Append(menu, title) )
return FALSE;
menu->Attach(this);
m_titles.Add(title);
if ( IsAttached() )
@@ -1004,11 +986,14 @@ bool wxMenuBar::Append(wxMenu *menu, const wxString& title)
return TRUE;
}
void wxMenuBar::Detach()
{
wxMenuBarBase::Detach() ;
}
void wxMenuBar::Attach(wxFrame *frame)
{
// wxASSERT_MSG( !IsAttached(), wxT("menubar already attached!") );
m_menuBarFrame = frame;
wxMenuBarBase::Attach( frame ) ;
#if wxUSE_ACCEL
RebuildAccelTable();