- wxNode *node = m_menuBar->m_menus.First();
- while (node)
- {
- wxMenu *menu = (wxMenu*)node->Data();
- SetInvokingWindow( menu, this );
- node = node->Next();
- }
-
- m_menuBar->m_parent = mdi_frame;
+ wxMDIParentFrame *mdi_frame = (wxMDIParentFrame*)m_parent->m_parent;
+
+ if (m_menuBar->m_parent != this)
+ {
+ wxNode *node = m_menuBar->m_menus.First();
+ while (node)
+ {
+ wxMenu *menu = (wxMenu*)node->Data();
+ SetInvokingWindow( menu, this );
+ node = node->Next();
+ }
+
+ m_menuBar->m_parent = mdi_frame;
+ }
+ mdi_frame->SetMDIMenuBar( m_menuBar );
+
+ gtk_myfixed_put( GTK_MYFIXED(mdi_frame->m_wxwindow),
+ m_menuBar->m_widget, m_menuBar->m_x, m_menuBar->m_y );