]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/frame.cpp
Declare strptime when using MSL headers on OS X.
[wxWidgets.git] / src / gtk / frame.cpp
index afe3ebd900c04a16ac8fcdd97c6af1b42e4b8042..1bf86a39a5f9f74d21efbb6114c526787b27de2e 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "wx/defs.h"
 
 
 #include "wx/defs.h"
 
+#include "wx/frame.h"
 #include "wx/dialog.h"
 #include "wx/control.h"
 #include "wx/app.h"
 #include "wx/dialog.h"
 #include "wx/control.h"
 #include "wx/app.h"
@@ -79,6 +80,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxTopLevelWindow)
 // "child_attached" of menu bar
 //-----------------------------------------------------------------------------
 
 // "child_attached" of menu bar
 //-----------------------------------------------------------------------------
 
+extern "C" {
 static void gtk_menu_attached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *WXUNUSED(child), wxFrame *win )
 {
     if (!win->m_hasVMT) return;
 static void gtk_menu_attached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *WXUNUSED(child), wxFrame *win )
 {
     if (!win->m_hasVMT) return;
@@ -86,11 +88,13 @@ static void gtk_menu_attached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *
     win->m_menuBarDetached = FALSE;
     win->GtkUpdateSize();
 }
     win->m_menuBarDetached = FALSE;
     win->GtkUpdateSize();
 }
+}
 
 //-----------------------------------------------------------------------------
 // "child_detached" of menu bar
 //-----------------------------------------------------------------------------
 
 
 //-----------------------------------------------------------------------------
 // "child_detached" of menu bar
 //-----------------------------------------------------------------------------
 
+extern "C" {
 static void gtk_menu_detached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *WXUNUSED(child), wxFrame *win )
 {
     if (g_isIdle)
 static void gtk_menu_detached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *WXUNUSED(child), wxFrame *win )
 {
     if (g_isIdle)
@@ -104,6 +108,7 @@ static void gtk_menu_detached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *
     win->m_menuBarDetached = TRUE;
     win->GtkUpdateSize();
 }
     win->m_menuBarDetached = TRUE;
     win->GtkUpdateSize();
 }
+}
 
 #endif // wxUSE_MENUS_NATIVE
 
 
 #endif // wxUSE_MENUS_NATIVE
 
@@ -112,6 +117,7 @@ static void gtk_menu_detached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *
 // "child_attached" of tool bar
 //-----------------------------------------------------------------------------
 
 // "child_attached" of tool bar
 //-----------------------------------------------------------------------------
 
+extern "C" {
 static void gtk_toolbar_attached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *WXUNUSED(child), wxFrame *win )
 {
     if (!win->m_hasVMT) return;
 static void gtk_toolbar_attached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *WXUNUSED(child), wxFrame *win )
 {
     if (!win->m_hasVMT) return;
@@ -119,11 +125,13 @@ static void gtk_toolbar_attached_callback( GtkWidget *WXUNUSED(widget), GtkWidge
     win->m_toolBarDetached = FALSE;
     win->GtkUpdateSize();
 }
     win->m_toolBarDetached = FALSE;
     win->GtkUpdateSize();
 }
+}
 
 //-----------------------------------------------------------------------------
 // "child_detached" of tool bar
 //-----------------------------------------------------------------------------
 
 
 //-----------------------------------------------------------------------------
 // "child_detached" of tool bar
 //-----------------------------------------------------------------------------
 
+extern "C" {
 static void gtk_toolbar_detached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *WXUNUSED(child), wxFrame *win )
 {
     if (g_isIdle)
 static void gtk_toolbar_detached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *WXUNUSED(child), wxFrame *win )
 {
     if (g_isIdle)
@@ -137,6 +145,7 @@ static void gtk_toolbar_detached_callback( GtkWidget *WXUNUSED(widget), GtkWidge
     win->m_toolBarDetached = TRUE;
     win->GtkUpdateSize();
 }
     win->m_toolBarDetached = TRUE;
     win->GtkUpdateSize();
 }
+}
 #endif // wxUSE_TOOLBAR
 
 
 #endif // wxUSE_TOOLBAR
 
 
@@ -607,13 +616,13 @@ void wxFrame::AttachMenuBar( wxMenuBar *menuBar )
 
 void wxFrame::UpdateMenuBarSize()
 {
 
 void wxFrame::UpdateMenuBarSize()
 {
-    wxASSERT_MSG( m_frameMenuBar, _T("Updating non existant menubar?") );
-
     GtkRequisition  req;
 
     req.width = 2;
     req.height = 2;
     GtkRequisition  req;
 
     req.width = 2;
     req.height = 2;
-
+    
+    // this is called after Remove with a NULL m_frameMenuBar
+    if ( m_frameMenuBar )
     (* GTK_WIDGET_CLASS( GTK_OBJECT_GET_CLASS(m_frameMenuBar->m_widget) )->size_request )
         (m_frameMenuBar->m_widget, &req );
 
     (* GTK_WIDGET_CLASS( GTK_OBJECT_GET_CLASS(m_frameMenuBar->m_widget) )->size_request )
         (m_frameMenuBar->m_widget, &req );