mirror of https://github.com/BOINC/boinc.git
- MGR: Use Destroy() instead of deleting the this pointer to cleanup
the dialog. clientgui/ DlgEventLog.cpp, .h svn path=/trunk/boinc/; revision=20012
This commit is contained in:
parent
711430b081
commit
918a7e5d26
|
@ -122,7 +122,7 @@ CDlgEventLog::~CDlgEventLog() {
|
||||||
* CDlgEventLog creator
|
* CDlgEventLog creator
|
||||||
*/
|
*/
|
||||||
|
|
||||||
bool CDlgEventLog::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
|
bool CDlgEventLog::Create( wxWindow* WXUNUSED(parent), wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
|
||||||
{
|
{
|
||||||
////@begin CDlgEventLog member initialisation
|
////@begin CDlgEventLog member initialisation
|
||||||
m_iPreviousDocCount = 0;
|
m_iPreviousDocCount = 0;
|
||||||
|
@ -217,6 +217,7 @@ void CDlgEventLog::CreateControls()
|
||||||
wxButton* itemButton44 = new wxButton(this, wxID_OK, _("Close"), wxDefaultPosition, wxDefaultSize);
|
wxButton* itemButton44 = new wxButton(this, wxID_OK, _("Close"), wxDefaultPosition, wxDefaultSize);
|
||||||
itemBoxSizer4->Add(itemButton44, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
itemBoxSizer4->Add(itemButton44, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||||
|
|
||||||
|
#ifndef __WXMSW__
|
||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
wxButton* itemButton45 = new wxButton(this, ID_SIMPLE_HELP, _("Help"), wxDefaultPosition, wxDefaultSize);
|
wxButton* itemButton45 = new wxButton(this, ID_SIMPLE_HELP, _("Help"), wxDefaultPosition, wxDefaultSize);
|
||||||
itemButton45->SetHelpText(
|
itemButton45->SetHelpText(
|
||||||
|
@ -230,6 +231,7 @@ void CDlgEventLog::CreateControls()
|
||||||
wxContextHelpButton* itemButton45 = new wxContextHelpButton(this);
|
wxContextHelpButton* itemButton45 = new wxContextHelpButton(this);
|
||||||
itemBoxSizer4->Add(itemButton45, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
itemBoxSizer4->Add(itemButton45, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -288,8 +290,8 @@ void CDlgEventLog::OnHelp(wxHelpEvent& event) {
|
||||||
* wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK
|
* wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void CDlgEventLog::OnOK( wxCommandEvent& /*event*/ ) {
|
void CDlgEventLog::OnOK( wxCommandEvent& WXUNUSED(event) ) {
|
||||||
delete this;
|
Destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -297,8 +299,8 @@ void CDlgEventLog::OnOK( wxCommandEvent& /*event*/ ) {
|
||||||
* wxEVT_CLOSE event handler for CDlgEventLog (window close control clicked)
|
* wxEVT_CLOSE event handler for CDlgEventLog (window close control clicked)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void CDlgEventLog::OnClose(wxCloseEvent& event) {
|
void CDlgEventLog::OnClose(wxCloseEvent& WXUNUSED(event)) {
|
||||||
delete this;
|
Destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue