Made wxPD_AUTO_HIDE work.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13162 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Mattia Barbon 2001-12-22 21:20:34 +00:00
parent 62e1ba759a
commit 1c79904b9e

View File

@ -342,33 +342,40 @@ wxProgressDialog::Update(int value, const wxString& newmsg)
SetTimeLabel(remaining, m_remaining);
}
if ( (value == m_maximum ) && !(GetWindowStyle() & wxPD_AUTO_HIDE) )
if ( (value == m_maximum ) )
{
if ( m_btnAbort )
{
// tell the user what he should do...
m_btnAbort->SetLabel(_("Close"));
}
#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
else // enable the close button to give the user a way to close the dlg
{
EnableCloseButton(TRUE);
}
#endif // __WXMSW__
if ( !newmsg )
{
// also provide the finishing message if the application didn't
m_msg->SetLabel(_("Done."));
}
// so that we return TRUE below and that out [Cancel] handler knew what
// to do
m_state = Finished;
if( !(GetWindowStyle() & wxPD_AUTO_HIDE) )
{
if ( m_btnAbort )
{
// tell the user what he should do...
m_btnAbort->SetLabel(_("Close"));
}
#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
else // enable the close button to give the user a way to close the dlg
{
EnableCloseButton(TRUE);
}
#endif // __WXMSW__
wxYield();
if ( !newmsg )
{
// also provide the finishing message if the application didn't
m_msg->SetLabel(_("Done."));
}
(void)ShowModal();
wxYield();
(void)ShowModal();
}
else
{
Hide();
ReenableOtherWindows();
}
}
else
{