git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2405
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
void wxGenericMessageDialog::OnYes(wxCommandEvent& WXUNUSED(event))
{
void wxGenericMessageDialog::OnYes(wxCommandEvent& WXUNUSED(event))
{
EndModal( wxID_YES );
}
void wxGenericMessageDialog::OnNo(wxCommandEvent& WXUNUSED(event))
{
EndModal( wxID_YES );
}
void wxGenericMessageDialog::OnNo(wxCommandEvent& WXUNUSED(event))
{
EndModal( wxID_NO );
}
void wxGenericMessageDialog::OnCancel(wxCommandEvent& WXUNUSED(event))
{
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) )
/* Allow cancellation via ESC/Close button except if
only YES and NO are specified. */
if ( (m_dialogStyle & wxYES_NO) != wxYES_NO || (m_dialogStyle & wxCANCEL) )
if (!button->m_hasVMT) return;
if (g_blockEventsOnDrag) return;
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);
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, button->GetId());
event.SetEventObject(button);
button->GetEventHandler()->ProcessEvent(event);
+ m_isBeingDeleted = TRUE;
+
wxTopLevelWindows.DeleteObject( this );
if (wxTheApp->GetTopWindow() == this)
wxTopLevelWindows.DeleteObject( this );
if (wxTheApp->GetTopWindow() == this)
void wxDialog::OnOK( wxCommandEvent &WXUNUSED(event) )
{
void wxDialog::OnOK( wxCommandEvent &WXUNUSED(event) )
{
if (Validate() && TransferDataFromWindow())
{
if (Validate() && TransferDataFromWindow())
{
- printf( "OnOK: modal.\n" );
EndModal(wxID_OK);
}
else
{
EndModal(wxID_OK);
}
else
{
- printf( "OnOK: non-modal.\n" );
SetReturnCode(wxID_OK);
this->Show(FALSE);
}
SetReturnCode(wxID_OK);
this->Show(FALSE);
}
+ m_isBeingDeleted = TRUE;
+
if (m_frameMenuBar) delete m_frameMenuBar;
m_frameMenuBar = (wxMenuBar *) NULL;
if (m_frameMenuBar) delete m_frameMenuBar;
m_frameMenuBar = (wxMenuBar *) NULL;
m_sizeSet = FALSE;
m_hasVMT = FALSE;
m_needParent = TRUE;
m_sizeSet = FALSE;
m_hasVMT = FALSE;
m_needParent = TRUE;
+ m_isBeingDeleted = FALSE;
m_hasScrolling = FALSE;
m_isScrolling = FALSE;
m_hasScrolling = FALSE;
m_isScrolling = FALSE;
+ m_isBeingDeleted = TRUE;
m_hasVMT = FALSE;
if (m_widget)
m_hasVMT = FALSE;
if (m_widget)
if (!button->m_hasVMT) return;
if (g_blockEventsOnDrag) return;
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);
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, button->GetId());
event.SetEventObject(button);
button->GetEventHandler()->ProcessEvent(event);
+ m_isBeingDeleted = TRUE;
+
wxTopLevelWindows.DeleteObject( this );
if (wxTheApp->GetTopWindow() == this)
wxTopLevelWindows.DeleteObject( this );
if (wxTheApp->GetTopWindow() == this)
void wxDialog::OnOK( wxCommandEvent &WXUNUSED(event) )
{
void wxDialog::OnOK( wxCommandEvent &WXUNUSED(event) )
{
if (Validate() && TransferDataFromWindow())
{
if (Validate() && TransferDataFromWindow())
{
- printf( "OnOK: modal.\n" );
EndModal(wxID_OK);
}
else
{
EndModal(wxID_OK);
}
else
{
- printf( "OnOK: non-modal.\n" );
SetReturnCode(wxID_OK);
this->Show(FALSE);
}
SetReturnCode(wxID_OK);
this->Show(FALSE);
}
+ m_isBeingDeleted = TRUE;
+
if (m_frameMenuBar) delete m_frameMenuBar;
m_frameMenuBar = (wxMenuBar *) NULL;
if (m_frameMenuBar) delete m_frameMenuBar;
m_frameMenuBar = (wxMenuBar *) NULL;
m_sizeSet = FALSE;
m_hasVMT = FALSE;
m_needParent = TRUE;
m_sizeSet = FALSE;
m_hasVMT = FALSE;
m_needParent = TRUE;
+ m_isBeingDeleted = FALSE;
m_hasScrolling = FALSE;
m_isScrolling = FALSE;
m_hasScrolling = FALSE;
m_isScrolling = FALSE;
+ m_isBeingDeleted = TRUE;
m_hasVMT = FALSE;
if (m_widget)
m_hasVMT = FALSE;
if (m_widget)