[Commits] (alecf) fix bug 2793 - show "Today" rather than the date on the column header for today

commits at osafoundation.org commits at osafoundation.org
Wed Apr 13 16:09:54 PDT 2005


Commit by: alecf
Modified files:
chandler/parcels/osaf/framework/blocks/calendar/CalendarCanvas.py 1.62 1.63

Log message:
fix bug 2793 - show "Today" rather than the date on the column header for today

Bugzilla links:
http://bugzilla.osafoundation.org/show_bug.cgi?id=2793

ViewCVS links:
http://cvs.osafoundation.org/index.cgi/chandler/parcels/osaf/framework/blocks/calendar/CalendarCanvas.py.diff?r1=text&tr1=1.62&r2=text&tr2=1.63

Index: chandler/parcels/osaf/framework/blocks/calendar/CalendarCanvas.py
diff -u chandler/parcels/osaf/framework/blocks/calendar/CalendarCanvas.py:1.62 chandler/parcels/osaf/framework/blocks/calendar/CalendarCanvas.py:1.63
--- chandler/parcels/osaf/framework/blocks/calendar/CalendarCanvas.py:1.62	Wed Apr 13 13:52:56 2005
+++ chandler/parcels/osaf/framework/blocks/calendar/CalendarCanvas.py	Wed Apr 13 16:09:53 2005
@@ -1,8 +1,8 @@
 """ Canvas for calendaring blocks
 """
 
-__version__ = "$Revision: 1.62 $"
-__date__ = "$Date: 2005/04/13 20:52:56 $"
+__version__ = "$Revision: 1.63 $"
+__date__ = "$Date: 2005/04/13 23:09:53 $"
 __copyright__ = "Copyright (c) 2004 Open Source Applications Foundation"
 __license__ = "http://osafoundation.org/Chandler_0.1_license_terms.htm"
 
@@ -787,9 +787,13 @@
         self.monthButton.SetLabel(monthText)
         #self.monthButton.UpdateSize()
 
+        today = DateTime.today()
         for day in range(7):
             currentDate = startDate + DateTime.RelativeDateTime(days=day)
-            dayName = currentDate.Format('%a ') + str(currentDate.day)
+            if currentDate == today:
+                dayName = "Today"
+            else:
+                dayName = currentDate.Format('%a ') + str(currentDate.day)
             self.weekHeader.SetLabelText(day+1, dayName)
             
         self.Layout()



More information about the Commits mailing list