hamster-applet r833 - trunk/hamster
- From: tbaugis svn gnome org
- To: svn-commits-list gnome org
- Subject: hamster-applet r833 - trunk/hamster
- Date: Wed, 4 Mar 2009 22:48:08 +0000 (UTC)
Author: tbaugis
Date: Wed Mar 4 22:48:08 2009
New Revision: 833
URL: http://svn.gnome.org/viewvc/hamster-applet?rev=833&view=rev
Log:
human readable format moved to stuff module
Modified:
trunk/hamster/edit_activity.py
Modified: trunk/hamster/edit_activity.py
==============================================================================
--- trunk/hamster/edit_activity.py (original)
+++ trunk/hamster/edit_activity.py Wed Mar 4 22:48:08 2009
@@ -700,18 +700,17 @@
i, focus_row = 0, None
while i_time < end_time:
+ if start_time:
+ i_time += dt.timedelta(minutes = 15)
+ else:
+ i_time += dt.timedelta(minutes = 30)
+
row_text = self.format_time(i_time)
if start_time:
delta = (i_time - start_time).seconds / 60
+ delta_text = stuff.format_duration(delta)
- if delta % 60 == 0:
- delta_text = "%dh" % (delta / 60.0)
- elif delta / 60 == 0:
- delta_text = "%dmin" % (delta % 60.0)
- else:
- delta_text = "%dh %dmin" % (delta / 60.0, delta % 60)
-
- row_text = "%s (%s)" % (row_text, delta_text)
+ row_text += " (%s)" % delta_text
hours.append([row_text])
@@ -721,11 +720,6 @@
i += 1
- if start_time:
- i_time += dt.timedelta(minutes = 15)
- else:
- i_time += dt.timedelta(minutes = 30)
-
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]