diff options
author | George Hazan <george.hazan@gmail.com> | 2013-03-19 20:49:46 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-03-19 20:49:46 +0000 |
commit | b9c6f2f3a368274a21cee17d4e3ffe2f9980ec7d (patch) | |
tree | 927fdba2cbe494844d9427533800cf418e7d9fb3 /plugins/TabSRMM/src/msgs.cpp | |
parent | 065cfd5dee2d8fbbfe2b8780d17871c090dd952b (diff) |
- minor optimizations;
- code cleaning;
git-svn-id: http://svn.miranda-ng.org/main/trunk@4116 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM/src/msgs.cpp')
-rw-r--r-- | plugins/TabSRMM/src/msgs.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp index b08d31f0a9..4da1d72c94 100644 --- a/plugins/TabSRMM/src/msgs.cpp +++ b/plugins/TabSRMM/src/msgs.cpp @@ -617,8 +617,8 @@ int TSAPI ActivateExistingTab(TContainerData *pContainer, HWND hwndChild) if (dat && pContainer) {
ZeroMemory((void*)&nmhdr, sizeof(nmhdr));
nmhdr.code = TCN_SELCHANGE;
- if (TabCtrl_GetItemCount(GetDlgItem(pContainer->hwnd, IDC_MSGTABS)) > 1 && !(pContainer->dwFlags & CNT_DEFERREDTABSELECT)) {
- TabCtrl_SetCurSel(GetDlgItem(pContainer->hwnd, IDC_MSGTABS), GetTabIndexFromHWND(GetDlgItem(pContainer->hwnd, IDC_MSGTABS), hwndChild));
+ if (TabCtrl_GetItemCount( GetDlgItem(pContainer->hwnd, IDC_MSGTABS)) > 1 && !(pContainer->dwFlags & CNT_DEFERREDTABSELECT)) {
+ TabCtrl_SetCurSel( GetDlgItem(pContainer->hwnd, IDC_MSGTABS), GetTabIndexFromHWND( GetDlgItem(pContainer->hwnd, IDC_MSGTABS), hwndChild));
SendMessage(pContainer->hwnd, WM_NOTIFY, 0, (LPARAM) &nmhdr); // just select the tab and let WM_NOTIFY do the rest
}
if (dat->bType == SESSIONTYPE_IM)
@@ -650,7 +650,7 @@ int TSAPI ActivateExistingTab(TContainerData *pContainer, HWND hwndChild) else if (GetForegroundWindow() != pContainer->hwnd)
SetForegroundWindow(pContainer->hwnd);
if (dat->bType == SESSIONTYPE_IM)
- SetFocus(GetDlgItem(hwndChild, IDC_MESSAGE));
+ SetFocus( GetDlgItem(hwndChild, IDC_MESSAGE));
return TRUE;
} else
return FALSE;
@@ -752,7 +752,7 @@ HWND TSAPI CreateNewTabForContact(struct TContainerData *pContainer, HANDLE hCon newItem = TabCtrl_InsertItem(hwndTab, pContainer->iTabIndex, &newData.item);
SendMessage(hwndTab, EM_REFRESHWITHOUTCLIP, 0, 0);
if (bActivateTab)
- TabCtrl_SetCurSel(GetDlgItem(pContainer->hwnd, IDC_MSGTABS), newItem);
+ TabCtrl_SetCurSel( GetDlgItem(pContainer->hwnd, IDC_MSGTABS), newItem);
newData.iTabID = newItem;
newData.iTabImage = newData.item.iImage;
newData.pContainer = pContainer;
|