]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/frame.cpp
Fixed blatant non-initialisation bug
[wxWidgets.git] / src / gtk1 / frame.cpp
index c55604c5aac81f94882528dd0b488bd76a6d4d91..301a3b309da675ca8a07f0a69f6e1c6bc80cc00f 100644 (file)
@@ -126,7 +126,7 @@ static void gtk_frame_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation*
 
         win->m_width = alloc->width;
         win->m_height = alloc->height;
-        win->UpdateSize();
+        win->GtkUpdateSize();
     }
 }
 
@@ -139,7 +139,7 @@ static gint gtk_frame_delete_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WX
     if (g_isIdle)
         wxapp_install_idle_handler();
 
-    if (g_openDialogs == 0)
+    if ((g_openDialogs == 0) && (win->IsEnabled()))
         win->Close();
 
     return TRUE;
@@ -154,7 +154,7 @@ static void gtk_menu_attached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *
     if (!win->m_hasVMT) return;
 
     win->m_menuBarDetached = FALSE;
-    win->UpdateSize();
+    win->GtkUpdateSize();
 }
 
 //-----------------------------------------------------------------------------
@@ -166,7 +166,7 @@ static void gtk_menu_detached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *
     if (!win->m_hasVMT) return;
 
     win->m_menuBarDetached = TRUE;
-    win->UpdateSize();
+    win->GtkUpdateSize();
 }
 
 #if wxUSE_TOOLBAR
@@ -180,7 +180,7 @@ static void gtk_toolbar_attached_callback( GtkWidget *WXUNUSED(widget), GtkWidge
 
     win->m_toolBarDetached = FALSE;
 
-    win->UpdateSize();
+    win->GtkUpdateSize();
 }
 
 //-----------------------------------------------------------------------------
@@ -195,7 +195,7 @@ static void gtk_toolbar_detached_callback( GtkWidget *WXUNUSED(widget), GtkWidge
     if (!win->m_hasVMT) return;
 
     win->m_toolBarDetached = TRUE;
-    win->UpdateSize();
+    win->GtkUpdateSize();
 }
 #endif // wxUSE_TOOLBAR
 
@@ -357,7 +357,7 @@ static void wxInsertChildInFrame( wxFrame* parent, wxWindow* child )
                          child->m_width,
                          child->m_height );
 
-#if wxUSE_TOOLBAR && !wxUSE_TOOLBAR_SIMPLE
+#if wxUSE_TOOLBAR_NATIVE
         /* we connect to these events for recalculating the client area
            space when the toolbar is floating */
         if (wxIS_KIND_OF(child,wxToolBar))
@@ -386,7 +386,7 @@ static void wxInsertChildInFrame( wxFrame* parent, wxWindow* child )
     }
 
     /* resize on OnInternalIdle */
-    parent->UpdateSize();
+    parent->GtkUpdateSize();
 }
 
 // ----------------------------------------------------------------------------
@@ -504,8 +504,11 @@ wxFrame::~wxFrame()
     if (wxTheApp->GetTopWindow() == this)
         wxTheApp->SetTopWindow( (wxWindow*) NULL );
 
-    if (wxTopLevelWindows.Number() == 0)
+    if ((wxTopLevelWindows.Number() == 0) &&
+        (wxTheApp->GetExitOnFrameDelete()))
+    {
         wxTheApp->ExitMainLoop();
+    }
 }
 
 // ----------------------------------------------------------------------------
@@ -529,6 +532,11 @@ bool wxFrame::Show( bool show )
     return wxWindow::Show( show );
 }
 
+void wxFrame::DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y), int WXUNUSED(width), int WXUNUSED(height) )
+{
+    wxFAIL_MSG( wxT("DoMoveWindow called for wxFrame") );
+}
+    
 void wxFrame::DoSetSize( int x, int y, int width, int height, int sizeFlags )
 {
     wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
@@ -955,7 +963,7 @@ void wxFrame::SetToolBar(wxToolBar *toolbar)
             GetChildren().DeleteObject( m_frameToolBar );
 
             gtk_widget_reparent( m_frameToolBar->m_widget, m_mainWidget );
-            UpdateSize();
+            GtkUpdateSize();
         }
     }
 }
@@ -977,6 +985,13 @@ wxStatusBar* wxFrame::CreateStatusBar(int number,
     return wxFrameBase::CreateStatusBar( number, style, id, name );
 }
 
+void wxFrame::PositionStatusBar()
+{
+    if ( !m_frameStatusBar )
+        return;
+
+    m_sizeSet = FALSE;
+}
 #endif // wxUSE_STATUSBAR
 
 // ----------------------------------------------------------------------------