[gnome-clocks] Timer: Update time when switching to the timer
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-clocks] Timer: Update time when switching to the timer
- Date: Thu, 29 Nov 2012 11:44:34 +0000 (UTC)
commit 13c60b1f6b596f184208482d67340301b753fa14
Author: Volker Sobek <reklov live com>
Date: Thu Nov 29 03:40:45 2012 +0100
Timer: Update time when switching to the timer
When thawing, update the time, but only when the timer is
running. This fixes my commit 6be99d4481.
gnomeclocks/timer.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gnomeclocks/timer.py b/gnomeclocks/timer.py
index a5f2c14..c60abd7 100644
--- a/gnomeclocks/timer.py
+++ b/gnomeclocks/timer.py
@@ -231,7 +231,7 @@ class Timer(Clock):
self.timer_screen.set_time(0, 0, 0)
self.show_setup_screen(False)
return False
- elif self._ui_is_frozen == False:
+ elif not self._ui_is_frozen:
r = self.deadline - t
m, s = divmod(r, 60)
h, m = divmod(m, 60)
@@ -243,4 +243,5 @@ class Timer(Clock):
def _ui_thaw(self, widget):
self._ui_is_frozen = False
- self.count
+ if self.state == Timer.State.RUNNING:
+ self.count()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]