summaryrefslogtreecommitdiff
path: root/plugins/StatusManager/src/AdvancedAutoAway/aaa_options.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-02-02 13:27:14 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-02-02 13:27:14 +0300
commita7a6991d945a508d0f21ab34fd2f76ca15b95248 (patch)
treebf01e4414cea21d2494272d0d150afaae0438fa5 /plugins/StatusManager/src/AdvancedAutoAway/aaa_options.cpp
parent7253436a88270d83009626a1a5021658de85e8e8 (diff)
StatusManager:
- fixes #1129 (Status Manager broked. When I change profile - not happend) - all standard memory allocation routines replaced with mir_* (more effective) - classes used to allocate memory instead of manual code
Diffstat (limited to 'plugins/StatusManager/src/AdvancedAutoAway/aaa_options.cpp')
-rw-r--r--plugins/StatusManager/src/AdvancedAutoAway/aaa_options.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/plugins/StatusManager/src/AdvancedAutoAway/aaa_options.cpp b/plugins/StatusManager/src/AdvancedAutoAway/aaa_options.cpp
index 9e979e1230..db1fc2fea2 100644
--- a/plugins/StatusManager/src/AdvancedAutoAway/aaa_options.cpp
+++ b/plugins/StatusManager/src/AdvancedAutoAway/aaa_options.cpp
@@ -119,12 +119,7 @@ static void SetDialogStatus(HWND hwndDlg, SMProto *sameSetting)
/////////////////////////////////////////////////////////////////////////////////////////
// Rules dialog window procedure
-int AAACompareSettings(const SMProto *p1, const SMProto *p2)
-{
- return mir_strcmp(p1->m_szName, p2->m_szName);
-}
-
-static TProtoSettings optionSettings(10, AAACompareSettings);
+static TProtoSettings optionSettings;
static INT_PTR CALLBACK DlgProcAutoAwayRulesOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
@@ -140,7 +135,7 @@ static INT_PTR CALLBACK DlgProcAutoAwayRulesOpts(HWND hwndDlg, UINT msg, WPARAM
// copy the settings
optionSettings = protoList;
- sameSetting = (SMProto*)malloc(sizeof(SMProto));
+ sameSetting = (SMProto*)mir_alloc(sizeof(SMProto));
LoadAutoAwaySetting(*sameSetting, SETTING_ALL);
// fill list from currentProtoSettings
@@ -348,7 +343,7 @@ static INT_PTR CALLBACK DlgProcAutoAwayRulesOpts(HWND hwndDlg, UINT msg, WPARAM
case WM_DESTROY:
optionSettings.destroy();
- free(sameSetting);
+ mir_free(sameSetting);
break;
}
return FALSE;