]> git.saurik.com Git - wxWidgets.git/commitdiff
No changes, just use less long progress dialog states names.
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 10 Sep 2010 17:25:45 +0000 (17:25 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 10 Sep 2010 17:25:45 +0000 (17:25 +0000)
We can refer to them using wxProgressDialog class name and not the base
wxGenericProgressDialog so do this as it is shorter and more clear because
these states have nothing to do with the generic version when used by the
native MSW implementation.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65504 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/progdlg.cpp

index 4fb41ac65f35001364cc1b04ee5a7d9af2fa99a5..3dd8c34e5c0b41120ba524e9d70b0b2a7a1ce1a1 100644 (file)
@@ -86,7 +86,7 @@ public:
     wxString m_labelCancel; // Privately used by callback.
     unsigned long m_timeStop;
 
-    wxGenericProgressDialog::ProgressDialogState m_state;
+    wxProgressDialog::ProgressDialogState m_state;
     bool m_progressBarMarquee;
     bool m_skipped;
 
@@ -249,7 +249,7 @@ void PerformNotificationUpdates(HWND hwnd,
     // Is the progress finished?
     if ( sharedData->m_notifications & wxSPDD_FINISHED )
     {
-        sharedData->m_state = wxGenericProgressDialog::Finished;
+        sharedData->m_state = wxProgressDialog::Finished;
 
         if ( !(sharedData->m_style & wxPD_AUTO_HIDE) )
         {
@@ -812,8 +812,7 @@ wxProgressDialogTaskRunner::TaskDialogCallbackProc
                     return TRUE;
 
                 case IDCANCEL:
-                    if ( sharedData->m_state
-                            == wxGenericProgressDialog::Finished )
+                    if ( sharedData->m_state == wxProgressDialog::Finished )
                     {
                         return FALSE;
                     }
@@ -823,16 +822,18 @@ wxProgressDialogTaskRunner::TaskDialogCallbackProc
                     // a finished dialog.
                     if ( !UsesCloseButtonOnly(sharedData->m_style) )
                     {
-                        wxCHECK_MSG( sharedData->m_state ==
-                                        wxGenericProgressDialog::Continue,
-                                    TRUE,
-                                    "Dialog not in a cancelable state!");
+                        wxCHECK_MSG
+                        (
+                            sharedData->m_state == wxProgressDialog::Continue,
+                            TRUE,
+                            "Dialog not in a cancelable state!"
+                        );
 
                         ::SendMessage(hwnd, TDM_ENABLE_BUTTON, Id_SkipBtn, FALSE);
                         ::SendMessage(hwnd, TDM_ENABLE_BUTTON, IDCANCEL, FALSE);
 
                         sharedData->m_timeStop = wxGetCurrentTime();
-                        sharedData->m_state = wxGenericProgressDialog::Canceled;
+                        sharedData->m_state = wxProgressDialog::Canceled;
                     }
 
                     return TRUE;