]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/progdlgg.cpp
Added a rule to the tmake templates so the makefiles know how to
[wxWidgets.git] / src / generic / progdlgg.cpp
index 0bd46a5ca9694ca8e7aa2755ddce4e63cf86b6e3..4f7d4b3802d7e45916a8aae88bb3a7c925c6184a 100644 (file)
@@ -198,7 +198,9 @@ wxProgressDialog::wxProgressDialog(wxString const &title,
    Centre(wxCENTER_FRAME | wxBOTH);
 
    if(m_disableParentOnly)
-      m_parent->Enable(FALSE);
+   {
+      if(m_parent)  m_parent->Enable(FALSE);
+   }
    else
       wxEnableTopLevelWindows(FALSE);
 
@@ -231,17 +233,17 @@ wxProgressDialog::Update(int value, const wxString& newmsg)
 
       if (m_elapsed) 
       {
-         s.Printf("%i:%02i:%02i", diff.GetHour(), diff.GetMinute(), diff.GetSecond());
+         s.Printf(_T("%i:%02i:%02i"), diff.GetHour(), diff.GetMinute(), diff.GetSecond());
          if (s != m_elapsed->GetLabel()) m_elapsed->SetLabel(s);
       }
       if (m_estimated) 
       {
-         s.Printf("%i:%02i:%02i", estim / (60 * 60), (estim / 60) % 60, estim % 60);
+         s.Printf(_T("%i:%02i:%02i"), estim / (60 * 60), (estim / 60) % 60, estim % 60);
          if (s != m_estimated->GetLabel()) m_estimated->SetLabel(s);
       }
       if (m_remaining) 
       {
-         s.Printf("%i:%02i:%02i", remai / (60 * 60), (remai / 60) % 60, remai % 60);
+         s.Printf(_T("%i:%02i:%02i"), remai / (60 * 60), (remai / 60) % 60, remai % 60);
          if (s != m_remaining->GetLabel()) m_remaining->SetLabel(s);
       }
    }
@@ -285,7 +287,9 @@ void wxProgressDialog::OnClose(wxCloseEvent& event)
 wxProgressDialog::~wxProgressDialog()
 {
    if ( m_disableParentOnly )
-      m_parent->Enable(TRUE);
+   {
+      if(m_parent) m_parent->Enable(TRUE);
+   }
    else
       wxEnableTopLevelWindows(TRUE);
    if (m_time) delete m_time;