From 31843deafed40bcdbd6ffa4908cea337291d8235 Mon Sep 17 00:00:00 2001 From: Worros Date: Wed, 10 Nov 2010 16:36:58 +0800 Subject: [PATCH] Revert "calendar displays current entry value" This reverts commit f78044e4c1329a0c78205265c5da66b4813b9864. Conflicts: pyfpdb/Filters.py --- pyfpdb/Filters.py | 36 ++---------------------------------- 1 file changed, 2 insertions(+), 34 deletions(-) diff --git a/pyfpdb/Filters.py b/pyfpdb/Filters.py index 1b026d29..a4660eb2 100644 --- a/pyfpdb/Filters.py +++ b/pyfpdb/Filters.py @@ -1014,25 +1014,6 @@ class Filters(threading.Thread): vb = gtk.VBox() cal = gtk.Calendar() - - if entry == self.start_date: - cal_date = self.start_date.get_text() - if cal_date == '': - self.cursor.execute(self.sql.query['get_first_date']) - result = self.db.cursor.fetchall() - cal_date = result[0][0].split()[0] - self.start_date.set_text(cal_date) - elif entry == self.end_date: - cal_date = self.end_date.get_text() - if cal_date == '': - self.cursor.execute(self.sql.query['get_last_date']) - result = self.db.cursor.fetchall() - cal_date = result[0][0].split()[0] - self.end_date.set_text(cal_date) - - (year,month,day)=cal_date.split('-') - cal.select_month(int(month)-1, int(year)) - cal.select_day(int(day)) vb.pack_start(cal, expand=False, padding=0) btn = gtk.Button(_('Done')) @@ -1058,22 +1039,9 @@ class Filters(threading.Thread): t2 = self.end_date.get_text() if t1 == '': - self.cursor.execute(self.sql.query['get_first_date']) - result = self.db.cursor.fetchall() - if result[0][0] == None: - t1 = '1970-01-02' - else: - t1 = result[0][0].split()[0] - self.start_date.set_text(t1) - + t1 = '1970-01-02' if t2 == '': - self.cursor.execute(self.sql.query['get_last_date']) - result = self.db.cursor.fetchall() - if result[0][0] == None: - t2 = '2020-12-12' - else: - t2 = result[0][0].split()[0] - self.end_date.set_text(t2) + t2 = '2020-12-12' s1 = strptime(t1, "%Y-%m-%d") # make time_struct s2 = strptime(t2, "%Y-%m-%d")