+ // update the display in case yielding above didn't do it
+ Update();
+
+ return m_state != Canceled;
+}
+
+bool wxProgressDialog::Pulse(const wxString& newmsg, bool *skip)
+{
+ wxASSERT_MSG( m_gauge, wxT("cannot update non existent dialog") );
+
+ // show a bit of progress
+ m_gauge->Pulse();
+
+ UpdateMessage(newmsg);
+
+ if (m_elapsed || m_remaining || m_estimated)
+ {
+ unsigned long elapsed = wxGetCurrentTime() - m_timeStart;
+
+ SetTimeLabel(elapsed, m_elapsed);
+ SetTimeLabel((unsigned long)-1, m_estimated);
+ SetTimeLabel((unsigned long)-1, m_remaining);
+ }
+
+ return DoAfterUpdate(skip);
+}
+
+bool wxProgressDialog::DoAfterUpdate(bool *skip)
+{
+ wxCHECK_MSG(wxEventLoopBase::GetActive(), false,
+ "wxProgressDialog::DoAfterUpdate needs a running event loop");
+
+ // we have to yield because not only we want to update the display but
+ // also to process the clicks on the cancel and skip buttons
+ // NOTE: using YieldFor() this call shouldn't give re-entrancy problems
+ // for event handlers not interested to UI/user-input events.
+ wxEventLoopBase::GetActive()->YieldFor(wxEVT_CATEGORY_UI|wxEVT_CATEGORY_USER_INPUT);
+
+ Update();
+
+ if ( m_skip && skip && !*skip )
+ {
+ *skip = true;
+ m_skip = false;
+ EnableSkip();
+ }