X-Git-Url: http://Server1/repobrowser/?p=xestiacalendar%2F.git;a=blobdiff_plain;f=source%2Fwidgets%2FXCCalendarListAccountCtrl.cpp;h=dbd105e454f03bdf2d5acda44b4784348356a2f7;hp=46d0e363ff0d58986db03d0f727bfd3c4fad9a2a;hb=902d948e5e45ad483c8e235690dda8f2bf596ad5;hpb=49cd1caba10366538e7f87181d2ff90b5c715693 diff --git a/source/widgets/XCCalendarListAccountCtrl.cpp b/source/widgets/XCCalendarListAccountCtrl.cpp index 46d0e36..dbd105e 100644 --- a/source/widgets/XCCalendarListAccountCtrl.cpp +++ b/source/widgets/XCCalendarListAccountCtrl.cpp @@ -37,7 +37,7 @@ XCCalendarListAccountCtrl::XCCalendarListAccountCtrl(wxWindow* parent, string ac // Setup the label. - lblAccountName = new wxStaticText(this, wxID_ANY, wxString(accountName), wxDefaultPosition, wxDefaultSize, 0, ""); + lblAccountName = new wxStaticText(this, wxID_ANY, wxString(accountName.c_str(), wxConvUTF8), wxDefaultPosition, wxDefaultSize, 0, ""); // Setup the font. @@ -61,6 +61,12 @@ XCCalendarListAccountCtrl::~XCCalendarListAccountCtrl(){ // Delete the calendar controls. + // Unbind the controls. + + chkShowAll->Disconnect(wxEVT_COMMAND_CHECKBOX_CLICKED, wxMouseEventHandler(XCCalendarListAccountCtrl::ShowAllCheckboxClick), NULL, this); + + // Delete the calendar list controls. + for (std::vector::iterator calendarIter = calendarControlList.begin(); calendarIter != calendarControlList.end(); calendarIter++){ @@ -73,6 +79,14 @@ XCCalendarListAccountCtrl::~XCCalendarListAccountCtrl(){ calendarControlList.clear(); // Clear the widget controls. + + delete chkShowAll; + chkShowAll = nullptr; + + delete lblAccountName; + lblAccountName = nullptr; + + this->SetSizer(nullptr, true); }