summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-03-28 22:48:29 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-03-28 22:48:29 +0300
commit4b69cb37370299462344633385da52896c7078fd (patch)
treef26f4313a94fb37da6e2265e8740db59ae90b733 /plugins/TabSRMM/src
parent2cf63b38b3ddc616a18847a29ab36790138a168a (diff)
two more useless calls of SM_FindSessionByHCONTACT removed
Diffstat (limited to 'plugins/TabSRMM/src')
-rw-r--r--plugins/TabSRMM/src/container.cpp14
-rw-r--r--plugins/TabSRMM/src/hotkeyhandler.cpp16
2 files changed, 2 insertions, 28 deletions
diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp
index cf7ed520da..91debd2d38 100644
--- a/plugins/TabSRMM/src/container.cpp
+++ b/plugins/TabSRMM/src/container.cpp
@@ -71,21 +71,11 @@ void TContainerData::UpdateTitle(MCONTACT hContact, CTabBaseDlg *pDlg)
CTabBaseDlg *dat = nullptr;
if (hContact == 0) { // no hContact given - obtain the hContact for the active tab
if (m_hwndActive && IsWindow(m_hwndActive))
- SendMessage(m_hwndActive, DM_QUERYHCONTACT, 0, (LPARAM)&hContact);
- else
- return;
- dat = (CTabBaseDlg*)GetWindowLongPtr(m_hwndActive, GWLP_USERDATA);
+ dat = (CTabBaseDlg*)GetWindowLongPtr(m_hwndActive, GWLP_USERDATA);
}
else {
HWND hwnd = M.FindWindow(hContact);
- if (hwnd == nullptr) {
- SESSION_INFO *si = SM_FindSessionByHCONTACT(hContact);
- if (si) {
- si->pDlg->UpdateTitle();
- return;
- }
- }
- if (hwnd && hContact)
+ if (hwnd != nullptr)
dat = (CTabBaseDlg*)GetWindowLongPtr(hwnd, GWLP_USERDATA);
}
if (dat) {
diff --git a/plugins/TabSRMM/src/hotkeyhandler.cpp b/plugins/TabSRMM/src/hotkeyhandler.cpp
index c1052eecd0..226298640e 100644
--- a/plugins/TabSRMM/src/hotkeyhandler.cpp
+++ b/plugins/TabSRMM/src/hotkeyhandler.cpp
@@ -107,22 +107,6 @@ void TSAPI HandleMenuEntryFromhContact(MCONTACT hContact)
return;
}
- SESSION_INFO *si = SM_FindSessionByHCONTACT(hContact);
- if (si != nullptr) {
- // session does exist, but no window is open for it
- if (si->pDlg) {
- TContainerData *pContainer = 0;
- SendMessage(si->pDlg->GetHwnd(), DM_QUERYCONTAINER, 0, (LPARAM)&pContainer);
- if (pContainer) {
- ActivateExistingTab(pContainer, si->pDlg->GetHwnd());
- if (GetForegroundWindow() != pContainer->m_hwnd)
- SetForegroundWindow(pContainer->m_hwnd);
- SetFocus(GetDlgItem(pContainer->m_hwndActive, IDC_SRMM_MESSAGE));
- return;
- }
- }
- }
-
Clist_ContactDoubleClicked(hContact);
}