[hamster-applet] oh why would one have 0-offset month but keep 1-offset dates? fixed minor bug in date navigation
- From: Toms Baugis <tbaugis src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [hamster-applet] oh why would one have 0-offset month but keep 1-offset dates? fixed minor bug in date navigation
- Date: Fri, 15 Jan 2010 19:20:06 +0000 (UTC)
commit 7b04d25b356de5c4b4dc9c29c82985660dbb2060
Author: Toms Bauģis <toms baugis gmail com>
Date: Fri Jan 15 00:16:55 2010 +0000
oh why would one have 0-offset month but keep 1-offset dates?
fixed minor bug in date navigation
hamster/widgets/dateinput.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/hamster/widgets/dateinput.py b/hamster/widgets/dateinput.py
index 362674b..5498e80 100644
--- a/hamster/widgets/dateinput.py
+++ b/hamster/widgets/dateinput.py
@@ -121,7 +121,7 @@ class DateInput(gtk.Entry):
date = self._figure_date(self.get_text())
if date:
self.prev_cal_day = date.day #avoid
- self.date_calendar.select_month(date.month-1, date.year)
+ self.date_calendar.select_month(date.month - 1, date.year)
self.date_calendar.select_day(date.day)
self.popup.move(x + alloc.x,y + alloc.y + alloc.height)
@@ -143,7 +143,7 @@ class DateInput(gtk.Entry):
def _on_key_press_event(self, entry, event):
if self.popup.get_property("visible"):
cal_date = self.date_calendar.get_date()
- date = dt.date(cal_date[0], cal_date[1], cal_date[2])
+ date = dt.date(cal_date[0], cal_date[1] + 1, cal_date[2])
else:
date = self._figure_date(entry.get_text())
if not date:
@@ -172,6 +172,6 @@ class DateInput(gtk.Entry):
#prev_cal_day is our only way of checking that date is right
self.prev_cal_day = date.day
- self.date_calendar.select_month(date.month, date.year)
+ self.date_calendar.select_month(date.month - 1, date.year)
self.date_calendar.select_day(date.day)
return True
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]