[Commits] (alecf) fix for bug 2636 - remove "Today" button

commits at osafoundation.org commits at osafoundation.org
Wed Apr 6 15:04:57 PDT 2005


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

Log message:
fix for bug 2636 - remove "Today" button


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

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

Index: chandler/parcels/osaf/framework/blocks/calendar/CalendarCanvas.py
diff -u chandler/parcels/osaf/framework/blocks/calendar/CalendarCanvas.py:1.54 chandler/parcels/osaf/framework/blocks/calendar/CalendarCanvas.py:1.55
--- chandler/parcels/osaf/framework/blocks/calendar/CalendarCanvas.py:1.54	Wed Apr  6 14:49:14 2005
+++ chandler/parcels/osaf/framework/blocks/calendar/CalendarCanvas.py	Wed Apr  6 15:04:55 2005
@@ -1,8 +1,8 @@
 """ Canvas for calendaring blocks
 """
 
-__version__ = "$Revision: 1.54 $"
-__date__ = "$Date: 2005/04/06 21:49:14 $"
+__version__ = "$Revision: 1.55 $"
+__date__ = "$Date: 2005/04/06 22:04:55 $"
 __copyright__ = "Copyright (c) 2004 Open Source Applications Foundation"
 __license__ = "http://osafoundation.org/Chandler_0.1_license_terms.htm"
 
@@ -635,9 +635,6 @@
         
         self.prevButton = CollectionCanvas.CanvasBitmapButton(self, "application/images/backarrow.png")
         self.nextButton = CollectionCanvas.CanvasBitmapButton(self, "application/images/forwardarrow.png")
-        self.todayButton = CollectionCanvas.CanvasTextButton(self, today.Format("%b %d, %Y"),
-                                                             self.bigFont, self.bigFontColor,
-                                                             self.bgColor)
         self.monthButton = CollectionCanvas.CanvasTextButton(self, today.Format("%B %Y"),
                                                              self.bigFont, self.bigFontColor,
                                                              self.bgColor)
@@ -647,7 +644,6 @@
  
         self.Bind(wx.EVT_BUTTON, self.parent.OnPrev, self.prevButton)
         self.Bind(wx.EVT_BUTTON, self.parent.OnNext, self.nextButton)
-        self.Bind(wx.EVT_BUTTON, self.parent.OnToday, self.todayButton)
         self.Bind(wx.EVT_SIZE, self.OnSize)
 
         # Setup the weekday header buttons        
@@ -669,11 +665,9 @@
 
         nextButtonSize = self.nextButton.GetSize()
         prevButtonSize = self.prevButton.GetSize()        
-        todayButtonSize = self.todayButton.GetSize()
 
         self.nextButton.Move((self.size.width - nextButtonSize.width - 5, 5))
         self.prevButton.Move((self.size.width - nextButtonSize.width - prevButtonSize.width - 10, 5))
-        self.todayButton.Move((self.size.width - nextButtonSize.width - prevButtonSize.width - todayButtonSize.width - 15, 5))
 
         self.weekHeader.SetDimensions(0, self.yOffset, 
                                       self.size.width, -1)
@@ -702,7 +696,6 @@
         
         self.monthButton.SetLabel(selectedDate.Format("%B %Y"))
         self.monthButton.UpdateSize()
-        self.todayButton.UpdateSize()
 
         for day in range(7):
             currentDate = startDate + DateTime.RelativeDateTime(days=day)
@@ -1372,14 +1365,10 @@
         
         self.prevButton = CollectionCanvas.CanvasBitmapButton(self, "application/images/backarrow.png")
         self.nextButton = CollectionCanvas.CanvasBitmapButton(self, "application/images/forwardarrow.png")
-        self.todayButton = CollectionCanvas.CanvasTextButton(self, today.Format("%b %d, %Y"),
-                                                             self.bigFont, self.bigFontColor,
-                                                             self.bgColor)
         self.monthButton = CollectionCanvas.CanvasTextButton(self, today.Format("%B %Y"),
                                                              self.bigFont, self.bigFontColor,
                                                              self.bgColor)
 
-        self.todayButton.UpdateSize()
         self.monthButton.UpdateSize()
 
         box = wx.BoxSizer(wx.HORIZONTAL)
@@ -1387,14 +1376,12 @@
         box.Add((0,0), 1, wx.EXPAND, 5)
         box.Add(self.monthButton, 0, wx.ALIGN_CENTER_HORIZONTAL | wx.ALL, 5)
         box.Add((0,0), 1, wx.EXPAND, 5)
-        box.Add(self.todayButton, 0, wx.ALIGN_RIGHT | wx.ALL, 5)
         box.Add(self.prevButton, 0, wx.ALIGN_CENTER_HORIZONTAL | wx.ALL, 5)
         box.Add(self.nextButton, 0, wx.ALIGN_CENTER_HORIZONTAL | wx.ALL, 5)
         self.SetSizer(box)
                                             
         self.Bind(wx.EVT_BUTTON, self.OnPrev, self.prevButton)
         self.Bind(wx.EVT_BUTTON, self.OnNext, self.nextButton)
-        self.Bind(wx.EVT_BUTTON, self.OnToday, self.todayButton)
         self.Bind(wx.EVT_SIZE, self.OnSize)
 
     def OnSize(self, event):



More information about the Commits mailing list