[gnome-music/wip/merge: 219/343] Fix formatting of time



commit 8ae5f8d01a0feaa081835f0742f6d9d03ea6d927
Author: Arnel A. Borja <arnelborja src gnome org>
Date:   Wed Jul 17 22:24:18 2013 +0800

    Fix formatting of time

 gnomemusic/view.py |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)
---
diff --git a/gnomemusic/view.py b/gnomemusic/view.py
index e47a555..9dd5622 100644
--- a/gnomemusic/view.py
+++ b/gnomemusic/view.py
@@ -380,13 +380,8 @@ class Songs(ViewContainer):
             duration = item.get_duration()
             minutes = int(duration / 60)
             seconds = duration % 60
-            time = None
-            if seconds < 10:
-                time = str(minutes) + ":0" + str(seconds)
-            else:
-                time = str(minutes) + ":" + str(seconds)
             cell.xalign = 1.0
-            cell.text = time
+            cell.text = "%i:%02i" % (minutes, seconds)
 
     def _on_list_widget_artist_render(self, col, cell, model, itr, data):
         item = model.get_value(itr, 5)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]