X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c801d85f158c4cba50b588807daabdcbd0ed3853..cf5f9c9c3e06f4d1104fdeabc61c5e756a24c872:/src/gtk/dialog.cpp diff --git a/src/gtk/dialog.cpp b/src/gtk/dialog.cpp index 0c63e39f11..b38fedf806 100644 --- a/src/gtk/dialog.cpp +++ b/src/gtk/dialog.cpp @@ -57,7 +57,7 @@ wxDialog::wxDialog(void) wxDialog::wxDialog( wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &pos, const wxSize &size, - const long style, const wxString &name ) + long style, const wxString &name ) { wxTopLevelWindows.Insert( this ); Create( parent, id, title, pos, size, style, name ); @@ -66,7 +66,7 @@ wxDialog::wxDialog( wxWindow *parent, bool wxDialog::Create( wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &pos, const wxSize &size, - const long style, const wxString &name ) + long style, const wxString &name ) { m_needParent = FALSE; @@ -120,7 +120,9 @@ void wxDialog::OnApply( wxCommandEvent &WXUNUSED(event) ) void wxDialog::OnCancel( wxCommandEvent &WXUNUSED(event) ) { if (IsModal()) + { EndModal(wxID_CANCEL); + } else { SetReturnCode(wxID_CANCEL); @@ -133,14 +135,15 @@ void wxDialog::OnOk( wxCommandEvent &WXUNUSED(event) ) if ( Validate() && TransferDataFromWindow()) { if (IsModal()) + { EndModal(wxID_OK); + } else { SetReturnCode(wxID_OK); this->Show(FALSE); }; }; - EndModal( wxID_OK ); }; void wxDialog::OnPaint( wxPaintEvent& WXUNUSED(event) ) @@ -153,7 +156,7 @@ bool wxDialog::OnClose(void) static wxList closing; if (closing.Member(this)) return FALSE; // no loops - + closing.Append(this); wxCommandEvent cancelEvent(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL); @@ -172,7 +175,7 @@ void wxDialog::OnCloseWindow(wxCloseEvent& event) }; }; -bool wxDialog::Show( const bool show ) +bool wxDialog::Show( bool show ) { if (!show && m_modalShowing) {