]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/frame.cpp
fixed Xcode 1.2 warnings; code cleanup
[wxWidgets.git] / src / gtk1 / frame.cpp
index 7e1ed2b2ba6f5eb14136985853d0d7d73d44adec..45d8071cdca023f0d089206059040d354b21dea5 100644 (file)
 // headers
 // ----------------------------------------------------------------------------
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
     #pragma implementation "frame.h"
 #endif
 
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
 #include "wx/defs.h"
 
 #include "wx/dialog.h"
@@ -508,7 +511,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y),
 
 void wxFrame::OnInternalIdle()
 {
-    wxTopLevelWindow::OnInternalIdle();
+    wxFrameBase::OnInternalIdle();
 
 #if wxUSE_MENUS_NATIVE
     if (m_frameMenuBar) m_frameMenuBar->OnInternalIdle();
@@ -578,7 +581,7 @@ void wxFrame::AttachMenuBar( wxMenuBar *menuBar )
                 GTK_SIGNAL_FUNC(gtk_menu_detached_callback), (gpointer)this );
         }
         
-        m_frameMenuBar->Show( TRUE );
+        gtk_widget_show( m_frameMenuBar->m_widget );
 
         UpdateMenuBarSize();
     }
@@ -672,6 +675,16 @@ wxStatusBar* wxFrame::CreateStatusBar(int number,
     return wxFrameBase::CreateStatusBar( number, style, id, name );
 }
 
+void wxFrame::SetStatusBar(wxStatusBar *statbar)
+{
+    bool hadStatBar = m_frameStatusBar != NULL;
+    
+    wxFrameBase::SetStatusBar(statbar);
+    
+    if (hadStatBar && !m_frameToolBar) 
+        GtkUpdateSize();
+}
+
 void wxFrame::PositionStatusBar()
 {
     if ( !m_frameStatusBar )