summaryrefslogtreecommitdiff
path: root/src/modules/langpack/lpopts.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2014-06-21 20:01:52 +0000
committerKirill Volinsky <mataes2007@gmail.com>2014-06-21 20:01:52 +0000
commit4955a3b835c8b6d71fa836cdfc0ec5b82fa59ae0 (patch)
tree3229191afdf997f55a69f9deee2ec399dafe8f44 /src/modules/langpack/lpopts.cpp
parent85b429453559d86491ac428a1028cbe4d5b382c9 (diff)
fixed langpack authors crop
git-svn-id: http://svn.miranda-ng.org/main/trunk@9548 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/langpack/lpopts.cpp')
-rw-r--r--src/modules/langpack/lpopts.cpp21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/modules/langpack/lpopts.cpp b/src/modules/langpack/lpopts.cpp
index d0258dde6b..b1c11ae665 100644
--- a/src/modules/langpack/lpopts.cpp
+++ b/src/modules/langpack/lpopts.cpp
@@ -72,9 +72,8 @@ static void DisplayPackInfo(HWND hwndDlg, const LANGPACK_INFO *pack)
static BOOL InsertPackItemEnumProc(LANGPACK_INFO *pack, WPARAM wParam, LPARAM lParam)
{
- LANGPACK_INFO *pack2 = (LANGPACK_INFO*)mir_alloc(sizeof(LANGPACK_INFO));
- if (pack2 == NULL) return FALSE;
- CopyMemory(pack2, pack, sizeof(LANGPACK_INFO));
+ LANGPACK_INFO *pack2 = new LANGPACK_INFO();
+ *pack2 = *pack;
/* insert */
TCHAR tszName[512];
@@ -120,15 +119,6 @@ INT_PTR CALLBACK DlgLangpackOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
EnumLangpacks(InsertPackItemEnumProc, (WPARAM)hwndList, (LPARAM)0);
return TRUE;
- case WM_DESTROY:
- {
- int count = ListBox_GetCount(hwndList);
- for (int i = 0; i < count; i++)
- mir_free((LANGPACK_INFO*)ListBox_GetItemData(hwndList, i));
- ComboBox_ResetContent(hwndList);
- }
- return TRUE;
-
case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDC_LANGEMAIL:
@@ -194,6 +184,13 @@ INT_PTR CALLBACK DlgLangpackOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
}
}
break;
+
+ case WM_DESTROY:
+ int count = ListBox_GetCount(hwndList);
+ for (int i = 0; i < count; i++)
+ delete (LANGPACK_INFO*)ListBox_GetItemData(hwndList, i);
+ ComboBox_ResetContent(hwndList);
+ return TRUE;
}
return FALSE;
}