]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/mdi.cpp
Added wxToggleButton handler
[wxWidgets.git] / src / gtk1 / mdi.cpp
index 8cf797cd63e507f9bc87e7fb3a564db43aa363ad..f1006d4ca57414e42ec367153740919e215d02a8 100644 (file)
@@ -7,13 +7,16 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 #pragma implementation "mdi.h"
 #endif
 
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
 #include "wx/mdi.h"
 
-#if wxUSE_MDI_ARCHITECTURE
+#if wxUSE_MDI
 
 #include "wx/dialog.h"
 #include "wx/menu.h"
@@ -161,6 +164,16 @@ void wxMDIParentFrame::OnInternalIdle()
         GtkNotebook *notebook = GTK_NOTEBOOK(m_clientWindow->m_widget);
         gtk_notebook_set_page( notebook, g_list_length( notebook->children ) - 1 );
 
+    /* need to set the menubar of the child */
+        wxMDIChildFrame *active_child_frame = GetActiveChild();
+        wxMenuBar *menu_bar = active_child_frame->m_menuBar;
+        menu_bar->m_width = m_width;
+        menu_bar->m_height = wxMENU_HEIGHT;
+        gtk_pizza_set_size( GTK_PIZZA(m_mainWidget),
+                            menu_bar->m_widget,
+                            0, 0, m_width, wxMENU_HEIGHT );
+        menu_bar->SetInvokingWindow(active_child_frame);
+
         m_justInserted = false;
         return;
     }