Not Logged In
|
Login
|
Register
Home
|
News
|
Projects
|
Releases
Bugs
|
RFE
|
Repositories
|
Help
projects
/
xestiacalendar
/
.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
widgets: Cleanup objects in destructors and minor code cleanup
[xestiacalendar/.git]
/
source
/
widgets
/
XCCalendarListAccountCtrl.cpp
diff --git
a/source/widgets/XCCalendarListAccountCtrl.cpp
b/source/widgets/XCCalendarListAccountCtrl.cpp
index
46d0e36
..
dbd105e
100644
(file)
--- a/
source/widgets/XCCalendarListAccountCtrl.cpp
+++ b/
source/widgets/XCCalendarListAccountCtrl.cpp
@@
-37,7
+37,7
@@
XCCalendarListAccountCtrl::XCCalendarListAccountCtrl(wxWindow* parent, string ac
// Setup the label.
// 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.
// Setup the font.
@@
-61,6
+61,12
@@
XCCalendarListAccountCtrl::~XCCalendarListAccountCtrl(){
// Delete the calendar controls.
// 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<XCCalendarListCalendarCtrl*>::iterator calendarIter = calendarControlList.begin();
calendarIter != calendarControlList.end(); calendarIter++){
for (std::vector<XCCalendarListCalendarCtrl*>::iterator calendarIter = calendarControlList.begin();
calendarIter != calendarControlList.end(); calendarIter++){
@@
-73,6
+79,14
@@
XCCalendarListAccountCtrl::~XCCalendarListAccountCtrl(){
calendarControlList.clear();
// Clear the widget controls.
calendarControlList.clear();
// Clear the widget controls.
+
+ delete chkShowAll;
+ chkShowAll = nullptr;
+
+ delete lblAccountName;
+ lblAccountName = nullptr;
+
+ this->SetSizer(nullptr, true);
}
}
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software
Xestia Address Book
Xestia Calendar
Development
Xestia Gelforn
Everything else
About
News
Privacy Policy