[hamster-applet/gnome-2-30] fixed bug 616695 - allow entering 00:00 as time (did not think that time(0, 0) would yield true to 'n
- From: Toms Baugis <tbaugis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [hamster-applet/gnome-2-30] fixed bug 616695 - allow entering 00:00 as time (did not think that time(0, 0) would yield true to 'n
- Date: Sat, 24 Apr 2010 08:42:00 +0000 (UTC)
commit 1fab977b6f01c03e71ee26ebad9b6e7ca4fa0faa
Author: Toms Bauģis <toms baugis gmail com>
Date: Sat Apr 24 09:38:55 2010 +0100
fixed bug 616695 - allow entering 00:00 as time (did not think that time(0,0) would yield true to 'not', heh)
src/hamster/edit_activity.py | 2 +-
src/hamster/widgets/timeinput.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/hamster/edit_activity.py b/src/hamster/edit_activity.py
index 5cf2065..a7b51e8 100644
--- a/src/hamster/edit_activity.py
+++ b/src/hamster/edit_activity.py
@@ -167,7 +167,7 @@ class CustomFactController:
else:
time, date = start_time, start_date
- if time and date:
+ if time is not None and date:
return dt.datetime.combine(date, time)
else:
return None
diff --git a/src/hamster/widgets/timeinput.py b/src/hamster/widgets/timeinput.py
index 5d06ac7..c3cc387 100644
--- a/src/hamster/widgets/timeinput.py
+++ b/src/hamster/widgets/timeinput.py
@@ -130,7 +130,7 @@ class TimeInput(gtk.Entry):
return self.time
def _format_time(self, time):
- if not time:
+ if time is None:
return ""
return time.strftime("%H:%M").lower()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]