[hamster-applet] 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] 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:43:24 +0000 (UTC)
commit 27d0ddab2061eb969c718db54231ed6da677c494
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 c37aa7a..0308b3e 100644
--- a/src/hamster/edit_activity.py
+++ b/src/hamster/edit_activity.py
@@ -179,7 +179,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]