summaryrefslogtreecommitdiff
path: root/plugins/Scriver/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-03-28 18:44:24 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-03-28 18:44:24 +0300
commit2cf63b38b3ddc616a18847a29ab36790138a168a (patch)
treecd108e21f71cb5f6626b1b788e70a419852a5d3d /plugins/Scriver/src
parent1ab93d3afabe3a5872040b5acafc9f113c196a2b (diff)
more unneeded code removed
Diffstat (limited to 'plugins/Scriver/src')
-rw-r--r--plugins/Scriver/src/chat.h1
-rw-r--r--plugins/Scriver/src/chat_manager.cpp17
-rw-r--r--plugins/Scriver/src/msgs.cpp10
-rw-r--r--plugins/Scriver/src/statusicon.cpp2
-rw-r--r--plugins/Scriver/src/stdafx.h1
5 files changed, 5 insertions, 26 deletions
diff --git a/plugins/Scriver/src/chat.h b/plugins/Scriver/src/chat.h
index 8d40bbd6f2..f4bee7dcfb 100644
--- a/plugins/Scriver/src/chat.h
+++ b/plugins/Scriver/src/chat.h
@@ -74,7 +74,6 @@ void FreeMsgLogBitmaps(void);
void ShowRoom(SESSION_INFO *si);
// manager.c
-HWND SM_FindWindowByContact(MCONTACT hContact);
SESSION_INFO* SM_FindSessionAutoComplete(const char* pszModule, SESSION_INFO* currSession, SESSION_INFO* prevSession, const wchar_t* pszOriginal, const wchar_t* pszCurrent);
char SM_GetStatusIndicator(SESSION_INFO *si, USERINFO *ui);
diff --git a/plugins/Scriver/src/chat_manager.cpp b/plugins/Scriver/src/chat_manager.cpp
index f86764560a..c763f15e6a 100644
--- a/plugins/Scriver/src/chat_manager.cpp
+++ b/plugins/Scriver/src/chat_manager.cpp
@@ -21,23 +21,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "stdafx.h"
-HWND SM_FindWindowByContact(MCONTACT hContact)
-{
- for (int i = 0; i < pci->arSessions.getCount(); i++) {
- SESSION_INFO *si = pci->arSessions[i];
- if (si->hContact == hContact)
- return (si->pDlg) ? si->pDlg->GetHwnd() : nullptr;
- }
- return nullptr;
-}
-
SESSION_INFO* SM_FindSessionAutoComplete(const char* pszModule, SESSION_INFO *currSession, SESSION_INFO *prevSession, const wchar_t *pszOriginal, const wchar_t *pszCurrent)
{
- SESSION_INFO* pResult = nullptr;
+ SESSION_INFO *pResult = nullptr;
if (prevSession == nullptr && my_strstri(currSession->ptszName, pszOriginal) == currSession->ptszName)
pResult = currSession;
else {
- wchar_t* pszName = nullptr;
+ wchar_t *pszName = nullptr;
if (currSession == prevSession)
pszCurrent = pszOriginal;
@@ -58,11 +48,10 @@ SESSION_INFO* SM_FindSessionAutoComplete(const char* pszModule, SESSION_INFO *cu
char SM_GetStatusIndicator(SESSION_INFO *si, USERINFO *ui)
{
- STATUSINFO * ti;
if (!ui || !si)
return '\0';
- ti = pci->TM_FindStatus(si->pStatuses, pci->TM_WordToString(si->pStatuses, ui->Status));
+ STATUSINFO *ti = pci->TM_FindStatus(si->pStatuses, pci->TM_WordToString(si->pStatuses, ui->Status));
if (ti) {
if ((INT_PTR)ti->hIcon < STATUSICONCOUNT) {
INT_PTR id = si->iStatusCount - (INT_PTR)ti->hIcon - 1;
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp
index 2be9a2c810..1b3ac3df92 100644
--- a/plugins/Scriver/src/msgs.cpp
+++ b/plugins/Scriver/src/msgs.cpp
@@ -290,11 +290,8 @@ static INT_PTR SetStatusText(WPARAM hContact, LPARAM lParam)
return 1;
HWND hwnd = WindowList_Find(pci->hWindowList, hContact);
- if (hwnd == nullptr) {
- hwnd = SM_FindWindowByContact(hContact);
- if (hwnd == nullptr)
- return 1;
- }
+ if (hwnd == nullptr)
+ return 1;
CScriverWindow *dat = (CScriverWindow*)GetWindowLongPtr(hwnd, GWLP_USERDATA);
if (dat == nullptr || dat->m_pParent == nullptr)
@@ -438,9 +435,6 @@ int StatusIconPressed(WPARAM wParam, LPARAM lParam)
return 0;
HWND hwnd = WindowList_Find(pci->hWindowList, wParam);
- if (hwnd == nullptr)
- hwnd = SM_FindWindowByContact(wParam);
-
if (hwnd != nullptr)
SendMessage(hwnd, DM_SWITCHTYPING, 0, 0);
return 0;
diff --git a/plugins/Scriver/src/statusicon.cpp b/plugins/Scriver/src/statusicon.cpp
index 401ef8335f..f59c9f8ede 100644
--- a/plugins/Scriver/src/statusicon.cpp
+++ b/plugins/Scriver/src/statusicon.cpp
@@ -65,8 +65,6 @@ static int OnSrmmIconChanged(WPARAM hContact, LPARAM)
WindowList_Broadcast(g_dat.hParentWindowList, DM_STATUSICONCHANGE, 0, 0);
else {
HWND hwnd = WindowList_Find(pci->hWindowList, hContact);
- if (hwnd == nullptr)
- hwnd = SM_FindWindowByContact(hContact);
if (hwnd != nullptr)
PostMessage(GetParent(hwnd), DM_STATUSICONCHANGE, 0, 0);
}
diff --git a/plugins/Scriver/src/stdafx.h b/plugins/Scriver/src/stdafx.h
index 09d0124a84..7100a13efb 100644
--- a/plugins/Scriver/src/stdafx.h
+++ b/plugins/Scriver/src/stdafx.h
@@ -87,7 +87,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define CFM_WEIGHT 0x00400000
#endif
-extern HWND SM_FindWindowByContact(MCONTACT hContact);
extern HINSTANCE g_hInst;
extern HCURSOR hDragCursor;
extern ITaskbarList3 *pTaskbarInterface;