[gnome-clocks] Fix stopwatch reset
- From: Stefano Facchini <sfacchini src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-clocks] Fix stopwatch reset
- Date: Tue, 6 Nov 2012 16:21:07 +0000 (UTC)
commit e639dfa2ac8ef26aa57e88802de1ea2b66caa6aa
Author: Stefano Facchini <stefano facchini gmail com>
Date: Tue Nov 6 17:16:15 2012 +0100
Fix stopwatch reset
Stopwatch.lap_time_diff wasn't cleared on reset
gnomeclocks/stopwatch.py | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/gnomeclocks/stopwatch.py b/gnomeclocks/stopwatch.py
index 119e8ed..38ffdc5 100644
--- a/gnomeclocks/stopwatch.py
+++ b/gnomeclocks/stopwatch.py
@@ -137,8 +137,7 @@ class Stopwatch(Clock):
self.laps_view.scroll_to_cell(p, None, False, 0, 0)
if self.state == Stopwatch.State.STOPPED:
self.state = Stopwatch.State.RESET
- self.time_diff = 0
- self.lap = 0
+ self.reset()
self.left_label.set_markup(Stopwatch.BUTTON_MARKUP % (_("Start")))
self.left_button.get_style_context().add_class("clocks-go")
self.right_button.set_sensitive(False)
@@ -180,8 +179,7 @@ class Stopwatch(Clock):
self.lap_time_diff = self.lap_time_diff + (curr - self.lap_start_time)
def reset(self):
- GLib.source_remove(self.timeout_id)
- self.timeout_id = 0
+ self.lap = 0
self.time_diff = 0
self.lap_time_diff = 0
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]