X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ebea0891d0a5531cfd1ff85e6d77fab66dcf834b..9be9b97445f6e28b1ef9fd1fefdc28f40da51b24:/src/generic/progdlgg.cpp diff --git a/src/generic/progdlgg.cpp b/src/generic/progdlgg.cpp index 0bd46a5ca9..4f7d4b3802 100644 --- a/src/generic/progdlgg.cpp +++ b/src/generic/progdlgg.cpp @@ -198,7 +198,9 @@ wxProgressDialog::wxProgressDialog(wxString const &title, Centre(wxCENTER_FRAME | wxBOTH); if(m_disableParentOnly) - m_parent->Enable(FALSE); + { + if(m_parent) m_parent->Enable(FALSE); + } else wxEnableTopLevelWindows(FALSE); @@ -231,17 +233,17 @@ wxProgressDialog::Update(int value, const wxString& newmsg) if (m_elapsed) { - s.Printf("%i:%02i:%02i", diff.GetHour(), diff.GetMinute(), diff.GetSecond()); + s.Printf(_T("%i:%02i:%02i"), diff.GetHour(), diff.GetMinute(), diff.GetSecond()); if (s != m_elapsed->GetLabel()) m_elapsed->SetLabel(s); } if (m_estimated) { - s.Printf("%i:%02i:%02i", estim / (60 * 60), (estim / 60) % 60, estim % 60); + s.Printf(_T("%i:%02i:%02i"), estim / (60 * 60), (estim / 60) % 60, estim % 60); if (s != m_estimated->GetLabel()) m_estimated->SetLabel(s); } if (m_remaining) { - s.Printf("%i:%02i:%02i", remai / (60 * 60), (remai / 60) % 60, remai % 60); + s.Printf(_T("%i:%02i:%02i"), remai / (60 * 60), (remai / 60) % 60, remai % 60); if (s != m_remaining->GetLabel()) m_remaining->SetLabel(s); } } @@ -285,7 +287,9 @@ void wxProgressDialog::OnClose(wxCloseEvent& event) wxProgressDialog::~wxProgressDialog() { if ( m_disableParentOnly ) - m_parent->Enable(TRUE); + { + if(m_parent) m_parent->Enable(TRUE); + } else wxEnableTopLevelWindows(TRUE); if (m_time) delete m_time;