]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/progdlgg.cpp
removed conditional for Apple DevTools now that mac headers are not included
[wxWidgets.git] / src / generic / progdlgg.cpp
index 4b5dcd7e75faeb17b01353e5fc99723579fcfe3f..8f2fc1e4042aa3b5111a8c2440cb86d51275ec95 100644 (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 )
+        // so that we return TRUE below and that out [Cancel] handler knew what
+        // to do
+        m_state = Finished;
+        if( !(GetWindowStyle() & wxPD_AUTO_HIDE) )
         {
-            // tell the user what he should do...
-            m_btnAbort->SetLabel(_("Close"));
-        }
+            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);
-        }
+            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 ( !newmsg )
+            {
+                // also provide the finishing message if the application didn't
+                m_msg->SetLabel(_("Done."));
+            }
 
-        wxYield();
+            wxYield();
 
-        (void)ShowModal();
+            (void)ShowModal();
+        }
+        else
+        {
+            Hide();
+            ReenableOtherWindows();
+        }
     }
     else
     {