]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/progdlgg.cpp
check for m_parentMenu being NULL in IsChecked/Checked/Enable() too (closes #10460)
[wxWidgets.git] / src / generic / progdlgg.cpp
index d286409ab9b44e9c93ef7434631bc33893a52e86..2f77e37bf08978e656160e3db1156310909c2930 100644 (file)
@@ -387,7 +387,7 @@ wxProgressDialog::Update(int value, const wxString& newmsg, bool *skip)
         // so that we return true below and that out [Cancel] handler knew what
         // to do
         m_state = Finished;
         // so that we return true below and that out [Cancel] handler knew what
         // to do
         m_state = Finished;
-        if( !(GetWindowStyle() & wxPD_AUTO_HIDE) )
+        if( !HasFlag(wxPD_AUTO_HIDE) )
         {
             EnableClose();
             DisableSkip();
         {
             EnableClose();
             DisableSkip();
@@ -401,7 +401,7 @@ wxProgressDialog::Update(int value, const wxString& newmsg, bool *skip)
                 m_msg->SetLabel(_("Done."));
             }
 
                 m_msg->SetLabel(_("Done."));
             }
 
-            wxYieldIfNeeded() ;
+            wxYieldIfNeeded();
 
             (void)ShowModal();
         }
 
             (void)ShowModal();
         }
@@ -575,10 +575,10 @@ wxProgressDialog::~wxProgressDialog()
 
 void wxProgressDialog::ReenableOtherWindows()
 {
 
 void wxProgressDialog::ReenableOtherWindows()
 {
-    if ( GetWindowStyle() & wxPD_APP_MODAL )
+    if ( HasFlag(wxPD_APP_MODAL) )
     {
         delete m_winDisabler;
     {
         delete m_winDisabler;
-        m_winDisabler = (wxWindowDisabler *)NULL;
+        m_winDisabler = NULL;
     }
     else
     {
     }
     else
     {
@@ -599,10 +599,10 @@ static void SetTimeLabel(unsigned long val, wxStaticText *label)
 
         if (val != (unsigned long)-1)
         {
 
         if (val != (unsigned long)-1)
         {
-        unsigned long hours = val / 3600;
-        unsigned long minutes = (val % 3600) / 60;
-        unsigned long seconds = val % 60;
-        s.Printf(wxT("%lu:%02lu:%02lu"), hours, minutes, seconds);
+            unsigned long hours = val / 3600;
+            unsigned long minutes = (val % 3600) / 60;
+            unsigned long seconds = val % 60;
+            s.Printf(wxT("%lu:%02lu:%02lu"), hours, minutes, seconds);
         }
         else
         {
         }
         else
         {