]> git.saurik.com Git - wxWidgets.git/commitdiff
(re)enable Cancel button in Resume()
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 4 Jun 2002 18:08:39 +0000 (18:08 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 4 Jun 2002 18:08:39 +0000 (18:08 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15742 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/generic/progdlgg.h
src/generic/progdlgg.cpp

index 57bcf51d4a2e0af31dfe1a5d0ef1ec102c572de1..4ea81319df4dbb4e8cd34333626bec95788c6916 100644 (file)
@@ -61,7 +61,7 @@ public:
        the program decided to continue the operation (e.g., user didn't
        confirm it)
    */
-   void Resume() { m_state = Continue; }
+   void Resume();
 
 protected:
    // callback for optional abort button
index 15fb92990fd56ffbf8d194ab94e129cdfcee2658..c6ca37e085d5493a04e66fa512ecefb7dcc23717 100644 (file)
@@ -73,11 +73,11 @@ END_EVENT_TABLE()
 IMPLEMENT_CLASS(wxProgressDialog, wxDialog)
 
 // ============================================================================
-// implementation
+// wxProgressDialog implementation
 // ============================================================================
 
 // ----------------------------------------------------------------------------
-// wxProgressDialog
+// wxProgressDialog creation
 // ----------------------------------------------------------------------------
 
 wxProgressDialog::wxProgressDialog(wxString const &title,
@@ -308,6 +308,10 @@ wxStaticText *wxProgressDialog::CreateLabel(const wxString& text,
     return label;
 }
 
+// ----------------------------------------------------------------------------
+// wxProgressDialog operations
+// ----------------------------------------------------------------------------
+
 bool
 wxProgressDialog::Update(int value, const wxString& newmsg)
 {
@@ -393,6 +397,15 @@ wxProgressDialog::Update(int value, const wxString& newmsg)
     return m_state != Canceled;
 }
 
+void wxProgressDialog::Resume()
+{
+    m_state = Continue;
+
+    // it may have been disabled by OnCancel(), so enable it back to let the
+    // user interrupt us again if needed
+    m_btnAbort->Enable();
+}
+
 // ----------------------------------------------------------------------------
 // event handlers
 // ----------------------------------------------------------------------------