From b0e4435c00e362b43c494bb778bb3167eb64951f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 26 Mar 2014 08:34:59 +0000 Subject: end of the plugins list in a langpack description git-svn-id: http://svn.miranda-ng.org/main/trunk@8754 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/options/options.cpp | 61 ++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 31 deletions(-) (limited to 'src/modules/options') diff --git a/src/modules/options/options.cpp b/src/modules/options/options.cpp index 38efd94b32..4812506681 100644 --- a/src/modules/options/options.cpp +++ b/src/modules/options/options.cpp @@ -1108,41 +1108,40 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hdlg, UINT message, WPARAM wParam, L case IDC_APPLY: if (LOWORD(wParam) == IDOK && GetParent(GetFocus()) == GetDlgItem(hdlg, IDC_KEYWORD_FILTER)) return TRUE; - else { - PSHNOTIFY pshn; - EnableWindow(GetDlgItem(hdlg, IDC_APPLY), FALSE); - SetFocus(hwndTree); - opd = dat->getCurrent(); - if (opd != NULL) { - pshn.lParam = 0; - pshn.hdr.code = PSN_KILLACTIVE; - pshn.hdr.hwndFrom = opd->hwnd; - pshn.hdr.idFrom = LOWORD(wParam); - if (SendMessage(opd->hwnd, WM_NOTIFY, 0, (LPARAM)&pshn)) - break; - } + PSHNOTIFY pshn; + EnableWindow(GetDlgItem(hdlg, IDC_APPLY), FALSE); + SetFocus(hwndTree); - pshn.hdr.code = PSN_APPLY; - for (int i = 0; i < dat->arOpd.getCount(); i++) { - if (dat->arOpd[i]->hwnd == NULL || !dat->arOpd[i]->changed) continue; - dat->arOpd[i]->changed = 0; - pshn.hdr.hwndFrom = dat->arOpd[i]->hwnd; - if (SendMessage(dat->arOpd[i]->hwnd, WM_NOTIFY, 0, (LPARAM)&pshn) == PSNRET_INVALID_NOCHANGEPAGE) { - dat->hCurrentPage = dat->arOpd[i]->hTreeItem; - TreeView_SelectItem(hwndTree, dat->hCurrentPage); - if (opd) - ShowWindow(opd->hwnd, SW_HIDE); - dat->currentPage = i; - if (opd) - ShowWindow(opd->hwnd, SW_SHOW); - return 0; - } - } + opd = dat->getCurrent(); + if (opd != NULL) { + pshn.lParam = 0; + pshn.hdr.code = PSN_KILLACTIVE; + pshn.hdr.hwndFrom = opd->hwnd; + pshn.hdr.idFrom = LOWORD(wParam); + if (SendMessage(opd->hwnd, WM_NOTIFY, 0, (LPARAM)&pshn)) + break; + } - if (LOWORD(wParam) == IDOK) - DestroyWindow(hdlg); + pshn.hdr.code = PSN_APPLY; + for (int i = 0; i < dat->arOpd.getCount(); i++) { + if (dat->arOpd[i]->hwnd == NULL || !dat->arOpd[i]->changed) continue; + dat->arOpd[i]->changed = 0; + pshn.hdr.hwndFrom = dat->arOpd[i]->hwnd; + if (SendMessage(dat->arOpd[i]->hwnd, WM_NOTIFY, 0, (LPARAM)&pshn) == PSNRET_INVALID_NOCHANGEPAGE) { + dat->hCurrentPage = dat->arOpd[i]->hTreeItem; + TreeView_SelectItem(hwndTree, dat->hCurrentPage); + if (opd) + ShowWindow(opd->hwnd, SW_HIDE); + dat->currentPage = i; + if (opd) + ShowWindow(opd->hwnd, SW_SHOW); + return 0; + } } + + if (LOWORD(wParam) == IDOK) + DestroyWindow(hdlg); } break; -- cgit v1.2.3