]> git.saurik.com Git - wxWidgets.git/commitdiff
use HasFlag(wxXX) instead of GetWindowStyle() & wxXX; it's more readable
authorFrancesco Montorsi <f18m_cpp217828@yahoo.it>
Sat, 27 Dec 2008 10:15:28 +0000 (10:15 +0000)
committerFrancesco Montorsi <f18m_cpp217828@yahoo.it>
Sat, 27 Dec 2008 10:15:28 +0000 (10:15 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57579 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/progdlgg.cpp

index d286409ab9b44e9c93ef7434631bc33893a52e86..94e1bed6f11c928c6d3855680c1a60c1d4a1071a 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;
-        if( !(GetWindowStyle() & wxPD_AUTO_HIDE) )
+        if( !HasFlag(wxPD_AUTO_HIDE) )
         {
             EnableClose();
             DisableSkip();
@@ -401,7 +401,7 @@ wxProgressDialog::Update(int value, const wxString& newmsg, bool *skip)
                 m_msg->SetLabel(_("Done."));
             }
 
-            wxYieldIfNeeded() ;
+            wxYieldIfNeeded();
 
             (void)ShowModal();
         }
@@ -575,7 +575,7 @@ wxProgressDialog::~wxProgressDialog()
 
 void wxProgressDialog::ReenableOtherWindows()
 {
-    if ( GetWindowStyle() & wxPD_APP_MODAL )
+    if ( HasFlag(wxPD_APP_MODAL) )
     {
         delete m_winDisabler;
         m_winDisabler = (wxWindowDisabler *)NULL;
@@ -599,10 +599,10 @@ static void SetTimeLabel(unsigned long val, wxStaticText *label)
 
         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
         {