X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/655719367ac5e131d9642e5783f3ecf64d1a3385..1cc549e58c75763c9f861be71c93be5fd68bd04e:/src/gtk/frame.cpp

diff --git a/src/gtk/frame.cpp b/src/gtk/frame.cpp
index b6abf6f26b..f1f4317e11 100644
--- a/src/gtk/frame.cpp
+++ b/src/gtk/frame.cpp
@@ -520,7 +520,20 @@ void wxFrame::OnInternalIdle()
     if (m_frameToolBar) m_frameToolBar->OnInternalIdle();
 #endif
 #if wxUSE_STATUSBAR
-    if (m_frameStatusBar) m_frameStatusBar->OnInternalIdle();
+    if (m_frameStatusBar)
+    {
+        m_frameStatusBar->OnInternalIdle();
+
+        // There may be controls in the status bar that
+        // need to be updated
+        for ( wxWindowList::compatibility_iterator node = m_frameStatusBar->GetChildren().GetFirst();
+          node;
+          node = node->GetNext() )
+        {
+            wxWindow *child = node->GetData();
+            child->OnInternalIdle();
+        }
+    }
 #endif
 }
 
@@ -594,13 +607,13 @@ void wxFrame::AttachMenuBar( wxMenuBar *menuBar )
 
 void wxFrame::UpdateMenuBarSize()
 {
-    wxASSERT_MSG( m_frameMenuBar, _T("Updating non existant menubar?") );
-
     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 );
 
@@ -681,7 +694,7 @@ void wxFrame::SetStatusBar(wxStatusBar *statbar)
     
     wxFrameBase::SetStatusBar(statbar);
     
-    if (hadStatBar && !m_frameToolBar) 
+    if (hadStatBar && !m_frameStatusBar) 
         GtkUpdateSize();
 }