]> git.saurik.com Git - wxWidgets.git/commitdiff
Implememted IsBeingDeleted() -> buttons work again
authorRobert Roebling <robert@roebling.de>
Tue, 11 May 1999 08:23:53 +0000 (08:23 +0000)
committerRobert Roebling <robert@roebling.de>
Tue, 11 May 1999 08:23:53 +0000 (08:23 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2405 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/msgdlgg.cpp
src/gtk/button.cpp
src/gtk/dialog.cpp
src/gtk/frame.cpp
src/gtk/window.cpp
src/gtk1/button.cpp
src/gtk1/dialog.cpp
src/gtk1/frame.cpp
src/gtk1/window.cpp

index 0c40ccf0f4264ceea3221ac4c7d2283c189cb8f7..a62f4797484538a356683b647c6e19d7fe0773de 100644 (file)
@@ -161,19 +161,16 @@ wxGenericMessageDialog::wxGenericMessageDialog( wxWindow *parent, const wxString
 
 void wxGenericMessageDialog::OnYes(wxCommandEvent& WXUNUSED(event))
 {
-    printf( "yes.\n" );
     EndModal( wxID_YES );
 }
 
 void wxGenericMessageDialog::OnNo(wxCommandEvent& WXUNUSED(event))
 {
-    printf( "no.\n" );
     EndModal( wxID_NO );
 }
 
 void wxGenericMessageDialog::OnCancel(wxCommandEvent& WXUNUSED(event))
 {
-    printf( "cancel message.\n" );
     /* Allow cancellation via ESC/Close button except if
        only YES and NO are specified. */
     if ( (m_dialogStyle & wxYES_NO) != wxYES_NO || (m_dialogStyle & wxCANCEL) )
index 62e357c733284bc151a8a3e81a4a6018314b0648..140e4380ef0b5baefad76bbb1d41cf0a8ea390c0 100644 (file)
@@ -47,8 +47,6 @@ static void gtk_button_clicked_callback( GtkWidget *WXUNUSED(widget), wxButton *
     if (!button->m_hasVMT) return;
     if (g_blockEventsOnDrag) return;
     
-    printf( "clicked: %s.\n", button->GetLabel().c_str() );
-    
     wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, button->GetId());
     event.SetEventObject(button);
     button->GetEventHandler()->ProcessEvent(event);
index ee60f258f2873bb61975b7746d2b90f91e9eb5e6..92622c8f68c36411857ab565e7eb18c7e72d5dfa 100644 (file)
@@ -245,6 +245,8 @@ bool wxDialog::Create( wxWindow *parent,
 
 wxDialog::~wxDialog()
 {
+    m_isBeingDeleted = TRUE;
+    
     wxTopLevelWindows.DeleteObject( this );
 
     if (wxTheApp->GetTopWindow() == this)
@@ -290,18 +292,14 @@ void wxDialog::OnCancel( wxCommandEvent &WXUNUSED(event) )
 
 void wxDialog::OnOK( wxCommandEvent &WXUNUSED(event) )
 {
-    printf( "OnOK 1.\n" );
     if (Validate() && TransferDataFromWindow())
     {
-        printf( "OnOK 2.\n" );
         if (IsModal())
         {
-            printf( "OnOK: modal.\n" );
             EndModal(wxID_OK);
         }
         else
         {
-            printf( "OnOK: non-modal.\n" );
             SetReturnCode(wxID_OK);
             this->Show(FALSE);
         }
index 6fe147fa9b587518730efc4cdb0a749d2086394a..a0c6bb403fcc13d16ff8f85a27173b7478dbb1f2 100644 (file)
@@ -413,6 +413,8 @@ bool wxFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title,
 
 wxFrame::~wxFrame()
 {
+    m_isBeingDeleted = TRUE;
+    
     if (m_frameMenuBar) delete m_frameMenuBar;
     m_frameMenuBar = (wxMenuBar *) NULL;
     
index 4abdea598ab7dd4cc68ebbb40f1b9dc141208ad4..4af269002499ea6c8e003b55126177d664da27c4 100644 (file)
@@ -1453,6 +1453,7 @@ void wxWindow::Init()
     m_sizeSet = FALSE;
     m_hasVMT = FALSE;
     m_needParent = TRUE;
+    m_isBeingDeleted = FALSE;
 
     m_hasScrolling = FALSE;
     m_isScrolling = FALSE;
@@ -1633,6 +1634,7 @@ bool wxWindow::Create( wxWindow *parent, wxWindowID id,
 
 wxWindow::~wxWindow()
 {
+    m_isBeingDeleted = TRUE;
     m_hasVMT = FALSE;
 
     if (m_widget)
index 62e357c733284bc151a8a3e81a4a6018314b0648..140e4380ef0b5baefad76bbb1d41cf0a8ea390c0 100644 (file)
@@ -47,8 +47,6 @@ static void gtk_button_clicked_callback( GtkWidget *WXUNUSED(widget), wxButton *
     if (!button->m_hasVMT) return;
     if (g_blockEventsOnDrag) return;
     
-    printf( "clicked: %s.\n", button->GetLabel().c_str() );
-    
     wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, button->GetId());
     event.SetEventObject(button);
     button->GetEventHandler()->ProcessEvent(event);
index ee60f258f2873bb61975b7746d2b90f91e9eb5e6..92622c8f68c36411857ab565e7eb18c7e72d5dfa 100644 (file)
@@ -245,6 +245,8 @@ bool wxDialog::Create( wxWindow *parent,
 
 wxDialog::~wxDialog()
 {
+    m_isBeingDeleted = TRUE;
+    
     wxTopLevelWindows.DeleteObject( this );
 
     if (wxTheApp->GetTopWindow() == this)
@@ -290,18 +292,14 @@ void wxDialog::OnCancel( wxCommandEvent &WXUNUSED(event) )
 
 void wxDialog::OnOK( wxCommandEvent &WXUNUSED(event) )
 {
-    printf( "OnOK 1.\n" );
     if (Validate() && TransferDataFromWindow())
     {
-        printf( "OnOK 2.\n" );
         if (IsModal())
         {
-            printf( "OnOK: modal.\n" );
             EndModal(wxID_OK);
         }
         else
         {
-            printf( "OnOK: non-modal.\n" );
             SetReturnCode(wxID_OK);
             this->Show(FALSE);
         }
index 6fe147fa9b587518730efc4cdb0a749d2086394a..a0c6bb403fcc13d16ff8f85a27173b7478dbb1f2 100644 (file)
@@ -413,6 +413,8 @@ bool wxFrame::Create( wxWindow *parent, wxWindowID id, const wxString &title,
 
 wxFrame::~wxFrame()
 {
+    m_isBeingDeleted = TRUE;
+    
     if (m_frameMenuBar) delete m_frameMenuBar;
     m_frameMenuBar = (wxMenuBar *) NULL;
     
index 4abdea598ab7dd4cc68ebbb40f1b9dc141208ad4..4af269002499ea6c8e003b55126177d664da27c4 100644 (file)
@@ -1453,6 +1453,7 @@ void wxWindow::Init()
     m_sizeSet = FALSE;
     m_hasVMT = FALSE;
     m_needParent = TRUE;
+    m_isBeingDeleted = FALSE;
 
     m_hasScrolling = FALSE;
     m_isScrolling = FALSE;
@@ -1633,6 +1634,7 @@ bool wxWindow::Create( wxWindow *parent, wxWindowID id,
 
 wxWindow::~wxWindow()
 {
+    m_isBeingDeleted = TRUE;
     m_hasVMT = FALSE;
 
     if (m_widget)