X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c2ff68d3fd238a3b943fa0638c88c30b9f2818af..09d350c0bc105653e7cd59a8290684a3c4e70d7e:/src/univ/dialog.cpp diff --git a/src/univ/dialog.cpp b/src/univ/dialog.cpp index cf1d19793b..39a0695158 100644 --- a/src/univ/dialog.cpp +++ b/src/univ/dialog.cpp @@ -14,7 +14,7 @@ // headers // ---------------------------------------------------------------------------- -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "univdialog.h" #endif @@ -51,7 +51,7 @@ void wxDialog::Init() m_returnCode = 0; m_windowDisabler = NULL; m_eventLoop = NULL; - m_isShowingModal = FALSE; + m_isShowingModal = false; } wxDialog::~wxDialog() @@ -87,7 +87,7 @@ void wxDialog::OnCancel(wxCommandEvent &WXUNUSED(event)) else { SetReturnCode(wxID_CANCEL); - Show(FALSE); + Show(false); } } @@ -102,7 +102,7 @@ void wxDialog::OnOK(wxCommandEvent &WXUNUSED(event)) else { SetReturnCode(wxID_OK); - Show(FALSE); + Show(false); } } } @@ -153,18 +153,6 @@ bool wxDialog::Show(bool show) EndModal(wxID_CANCEL); } - // Not sure how to put this in platform-specific - // code just yet. Nano-X has to force a size event, - // else there's no initial size. -#if wxUSE_NANOX - if (show) - { - wxSizeEvent event(GetSize(), GetId()); - event.SetEventObject(this); - GetEventHandler()->ProcessEvent(event); - } -#endif - bool ret = wxDialogBase::Show(show); if ( show ) @@ -178,11 +166,6 @@ bool wxDialog::IsModal() const return m_isShowingModal; } -void wxDialog::SetModal(bool WXUNUSED(flag)) -{ - wxFAIL_MSG( wxT("wxDialog:SetModal obsolete now") ); -} - int wxDialog::ShowModal() { if ( IsModal() ) @@ -202,9 +185,9 @@ int wxDialog::ShowModal() } } - Show(TRUE); + Show(true); - m_isShowingModal = TRUE; + m_isShowingModal = true; wxASSERT_MSG( !m_windowDisabler, _T("disabling windows twice?") ); @@ -234,9 +217,9 @@ void wxDialog::EndModal(int retCode) return; } - m_isShowingModal = FALSE; + m_isShowingModal = false; m_eventLoop->Exit(); - Show(FALSE); + Show(false); }