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-12 20:38:48 (GMT)
commit2becc6a8464340afbbe6b0a2acd6309de913cafd (patch)
tree9f6e31791a8eb71752c1ed7149bd015efdc710fc
parentcf028e9bbb2d8baad7e1192274252b173e077639 (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()