- if (m_mdiMenuBar) m_mdiMenuBar->Show( FALSE );
- m_mdiMenuBar = menu_bar;
- if (m_mdiMenuBar)
- {
- m_mdiMenuBar->m_x = 1;
- m_mdiMenuBar->m_y = 1;
- m_mdiMenuBar->m_width = m_width-2;
- m_mdiMenuBar->m_height = wxMENU_HEIGHT-2;
- gtk_myfixed_move( GTK_MYFIXED(m_wxwindow), m_mdiMenuBar->m_widget, 1, 1 );
- gtk_widget_set_usize( m_mdiMenuBar->m_widget, m_width-2, wxMENU_HEIGHT-2 );
- m_mdiMenuBar->Show( TRUE );
- }
+ /* hide old child menu bar */
+ if (m_mdiMenuBar) m_mdiMenuBar->Show( FALSE );
+
+ m_mdiMenuBar = menu_bar;
+
+ /* show and resize new menu child menu bar */
+ if (m_mdiMenuBar)
+ {
+ m_mdiMenuBar->m_x = 0;
+ m_mdiMenuBar->m_y = 0;
+ m_mdiMenuBar->m_width = m_width;
+ m_mdiMenuBar->m_height = wxMENU_HEIGHT;
+ gtk_myfixed_move( GTK_MYFIXED(m_wxwindow), m_mdiMenuBar->m_widget, 0, 0 );
+ gtk_widget_set_usize( m_mdiMenuBar->m_widget, m_width, wxMENU_HEIGHT );
+ m_mdiMenuBar->Show( TRUE );
+ }
+
+ /* show/hide parent menu bar as required */
+ if (m_frameMenuBar) m_frameMenuBar->Show( (m_mdiMenuBar == NULL) );