diff options
author | Michael Stone <michael@laptop.org> | 2011-01-07 23:33:14 (GMT) |
---|---|---|
committer | Michael Stone <michael@laptop.org> | 2011-01-08 01:20:30 (GMT) |
commit | 111526860d92edbe87a2d88db40f62c4de1e4d3f (patch) | |
tree | bc30f72d108017448793f6a27c8cc9ca7d98efcf | |
parent | 5b4cfe912afa4320f72db4c6004c5090102d4165 (diff) |
Make the count-down timer display its units.
I think the presentation is clearer this way.
-rw-r--r-- | arithmetic.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arithmetic.py b/arithmetic.py index afc0006..a9611b4 100644 --- a/arithmetic.py +++ b/arithmetic.py @@ -359,14 +359,14 @@ class ArithmeticActivity(groupthink.sugar_tools.GroupActivity): def start_countdown(self): self.secondsleft = 10 gobject.timeout_add(1000, self.onesecond_cb) - self.countdownlabel.set_markup('Time until next question: <span size="xx-large">%s</span>' % self.secondsleft) + self.countdownlabel.set_markup('Time until next question: <span size="xx-large">%s</span>s' % self.secondsleft) def onesecond_cb(self): elapsed_time = self.timer.time() - self.cloud.startpoint.get_value() curr_index = int(math.floor(elapsed_time/10)) time_to_next = 10 - (elapsed_time - (10*curr_index)) self.secondsleft = int(math.ceil(time_to_next)) - self.countdownlabel.set_markup('Time until next question: <span size="xx-large">%s</span>' % self.secondsleft) + self.countdownlabel.set_markup('Time until next question: <span size="xx-large">%s</span>s' % self.secondsleft) if curr_index != self._question_index: self._question_index = curr_index if self.answergiven == False: |