diff options
Diffstat (limited to 'plugins/TabSRMM')
-rw-r--r-- | plugins/TabSRMM/src/generic_msghandlers.cpp | 3 | ||||
-rw-r--r-- | plugins/TabSRMM/src/mim.cpp | 19 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgs.cpp | 21 |
3 files changed, 19 insertions, 24 deletions
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp index d607e38931..bf347b89e3 100644 --- a/plugins/TabSRMM/src/generic_msghandlers.cpp +++ b/plugins/TabSRMM/src/generic_msghandlers.cpp @@ -1893,9 +1893,8 @@ void TSAPI DM_UpdateTitle(TWindowData *dat, WPARAM wParam, LPARAM lParam) static HANDLE hHookIconPressedEvt;
-static int OnSrmmIconChanged(WPARAM wParam, LPARAM)
+static int OnSrmmIconChanged(WPARAM hContact, LPARAM)
{
- MCONTACT hContact = wParam;
if (hContact == NULL)
M.BroadcastMessage(DM_STATUSICONCHANGE, 0, 0);
else {
diff --git a/plugins/TabSRMM/src/mim.cpp b/plugins/TabSRMM/src/mim.cpp index 8b069edb8b..be9b230e48 100644 --- a/plugins/TabSRMM/src/mim.cpp +++ b/plugins/TabSRMM/src/mim.cpp @@ -329,13 +329,12 @@ void CMimAPI::InitAPI() * hook subscriber function for incoming message typing events
*/
-int CMimAPI::TypingMessage(WPARAM wParam, LPARAM lParam)
+int CMimAPI::TypingMessage(WPARAM hContact, LPARAM lParam)
{
HWND hwnd = 0;
int issplit = 1, foundWin = 0, preTyping = 0;
BOOL fShowOnClist = TRUE;
- MCONTACT hContact = wParam;
if (hContact) {
if ((hwnd = M.FindWindow(hContact)) && M.GetByte(SRMSGMOD, SRMSGSET_SHOWTYPING, SRMSGDEFSET_SHOWTYPING))
preTyping = SendMessage(hwnd, DM_TYPING, 0, lParam);
@@ -407,14 +406,14 @@ int CMimAPI::TypingMessage(WPARAM wParam, LPARAM lParam) }
if (fShowOnClist) {
CLISTEVENT cle = { sizeof(cle) };
- cle.hContact = wParam;
+ cle.hContact = hContact;
cle.hDbEvent = (HANDLE)1;
cle.flags = CLEF_ONLYAFEW | CLEF_TCHAR;
cle.hIcon = PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING];
cle.pszService = "SRMsg/TypingMessage";
cle.ptszTooltip = szTip;
- CallServiceSync(MS_CLIST_REMOVEEVENT, wParam, (LPARAM)1);
- CallServiceSync(MS_CLIST_ADDEVENT, wParam, (LPARAM)&cle);
+ CallServiceSync(MS_CLIST_REMOVEEVENT, hContact, (LPARAM)1);
+ CallServiceSync(MS_CLIST_ADDEVENT, hContact, (LPARAM)&cle);
}
}
}
@@ -466,9 +465,8 @@ int CMimAPI::ProtoAck(WPARAM wParam, LPARAM lParam) return 0;
}
-int CMimAPI::PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
+int CMimAPI::PrebuildContactMenu(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
if (hContact == NULL)
return NULL;
@@ -512,7 +510,7 @@ int CMimAPI::DispatchNewEvent(WPARAM wParam, LPARAM lParam) * if a session is already created, it just does nothing and DispatchNewEvent() will take care.
*/
-int CMimAPI::MessageEventAdded(WPARAM wParam, LPARAM lParam)
+int CMimAPI::MessageEventAdded(WPARAM hContact, LPARAM lParam)
{
BYTE bAutoPopup = FALSE, bAutoCreate = FALSE, bAutoContainer = FALSE, bAllowAutoCreate = 0;
TCHAR szName[CONTAINER_NAMELEN + 1];
@@ -522,7 +520,6 @@ int CMimAPI::MessageEventAdded(WPARAM wParam, LPARAM lParam) DBEVENTINFO dbei = { sizeof(dbei) };
db_event_get(hDbEvent, &dbei);
- MCONTACT hContact = wParam;
HWND hwnd = M.FindWindow(hContact);
BOOL isCustomEvent = IsCustomEvent(dbei.eventType);
@@ -530,7 +527,7 @@ int CMimAPI::MessageEventAdded(WPARAM wParam, LPARAM lParam) if ((dbei.flags & (DBEF_READ | DBEF_SENT)) || (isCustomEvent && !isShownCustomEvent))
return 0;
- CallServiceSync(MS_CLIST_REMOVEEVENT, wParam, 1);
+ CallServiceSync(MS_CLIST_REMOVEEVENT, hContact, 1);
if (hwnd) {
TContainerData *pTargetContainer = 0;
@@ -614,7 +611,7 @@ int CMimAPI::MessageEventAdded(WPARAM wParam, LPARAM lParam) else {
char *szProto = GetContactProto(hContact);
if (PluginConfig.g_MetaContactsAvail && szProto && !strcmp(szProto, (char *)CallService(MS_MC_GETPROTOCOLNAME, 0, 0))) {
- MCONTACT hSubconttact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, wParam, 0);
+ MCONTACT hSubconttact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, hContact, 0);
szProto = GetContactProto(hSubconttact);
}
if (szProto) {
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp index a64a8661b4..98dde21f3b 100644 --- a/plugins/TabSRMM/src/msgs.cpp +++ b/plugins/TabSRMM/src/msgs.cpp @@ -294,9 +294,8 @@ static INT_PTR ReadMessageCommand(WPARAM, LPARAM lParam) * for filling the message input box with a passed message
*/
-INT_PTR SendMessageCommand_W(WPARAM wParam, LPARAM lParam)
+INT_PTR SendMessageCommand_W(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
TNewWindowData newData = { 0 };
int isSplit = 1;
@@ -309,9 +308,9 @@ INT_PTR SendMessageCommand_W(WPARAM wParam, LPARAM lParam) wchar_t *tszText = (wchar_t *)mir_alloc((iLen + 1) * sizeof(wchar_t));
wcsncpy(tszText, (wchar_t *)lParam, iLen + 1);
tszText[iLen] = 0;
- PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_SENDMESSAGECOMMANDW, wParam, (LPARAM)tszText);
- } else
- PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_SENDMESSAGECOMMANDW, wParam, 0);
+ PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_SENDMESSAGECOMMANDW, hContact, (LPARAM)tszText);
+ }
+ else PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_SENDMESSAGECOMMANDW, hContact, 0);
return 0;
}
@@ -353,9 +352,8 @@ INT_PTR SendMessageCommand_W(WPARAM wParam, LPARAM lParam) * contacts handle must be passed in wParam.
*/
-INT_PTR SendMessageCommand(WPARAM wParam, LPARAM lParam)
+INT_PTR SendMessageCommand(WPARAM hContact, LPARAM lParam)
{
- MCONTACT hContact = wParam;
TNewWindowData newData = { 0 };
int isSplit = 1;
@@ -365,9 +363,9 @@ INT_PTR SendMessageCommand(WPARAM wParam, LPARAM lParam) char *szText = (char *)mir_alloc(iLen + 1);
strncpy(szText, (char *)lParam, iLen + 1);
szText[iLen] = 0;
- PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_SENDMESSAGECOMMAND, wParam, (LPARAM)szText);
+ PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_SENDMESSAGECOMMAND, hContact, (LPARAM)szText);
} else
- PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_SENDMESSAGECOMMAND, wParam, 0);
+ PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_SENDMESSAGECOMMAND, hContact, 0);
return 0;
}
@@ -389,9 +387,10 @@ INT_PTR SendMessageCommand(WPARAM wParam, LPARAM lParam) SendMessageA(hEdit, EM_REPLACESEL, FALSE, (LPARAM)(char *) lParam);
}
SendMessage(hwnd, DM_ACTIVATEME, 0, 0); // ask the message window about its parent...
- } else {
+ }
+ else {
TCHAR szName[CONTAINER_NAMELEN + 1];
- GetContainerNameForContact(wParam, szName, CONTAINER_NAMELEN);
+ GetContainerNameForContact(hContact, szName, CONTAINER_NAMELEN);
TContainerData *pContainer = FindContainerByName(szName);
if (pContainer == NULL)
pContainer = CreateContainer(szName, FALSE, hContact);
|