- // Get the wxSizerItem for the top date and the entries part.
-
- dc.SetBrush(wxBrush(wxColor(0,0,0), wxBRUSHSTYLE_TRANSPARENT));
+ calendarColour->Disconnect(wxEVT_RIGHT_UP, wxMouseEventHandler(XCCalendarDayEntry::RightClick), NULL, this);
+ alarmIcon->Disconnect(wxEVT_RIGHT_UP, wxMouseEventHandler(XCCalendarDayEntry::RightClick), NULL, this);
+ highPriorityIcon->Disconnect(wxEVT_RIGHT_UP, wxMouseEventHandler(XCCalendarDayEntry::RightClick), NULL, this);
+ eventText->Disconnect(wxEVT_RIGHT_UP, wxMouseEventHandler(XCCalendarDayEntry::RightClick), NULL, this);
+ eventTime->Disconnect(wxEVT_RIGHT_UP, wxMouseEventHandler(XCCalendarDayEntry::RightClick), NULL, this);
+ dayPanel->Disconnect(wxEVT_RIGHT_UP, wxMouseEventHandler(XCCalendarDayEntry::RightClick), NULL, this);
+
+ Unbind(XCCALENDARDAYENTRY_DESELECT, &XCCalendarDayEntry::Deselect, this, ID_ENTRYDESELECT);
+
+ // Delete the controls.