[POS-commit] r6410 - kiwi/trunk/kiwi/ui

Johan Dahlin jdahlin at async.com.br
Fri Apr 20 15:59:49 BRT 2007


Author: jdahlin
Date: Fri Apr 20 15:59:48 2007
New Revision: 6410

Modified:
   kiwi/trunk/kiwi/ui/search.py

Log:
Set the end date to the same as start date when switching to CUSTOM_DAY


Modified: kiwi/trunk/kiwi/ui/search.py
==============================================================================
--- kiwi/trunk/kiwi/ui/search.py	(original)
+++ kiwi/trunk/kiwi/ui/search.py	Fri Apr 20 15:59:48 2007
@@ -194,8 +194,11 @@
 
     def _update_dates(self):
         date_type = self.mode.get_selected_data()
-        if date_type not in [DateSearchFilter.Type.CUSTOM_DAY,
-                             DateSearchFilter.Type.CUSTOM_INTERVAL]:
+        if date_type == DateSearchFilter.Type.CUSTOM_DAY:
+            self.end_date.set_date(self.start_date.get_date())
+        elif date_type == DateSearchFilter.Type.CUSTOM_INTERVAL:
+            pass
+        else:
             option = self._options.get(date_type)
             start_date, end_date = option.get_interval()
             self.start_date.set_date(start_date)
@@ -223,7 +226,6 @@
     def _on_start_date__changed(self, start_date):
         date_type = self.mode.get_selected_data()
         if date_type == DateSearchFilter.Type.CUSTOM_DAY:
-            self.start_date.set_date(start_date.get_date())
             self.end_date.set_date(start_date.get_date())
 
 


More information about the POS-commit mailing list