X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/223d09f6b523aac674ef9b72a883dfa8d37c5d4e..c6e62f74fcac5b62889b59e7ce7a41d0ce884d7b:/src/generic/progdlgg.cpp diff --git a/src/generic/progdlgg.cpp b/src/generic/progdlgg.cpp index c6d34316e1..ca8ae78b8a 100644 --- a/src/generic/progdlgg.cpp +++ b/src/generic/progdlgg.cpp @@ -64,14 +64,12 @@ static void SetTimeLabel(unsigned long val, wxStaticText *label); // event tables // ---------------------------------------------------------------------------- -#if !USE_SHARED_LIBRARY BEGIN_EVENT_TABLE(wxProgressDialog, wxDialog) EVT_BUTTON(wxID_CANCEL, wxProgressDialog::OnCancel) EVT_CLOSE(wxProgressDialog::OnClose) END_EVENT_TABLE() IMPLEMENT_CLASS(wxProgressDialog, wxDialog) -#endif // ============================================================================ // implementation @@ -171,7 +169,6 @@ wxProgressDialog::wxProgressDialog(wxString const &title, { // set it to the current time m_timeStart = wxGetCurrentTime(); - sizeDlg.y += nTimeLabels * (sizeLabel.y + LAYOUT_Y_MARGIN); } @@ -205,7 +202,7 @@ wxProgressDialog::wxProgressDialog(wxString const &title, sizeDlg.y += 2*LAYOUT_Y_MARGIN; // try to make the dialog not square but rectangular of reasonabel width - sizeDlg.x = wxMax(widthText, 4*sizeDlg.y/3); + sizeDlg.x = (wxCoord)wxMax(widthText, 4*sizeDlg.y/3); sizeDlg.x *= 3; sizeDlg.x /= 2; SetClientSize(sizeDlg); @@ -227,6 +224,9 @@ wxProgressDialog::wxProgressDialog(wxString const &title, // Update the display (especially on X, GTK) wxYield(); + #ifdef __WXMAC__ + MacUpdateImmediately() ; + #endif } wxStaticText *wxProgressDialog::CreateLabel(const wxString& text, @@ -313,6 +313,9 @@ wxProgressDialog::Update(int value, const wxString& newmsg) // update the display wxYield(); } + #ifdef __WXMAC__ + MacUpdateImmediately() ; + #endif return m_state != Canceled; }