]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/mdi.cpp
Another Unicode fix.
[wxWidgets.git] / src / gtk / mdi.cpp
index 5df3bbfd17db05b47c26e4f7d7369a5bceb55a96..85eb0270c7b38ea91bf954dfc89d9de2cda875e6 100644 (file)
@@ -112,6 +112,7 @@ void wxMDIParentFrame::OnInternalIdle()
     wxFrame::OnInternalIdle();
 
     wxMDIChildFrame *active_child_frame = GetActiveChild();
+    bool visible_child_menu = FALSE;
 
     wxNode *node = m_clientWindow->m_children.First();
     while (node)
@@ -120,7 +121,10 @@ void wxMDIParentFrame::OnInternalIdle()
         if (child_frame->m_menuBar)
         {
             if (child_frame == active_child_frame)
+           {
                gtk_widget_show( child_frame->m_menuBar->m_widget );
+              visible_child_menu = TRUE;
+           }
             else
                gtk_widget_hide( child_frame->m_menuBar->m_widget );
         }
@@ -128,7 +132,7 @@ void wxMDIParentFrame::OnInternalIdle()
     }
 
     /* show/hide parent menu bar as required */
-    if (m_frameMenuBar) m_frameMenuBar->Show( (active_child_frame == NULL) );
+    if (m_frameMenuBar) m_frameMenuBar->Show( !visible_child_menu );
 }
 
 void wxMDIParentFrame::GetClientSize(int *width, int *height ) const
@@ -331,7 +335,7 @@ static void wxInsertChildInMDI( wxMDIClientWindow* parent, wxMDIChildFrame* chil
     wxString s = child->m_title;
     if (s.IsNull()) s = _("MDI child");
 
-    GtkWidget *label_widget = gtk_label_new( s );
+    GtkWidget *label_widget = gtk_label_new( s.mbc_str() );
     gtk_misc_set_alignment( GTK_MISC(label_widget), 0.0, 0.5 );
 
     gtk_signal_connect( GTK_OBJECT(child->m_widget), "size_allocate",