[chronojump] Ensure cancel_clicked and finish_clicked are only done one time
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Ensure cancel_clicked and finish_clicked are only done one time
- Date: Wed, 11 Jan 2017 08:22:35 +0000 (UTC)
commit 5be9d4e77f7e44f6307ab40ed17734d557b6c1ac
Author: Xavier de Blas <xaviblas gmail com>
Date: Wed Jan 11 09:15:13 2017 +0100
Ensure cancel_clicked and finish_clicked are only done one time
src/gui/chronojump.cs | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index 011b80f..6fe4338 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -3580,6 +3580,8 @@ public partial class ChronoJumpWindow
//to avoid doble finish or cancel while finishing
hideButtons();
+ LogB.Information("finish clicked one");
+
event_execute_ButtonFinish.Clicked -= new EventHandler(on_finish_clicked);
currentEventExecute.Finish = true;
@@ -3663,6 +3665,14 @@ public partial class ChronoJumpWindow
{
bool canCaptureC = cp2016.StoredCanCaptureContacts;
+ /*
+ * We need to do this to ensure no cancel_clicked calls accumulate
+ * if we don't do tue -= now, after 10 tests, if we cancel last one,
+ * it wWill enter on_cancel_clicked 10 times at the end
+ */
+ event_execute_ButtonCancel.Clicked -= new EventHandler(on_cancel_clicked);
+ event_execute_ButtonFinish.Clicked -= new EventHandler(on_finish_clicked);
+
if(radio_menuitem_mode_jumps_simple.Active)
{
LogB.Debug("radio_menuitem_mode_jumps_simple");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]