]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/frame.cpp
menu title is drawn in bold font and the commands from it are ignored
[wxWidgets.git] / src / gtk / frame.cpp
index af7887cf2c00a452b956611effea1c9f4630bc51..c314c3d28c50d2f49899654e33ded89fc0578799 100644 (file)
@@ -8,7 +8,7 @@
 /////////////////////////////////////////////////////////////////////////////
 
 #ifdef __GNUG__
-#pragma implementation "frame.h"
+    #pragma implementation "frame.h"
 #endif
 
 #include "wx/frame.h"
@@ -197,14 +197,14 @@ wxFrame::~wxFrame()
     if (m_frameToolBar) delete m_frameToolBar;
 
     wxTopLevelWindows.DeleteObject( this );
-    
+
     if (wxTheApp->GetTopWindow() == this)
     {
         wxTheApp->SetTopWindow( (wxWindow*) NULL );
     }
-    
+
     if (wxTopLevelWindows.Number() == 0)
-    {  
+    {
         wxTheApp->ExitMainLoop();
     }
 }
@@ -226,11 +226,6 @@ bool wxFrame::Show( bool show )
     return wxWindow::Show( show );
 }
 
-void wxFrame::OnCloseWindow( wxCloseEvent &event )
-{
-    if (GetEventHandler()->OnClose() || event.GetForce()) this->Destroy();
-}
-
 bool wxFrame::Destroy()
 {
     wxASSERT_MSG( (m_widget != NULL), "invalid frame" );
@@ -480,6 +475,13 @@ void wxFrame::OnInternalIdle()
     DoMenuUpdates();
 }
 
+void wxFrame::OnCloseWindow( wxCloseEvent& event )
+{
+    // close the window if it wasn't vetoed by the application
+//    if ( !event.GetVeto() ) // No, this isn't the interpretation of GetVeto.
+    Destroy();
+}
+
 void wxFrame::OnSize( wxSizeEvent &WXUNUSED(event) )
 {
     wxASSERT_MSG( (m_widget != NULL), "invalid frame" );