// Destory the controls from the widget.
+ Unbind(XCCALENDARDAY_DESELECTOTHERENTRIES, &XCCalendarDay::DeselectOthersEvent, this, ID_DESELECTOTHERENTRIES);
+ Unbind(XCCALENDARDAY_DESELECTALLENTRIES, &XCCalendarDay::DeselectAllEvent, this, ID_DESELECTALLITEMS);
+ Unbind(XCCALENDARDAY_HIDEACCOUNTENTRIES, &XCCalendarDay::HideAccountEntries, this, ID_HIDEENTRIES);
+ Unbind(XCCALENDARDAY_SHOWACCOUNTENTRIES, &XCCalendarDay::ShowAccountEntries, this, ID_SHOWENTRIES);
+ Unbind(XCCALENDARDAY_HIDECALENDARENTRIES, &XCCalendarDay::HideCalendarEntries, this, ID_HIDECALENDARENTRIES);
+ Unbind(XCCALENDARDAY_SHOWCALENDARENTRIES, &XCCalendarDay::ShowCalendarEntries, this, ID_SHOWCALENDARENTRIES);
+ Unbind(XCCALENDARDAY_DELETECALENDARENTRIES, &XCCalendarDay::DeleteCalendarEntries, this, ID_DELETECALENDARENTRIES);
+ Unbind(XCCALENDARDAY_DELETEENTRY, &XCCalendarDay::DeleteCalendarEntry, this, ID_DELETEENTRY);
+ Unbind(XCCALENDARDAY_ADDENTRY, &XCCalendarDay::AddCalendarEntry, this, ID_ADDENTRY);
+ Unbind(XCCALENDARDAY_UPDATEENTRY, &XCCalendarDay::UpdateCalendarEntry, this, ID_UPDATEENTRY);
+ Unbind(XCCALENDARDAY_UPDATECALENDARCOLOUR, &XCCalendarDay::UpdateCalendarColour, this, ID_UPDATECOLOUR);
+
for (vector<XCCalendarDayEntry*>::iterator calendarEntryIter = calendarEntryList.begin();
calendarEntryIter != calendarEntryList.end(); calendarEntryIter++){
}
+ eventListFrameSizer->Clear();
+
+ eventListFrame->SetSizer(nullptr, true);
+
+ mainSectionSizer->Clear();
+ topSectionSizer->Clear();
+ windowSizer->Clear();
+
delete alertIcon;
alertIcon = nullptr;
delete eventListFrame;
eventListFrame = nullptr;
+ delete numberText;
+ numberText = nullptr;
+
+ delete topPanel;
+ topPanel = nullptr;
+
+ delete mainPanel;
+ mainPanel = nullptr;
+
calendarEntryList.clear();
+ this->SetSizer(nullptr, true);
+
+ monthViewPointer = nullptr;
+ dataStorage = nullptr;
+
}
void XCCalendarDay::UpdateTopIcons(){
EventProperties *eventInfo = (EventProperties*)eventData.GetClientData();
- XCCalendarDayEntry *newEntry = new XCCalendarDayEntry(eventListFrame, eventInfo->eventName, wxDefaultPosition, wxDefaultSize, eventInfo->eventID);
+ // TODO: Fix conversion from string to wxString
+ XCCalendarDayEntry *newEntry = new XCCalendarDayEntry(eventListFrame, wxString(eventInfo->eventName.c_str(), wxConvUTF8), wxDefaultPosition, wxDefaultSize, eventInfo->eventID);
CDSGetCalendarInfo calendarInfo = dataStorage->GetCalendar(eventInfo->calendarID);
(*calendarEntryIter)->SetEventName(eventInfo->eventName);
(*calendarEntryIter)->SetTime(eventInfo->eventHour, eventInfo->eventMinute, eventInfo->eventSecond);
-
}
}