X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6670f56440ae9209b3e2e51e06acf3bc5aaf1905..93489fc8f15eef3bb618682c0a32f648550ddc56:/src/os2/dialog.cpp diff --git a/src/os2/dialog.cpp b/src/os2/dialog.cpp index 1872c4fd4e..5b76f3ca10 100644 --- a/src/os2/dialog.cpp +++ b/src/os2/dialog.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: dialog.cpp +// Name: src/os2/dialog.cpp // Purpose: wxDialog class // Author: David Webster // Modified by: @@ -83,7 +83,7 @@ wxDEFINE_TIED_SCOPED_PTR_TYPE(wxDialogModalData); void wxDialog::Init() { m_pOldFocus = (wxWindow *)NULL; - m_isShown = FALSE; + m_isShown = false; m_pWindowDisabler = (wxWindowDisabler *)NULL; m_modalData = NULL; SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE)); @@ -227,9 +227,7 @@ wxWindow *wxDialog::FindSuitableParent() const return parent; } -bool wxDialog::Show( - bool bShow -) +bool wxDialog::Show( bool bShow ) { if ( bShow == IsShown() ) return false; @@ -261,13 +259,14 @@ bool wxDialog::Show( wxDialogBase::Show(bShow); - if (GetTitle().c_str()) - ::WinSetWindowText((HWND)GetHwnd(), (PSZ)GetTitle().c_str()); + wxString title = GetTitle(); + if (!title.empty()) + ::WinSetWindowText((HWND)GetHwnd(), (PSZ)title.c_str()); if ( bShow ) { // dialogs don't get WM_SIZE message after creation unlike most (all?) - // other windows and so could start their life non laid out correctly + // other windows and so could start their life not laid out correctly // if we didn't call Layout() from here // // NB: normally we should call it just the first time but doing it @@ -322,7 +321,7 @@ int wxDialog::ShowModal() extern bool gbInOnIdle; bool bWasInOnIdle = gbInOnIdle; - gbInOnIdle = FALSE; + gbInOnIdle = false; // enter and run the modal loop { @@ -432,14 +431,10 @@ void wxDialog::OnSysColourChanged( wxSysColourChangedEvent& WXUNUSED(rEvent) ) Refresh(); } // end of wxDialog::OnSysColourChanged -MRESULT wxDialog::OS2WindowProc( - WXUINT uMessage -, WXWPARAM wParam -, WXLPARAM lParam -) +MRESULT wxDialog::OS2WindowProc( WXUINT uMessage, WXWPARAM wParam, WXLPARAM lParam ) { - MRESULT rc = 0; - bool bProcessed = FALSE; + MRESULT rc = 0; + bool bProcessed = false; switch (uMessage) {