diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2015-03-05 22:14:09 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2015-03-05 22:14:09 +0000 |
commit | 18a91339f2d9e1449887f5d993ab2f038ff56833 (patch) | |
tree | c5ee079c530794040fee8d2cfb497bd799545735 /plugins/TabSRMM/src/container.cpp | |
parent | b915069a9d7ad8d4da5da7a7d92d3e73a0a65346 (diff) |
TabSRMM: code cleanup
git-svn-id: http://svn.miranda-ng.org/main/trunk@12344 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM/src/container.cpp')
-rw-r--r-- | plugins/TabSRMM/src/container.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp index 84682def1c..c80af6993f 100644 --- a/plugins/TabSRMM/src/container.cpp +++ b/plugins/TabSRMM/src/container.cpp @@ -653,12 +653,7 @@ static INT_PTR CALLBACK DlgProcContainer(HWND hwndDlg, UINT msg, WPARAM wParam, if (lParam) { DWORD dwSWPFlags = SWP_NOACTIVATE | SWP_NOZORDER | SWP_DEFERERASE | SWP_NOCOPYBITS; // | SWP_NOSENDCHANGING | SWP_ASYNCWINDOWPOS; - if (pContainer->dwFlags & CNT_TABSBOTTOM) - SetWindowPos(hwndTab, 0, pContainer->tBorder_outer_left + sbarWidth_left, pContainer->tBorder_outer_top + rebarHeight, - (rcClient.right - rcClient.left) - (pContainer->tBorder_outer_left + pContainer->tBorder_outer_right + sbarWidth), - (rcClient.bottom - rcClient.top) - pContainer->statusBarHeight - (pContainer->tBorder_outer_top + pContainer->tBorder_outer_bottom) - rebarHeight, dwSWPFlags); - else - SetWindowPos(hwndTab, 0, pContainer->tBorder_outer_left + sbarWidth_left, pContainer->tBorder_outer_top + rebarHeight, + SetWindowPos(hwndTab, 0, pContainer->tBorder_outer_left + sbarWidth_left, pContainer->tBorder_outer_top + rebarHeight, (rcClient.right - rcClient.left) - (pContainer->tBorder_outer_left + pContainer->tBorder_outer_right + sbarWidth), (rcClient.bottom - rcClient.top) - pContainer->statusBarHeight - (pContainer->tBorder_outer_top + pContainer->tBorder_outer_bottom) - rebarHeight, dwSWPFlags); } @@ -1153,12 +1148,11 @@ static INT_PTR CALLBACK DlgProcContainer(HWND hwndDlg, UINT msg, WPARAM wParam, iNewTab = iCurrent ? iCurrent - 1 : iItems - 1; // cycle if current is already the leftmost tab.. else if (wParam == DM_SELECT_NEXT) iNewTab = (iCurrent == (iItems - 1)) ? 0 : iCurrent + 1; - else if (wParam == DM_SELECT_BY_INDEX) { + else { if ((int)lParam > iItems) break; iNewTab = lParam - 1; } - else iNewTab = -1; if (iNewTab != iCurrent) { memset(&item, 0, sizeof(item)); @@ -2219,6 +2213,8 @@ void TSAPI ReflashContainer(TContainerData *pContainer) void TSAPI BroadCastContainer(const TContainerData *pContainer, UINT message, WPARAM wParam, LPARAM lParam, BYTE bType) { + if (pContainer == NULL) + return; HWND hwndTab = GetDlgItem(pContainer->hwnd, IDC_MSGTABS); TCITEM item = { 0 }; |