diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2015-02-15 10:57:54 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2015-02-15 10:57:54 +0000 |
commit | 58f3f2d387c7b3a020eaf4f0b30bf70522adcfad (patch) | |
tree | 0e09137c3b8b84a79616a9c65df9eacff377d777 /protocols/Tox/src/tox_options.cpp | |
parent | 60b391e2a55749c0cf9e96f53515673a0898a0d5 (diff) |
code cleanup
git-svn-id: http://svn.miranda-ng.org/main/trunk@12120 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_options.cpp')
-rw-r--r-- | protocols/Tox/src/tox_options.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/protocols/Tox/src/tox_options.cpp b/protocols/Tox/src/tox_options.cpp index 3ee3b0a90e..49b4ddb06a 100644 --- a/protocols/Tox/src/tox_options.cpp +++ b/protocols/Tox/src/tox_options.cpp @@ -1,6 +1,6 @@ #include "common.h"
-HWND hAddNodeDlg;
+HWND hAddNodeDlg, hChangeNodeDlg;
bool UpdateListFlag = false;
INT_PTR CToxProto::MainOptionsProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
@@ -375,6 +375,7 @@ INT_PTR CALLBACK ChangeNodeDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM case WM_DESTROY:
ItemInfo *SelItem = (ItemInfo *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ hChangeNodeDlg = 0;
Utils_SaveWindowPosition(hwndDlg, NULL, MODULE, "ChangeNodeDlg");
delete SelItem;
break;
@@ -404,11 +405,11 @@ INT_PTR CALLBACK ToxNodesOptionsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR return FALSE;
case IDC_CHANGE:
- {
+ if (hChangeNodeDlg == 0) {
ItemInfo SelItem = { 0 };
SelItem.hwndList = hwndList;
SelItem.SelNumber = ListView_GetSelectionMark(hwndList);
- CreateDialogParam(g_hInstance, MAKEINTRESOURCE(IDD_ADDNODE), hwndDlg, ChangeNodeDlgProc, (LPARAM)&SelItem);
+ hChangeNodeDlg = CreateDialogParam(g_hInstance, MAKEINTRESOURCE(IDD_ADDNODE), hwndDlg, ChangeNodeDlgProc, (LPARAM)&SelItem);
}
return FALSE;
|