]> 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 b96f0a96b25653e79d5763b34cdd4e20bfbd7bee..c314c3d28c50d2f49899654e33ded89fc0578799 100644 (file)
@@ -8,7 +8,7 @@
 /////////////////////////////////////////////////////////////////////////////
 
 #ifdef __GNUG__
 /////////////////////////////////////////////////////////////////////////////
 
 #ifdef __GNUG__
-#pragma implementation "frame.h"
+    #pragma implementation "frame.h"
 #endif
 
 #include "wx/frame.h"
 #endif
 
 #include "wx/frame.h"
@@ -104,6 +104,7 @@ static gint gtk_frame_configure_callback( GtkWidget *WXUNUSED(widget), GdkEventC
 
 BEGIN_EVENT_TABLE(wxFrame, wxWindow)
     EVT_SIZE(wxFrame::OnSize)
 
 BEGIN_EVENT_TABLE(wxFrame, wxWindow)
     EVT_SIZE(wxFrame::OnSize)
+    EVT_CLOSE(wxFrame::OnCloseWindow)
     EVT_MENU_HIGHLIGHT_ALL(wxFrame::OnMenuHighlight)
 END_EVENT_TABLE()
 
     EVT_MENU_HIGHLIGHT_ALL(wxFrame::OnMenuHighlight)
 END_EVENT_TABLE()
 
@@ -474,6 +475,13 @@ void wxFrame::OnInternalIdle()
     DoMenuUpdates();
 }
 
     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" );
 void wxFrame::OnSize( wxSizeEvent &WXUNUSED(event) )
 {
     wxASSERT_MSG( (m_widget != NULL), "invalid frame" );