From b9c6f2f3a368274a21cee17d4e3ffe2f9980ec7d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 19 Mar 2013 20:49:46 +0000 Subject: - minor optimizations; - code cleaning; git-svn-id: http://svn.miranda-ng.org/main/trunk@4116 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/TabSRMM/src/msgs.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/TabSRMM/src/msgs.cpp') 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; -- cgit v1.2.3