]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/progdlgg.cpp
Don't do the wx cleanup if wxPython didn't do the initialization.
[wxWidgets.git] / src / generic / progdlgg.cpp
index 2730fb4d4abe4857540f2a0bfa35f0b1224501a2..15fb92990fd56ffbf8d194ab94e129cdfcee2658 100644 (file)
@@ -67,8 +67,6 @@ static void SetTimeLabel(unsigned long val, wxStaticText *label);
 BEGIN_EVENT_TABLE(wxProgressDialog, wxDialog)
     EVT_BUTTON(wxID_CANCEL, wxProgressDialog::OnCancel)
 
 BEGIN_EVENT_TABLE(wxProgressDialog, wxDialog)
     EVT_BUTTON(wxID_CANCEL, wxProgressDialog::OnCancel)
 
-    EVT_SHOW(wxProgressDialog::OnShow)
-
     EVT_CLOSE(wxProgressDialog::OnClose)
 END_EVENT_TABLE()
 
     EVT_CLOSE(wxProgressDialog::OnClose)
 END_EVENT_TABLE()
 
@@ -270,6 +268,7 @@ wxProgressDialog::wxProgressDialog(wxString const &title,
 
     // Update the display (especially on X, GTK)
     wxYield();
 
     // Update the display (especially on X, GTK)
     wxYield();
+    wxYield();
 
 #ifdef __WXMAC__
     MacUpdateImmediately();
 
 #ifdef __WXMAC__
     MacUpdateImmediately();
@@ -330,6 +329,7 @@ wxProgressDialog::Update(int value, const wxString& newmsg)
         m_msg->SetLabel(newmsg);
 
         wxYield();
         m_msg->SetLabel(newmsg);
 
         wxYield();
+        wxYield();
     }
 
     if ( (m_elapsed || m_remaining || m_estimated) && (value != 0) )
     }
 
     if ( (m_elapsed || m_remaining || m_estimated) && (value != 0) )
@@ -368,6 +368,7 @@ wxProgressDialog::Update(int value, const wxString& newmsg)
                 m_msg->SetLabel(_("Done."));
             }
 
                 m_msg->SetLabel(_("Done."));
             }
 
+            wxYield();
             wxYield();
 
             (void)ShowModal();
             wxYield();
 
             (void)ShowModal();
@@ -382,6 +383,7 @@ wxProgressDialog::Update(int value, const wxString& newmsg)
     {
         // update the display
         wxYield();
     {
         // update the display
         wxYield();
+        wxYield();
     }
 
 #ifdef __WXMAC__
     }
 
 #ifdef __WXMAC__
@@ -434,16 +436,6 @@ void wxProgressDialog::OnClose(wxCloseEvent& event)
     }
 }
 
     }
 }
 
-void wxProgressDialog::OnShow(wxShowEvent& event)
-{
-    // if the dialog is being hidden, it was closed, so reenable other windows
-    // now
-    if ( event.GetShow() )
-    {
-        ReenableOtherWindows();
-    }
-}
-
 // ----------------------------------------------------------------------------
 // destruction
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
 // destruction
 // ----------------------------------------------------------------------------