Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGonzalo Odiard <godiard@gmail.com>2014-06-12 20:38:48 (GMT)
committer Gonzalo Odiard <godiard@gmail.com>2014-06-16 15:26:39 (GMT)
commit2304399994e1f29ad87e8df1bbc4c7fd8810a9c4 (patch)
tree2b32093f4dae18430ac48239516af79bc0180129
parent022d935cb2e95a975d49ab6ec7626b4d63ce6e86 (diff)
Show elased time as min:secs if time > 1 minute - Fixes #3467
-rw-r--r--game.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/game.py b/game.py
index c067bb2..5a2fc95 100644
--- a/game.py
+++ b/game.py
@@ -627,9 +627,16 @@ class FinishWindow(Gtk.Window):
0, row, 1, 1)
time = Gtk.Label()
- time.set_markup('<span font="%d" color="%s">%3.2f</span>' %
+ if player.elapsed > 60:
+ minutes = int(player.elapsed / 60)
+ seconds = player.elapsed - minutes * 60
+ elapsed = "%d:%2.2f" % (minutes, seconds)
+ else:
+ elapsed = "%3.2f" % player.elapsed
+
+ time.set_markup('<span font="%d" color="%s">%s</span>' %
(text_font_size, player.fg.get_html(),
- player.elapsed))
+ elapsed))
players_grid.attach(time, 1, row, 1, 1)
name = Gtk.Label()