+ if (menuBar == m_frameMenuBar)
+ return;
+
+ if (m_frameMenuBar)
+ {
+ m_frameMenuBar->UnsetInvokingWindow( this );
+
+ if (m_frameMenuBar->GetWindowStyle() & wxMB_DOCKABLE)
+ {
+ gtk_signal_disconnect_by_func( GTK_OBJECT(m_frameMenuBar->m_widget),
+ GTK_SIGNAL_FUNC(gtk_menu_attached_callback), (gpointer)this );
+
+ gtk_signal_disconnect_by_func( GTK_OBJECT(m_frameMenuBar->m_widget),
+ GTK_SIGNAL_FUNC(gtk_menu_detached_callback), (gpointer)this );
+ }
+
+ gtk_container_remove( GTK_CONTAINER(m_mainWidget), m_frameMenuBar->m_widget );
+ gtk_widget_ref( m_frameMenuBar->m_widget );
+ gtk_widget_unparent( m_frameMenuBar->m_widget );
+ }
+