[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [5826] When Cancel pressed, eftsoons stop dawdling
From: |
Greg Chicares |
Subject: |
[lmi-commits] [5826] When Cancel pressed, eftsoons stop dawdling |
Date: |
Sun, 10 Nov 2013 23:02:14 +0000 |
Revision: 5826
http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=5826
Author: chicares
Date: 2013-11-10 23:02:13 +0000 (Sun, 10 Nov 2013)
Log Message:
-----------
When Cancel pressed, eftsoons stop dawdling
Modified Paths:
--------------
lmi/trunk/ChangeLog
lmi/trunk/progress_meter.hpp
lmi/trunk/progress_meter_wx.cpp
Modified: lmi/trunk/ChangeLog
===================================================================
--- lmi/trunk/ChangeLog 2013-11-10 20:58:14 UTC (rev 5825)
+++ lmi/trunk/ChangeLog 2013-11-10 23:02:13 UTC (rev 5826)
@@ -32876,3 +32876,19 @@
Process pending events more cautiously during a pause. See:
http://lists.nongnu.org/archive/html/lmi/2013-11/msg00006.html
+20131110T1401Z <address@hidden> [542]
+
+ group_values.cpp
+Indicate cancellation on statusbar.
+
+20131110T2058Z <address@hidden> [542]
+
+ progress_meter_wx.cpp
+Count down remaining delay on progress dialog.
+
+20131110T2302Z <address@hidden> [542]
+
+ progress_meter.hpp
+ progress_meter_wx.cpp
+When Cancel pressed, eftsoons stop dawdling.
+
Modified: lmi/trunk/progress_meter.hpp
===================================================================
--- lmi/trunk/progress_meter.hpp 2013-11-10 20:58:14 UTC (rev 5825)
+++ lmi/trunk/progress_meter.hpp 2013-11-10 23:02:13 UTC (rev 5826)
@@ -123,9 +123,11 @@
/// behavior by user interface. It's a member of this class because
/// the motivating use case involves a progress meter--so, for the wx
/// interface, do_dawdle() should call wxProgressDialog::Update(),
-/// as explained here:
+/// for the reasons explained here:
/// http://lists.nongnu.org/archive/html/lmi/2013-11/msg00006.html
-/// It is not const because wxProgressDialog::Update() is not.
+/// and also so that pressing Cancel interrupts the delay. Because
+/// wxProgressDialog::Update() is not const, do_dawdle() and dawdle()
+/// cannot be const.
///
/// reflect_progress() throws an exception if the iteration counter
/// equals or exceeds its maximum. This condition is tested before
Modified: lmi/trunk/progress_meter_wx.cpp
===================================================================
--- lmi/trunk/progress_meter_wx.cpp 2013-11-10 20:58:14 UTC (rev 5825)
+++ lmi/trunk/progress_meter_wx.cpp 2013-11-10 23:02:13 UTC (rev 5826)
@@ -121,7 +121,7 @@
std::ostringstream oss;
oss.precision(1);
oss << std::fixed;
- for(int i = 10 * seconds; 0 < i; --i)
+ for(int i = 10 * seconds; 0 < i && !progress_dialog_.WasCancelled(); --i)
{
wxMilliSleep(100);
oss.str("");
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lmi-commits] [5826] When Cancel pressed, eftsoons stop dawdling,
Greg Chicares <=