[hamster-applet] start with 00:00, for cases when start time is specified, start with +15min
- From: Toms Baugis <tbaugis src gnome org>
- To: svn-commits-list gnome org
- Subject: [hamster-applet] start with 00:00, for cases when start time is specified, start with +15min
- Date: Sat, 25 Apr 2009 16:40:53 -0400 (EDT)
commit f2c87915df29a948dc51f0f2b180915ab1c99297
Author: Toms Bauģis <toms baugis gmail com>
Date: Sat Apr 25 21:40:22 2009 +0100
start with 00:00, for cases when start time is specified, start with +15min
---
hamster/widgets.py | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/hamster/widgets.py b/hamster/widgets.py
index 7a2c7ab..79c855d 100644
--- a/hamster/widgets.py
+++ b/hamster/widgets.py
@@ -272,16 +272,12 @@ class TimeInput(gtk.Entry):
if self.start_time:
end_time = i_time + dt.timedelta(hours = 12)
+ i_time += dt.timedelta(minutes = 15)
else:
end_time = i_time + dt.timedelta(hours = 24)
i, focus_row = 0, None
while i_time < end_time:
- if self.start_time:
- i_time += dt.timedelta(minutes = 15)
- else:
- i_time += dt.timedelta(minutes = 30)
-
row_text = self._format_time(i_time)
if self.start_time:
delta = (i_time - self.start_time).seconds / 60
@@ -291,10 +287,15 @@ class TimeInput(gtk.Entry):
hours.append([row_text])
-
- if focus_time and i_time <= focus_time <= i_time + dt.timedelta(minutes = 30):
+ if focus_time and i_time <= focus_time <= i_time + \
+ dt.timedelta(minutes = 30):
focus_row = i
+ if self.start_time:
+ i_time += dt.timedelta(minutes = 15)
+ else:
+ i_time += dt.timedelta(minutes = 30)
+
i += 1
self.time_tree.set_model(hours)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]