if ( maximum > 0 )
{
- // note that we can't use wxGA_SMOOTH because it happens to also mean
- // wxDIALOG_MODAL and will cause the dialog to be modal. Have an extra
+ // note that we can't use wxGA_SMOOTH because it happens to
+ // cause the dialog to be modal. Have an extra
// style argument to wxProgressDialog, perhaps.
m_gauge = new wxGauge(this, -1, m_maximum,
wxDefaultPosition, wxDefaultSize,
SetTimeLabel(0, m_elapsed);
}
-#ifdef __WXMAC__
Update();
-#else
- // Update the display (especially on X, GTK)
- wxYield();
-#endif
}
wxStaticText *wxProgressDialog::CreateLabel(const wxString& text,
{
m_msg->SetLabel(newmsg);
-#ifdef __WXMAC__
wxYieldIfNeeded() ;
-#else
- wxYield();
-#endif
}
if ( (m_elapsed || m_remaining || m_estimated) && (value != 0) )
m_msg->SetLabel(_("Done."));
}
-#ifdef __WXMAC__
wxYieldIfNeeded() ;
-#else
- wxYield();
-#endif
(void)ShowModal();
}
}
else
{
- // update the display
-#ifdef __WXMAC__
+ // we have to yield because not only we want to update the display but
+ // also to process the clicks on the cancel button
wxYieldIfNeeded() ;
-#else
- wxYield();
-#endif
}
-#ifdef __WXMAC__
+ // update the display in case yielding above didn't do it
Update();
-#endif
return m_state != Canceled;
}