summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-01-28 16:04:16 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-01-28 16:04:16 +0000
commitbb5aff746c50564ded61159c5ae28e6218d0a49d (patch)
tree0ec2ef5c4b6b6b9cf6c3bb4a606cf632e69b6d31 /plugins/TabSRMM/src
parent1042a84dd1f01c249a946ec708d3dae2881ecfab (diff)
another atavism removed: old stub services for clist events
git-svn-id: http://svn.miranda-ng.org/main/trunk@16181 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM/src')
-rw-r--r--plugins/TabSRMM/src/chat/tools.cpp4
-rw-r--r--plugins/TabSRMM/src/chat/window.cpp13
-rw-r--r--plugins/TabSRMM/src/hotkeyhandler.cpp8
-rw-r--r--plugins/TabSRMM/src/mim.cpp2
-rw-r--r--plugins/TabSRMM/src/msgdialog.cpp2
-rw-r--r--plugins/TabSRMM/src/msglog.cpp2
6 files changed, 16 insertions, 15 deletions
diff --git a/plugins/TabSRMM/src/chat/tools.cpp b/plugins/TabSRMM/src/chat/tools.cpp
index e357842be9..6e722c597b 100644
--- a/plugins/TabSRMM/src/chat/tools.cpp
+++ b/plugins/TabSRMM/src/chat/tools.cpp
@@ -46,8 +46,8 @@ static void __stdcall Chat_DismissPopup(void *pi)
{
SESSION_INFO *si = (SESSION_INFO*)pi;
if (si->hContact)
- if (CallService(MS_CLIST_GETEVENT, si->hContact, 0))
- CallServiceSync(MS_CLIST_REMOVEEVENT, si->hContact, (LPARAM)GC_FAKE_EVENT);
+ if (pcli->pfnGetEvent(si->hContact, 0))
+ pcli->pfnRemoveEvent(si->hContact, GC_FAKE_EVENT);
if (si->hWnd && KillTimer(si->hWnd, TIMERID_FLASHWND))
FlashWindow(si->hWnd, FALSE);
diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp
index 152a9278d4..71d1aabbfe 100644
--- a/plugins/TabSRMM/src/chat/window.cpp
+++ b/plugins/TabSRMM/src/chat/window.cpp
@@ -202,8 +202,8 @@ static void Chat_UpdateWindowState(TWindowData *dat, UINT msg)
if (dat->iTabID >= 0) {
if (db_get_w(si->hContact, si->pszModule, "ApparentMode", 0) != 0)
db_set_w(si->hContact, si->pszModule, "ApparentMode", 0);
- if (CallService(MS_CLIST_GETEVENT, si->hContact, 0))
- CallService(MS_CLIST_REMOVEEVENT, si->hContact, (LPARAM)GC_FAKE_EVENT);
+ if (pcli->pfnGetEvent(si->hContact, 0))
+ pcli->pfnRemoveEvent(si->hContact, GC_FAKE_EVENT);
SendMessage(hwndDlg, GC_UPDATETITLE, 0, 1);
dat->dwTickLastEvent = 0;
@@ -2265,8 +2265,8 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
return TRUE;
case SESSION_TERMINATE:
- if (CallService(MS_CLIST_GETEVENT, si->hContact, 0))
- CallService(MS_CLIST_REMOVEEVENT, si->hContact, (LPARAM)GC_FAKE_EVENT);
+ if (pcli->pfnGetEvent(si->hContact, 0))
+ pcli->pfnRemoveEvent(si->hContact, GC_FAKE_EVENT);
si->wState &= ~STATE_TALK;
dat->bWasDeleted = 1;
@@ -3422,8 +3422,9 @@ LABEL_SHOWWINDOW:
case WM_DESTROY:
if (si == NULL)
break;
- if (CallService(MS_CLIST_GETEVENT, si->hContact, 0))
- CallService(MS_CLIST_REMOVEEVENT, si->hContact, GC_FAKE_EVENT);
+
+ if (pcli->pfnGetEvent(si->hContact, 0))
+ pcli->pfnRemoveEvent(si->hContact, GC_FAKE_EVENT);
si->wState &= ~STATE_TALK;
si->hWnd = NULL;
si->dat = NULL;
diff --git a/plugins/TabSRMM/src/hotkeyhandler.cpp b/plugins/TabSRMM/src/hotkeyhandler.cpp
index ba25afd7fd..95f41152be 100644
--- a/plugins/TabSRMM/src/hotkeyhandler.cpp
+++ b/plugins/TabSRMM/src/hotkeyhandler.cpp
@@ -161,7 +161,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
case WM_HOTKEY:
{
- CLISTEVENT *cli = (CLISTEVENT *)CallService(MS_CLIST_GETEVENT, (WPARAM)INVALID_HANDLE_VALUE, 0);
+ CLISTEVENT *cli = pcli->pfnGetEvent(-1, 0);
if (cli != NULL) {
if (strncmp(cli->pszService, "SRMsg/TypingMessage", mir_strlen(cli->pszService))) {
CallService(cli->pszService, 0, (LPARAM)cli);
@@ -355,11 +355,11 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
if (lParam == 0)
HandleMenuEntryFromhContact(wParam);
else {
- CLISTEVENT *cle = (CLISTEVENT *)CallService(MS_CLIST_GETEVENT, wParam, 0);
+ CLISTEVENT *cle = pcli->pfnGetEvent(wParam, 0);
if (cle) {
if (ServiceExists(cle->pszService)) {
CallService(cle->pszService, 0, (LPARAM)cle);
- CallService(MS_CLIST_REMOVEEVENT, (WPARAM)cle->hContact, (LPARAM)cle->hDbEvent);
+ pcli->pfnRemoveEvent(cle->hContact, cle->hDbEvent);
}
}
// still, we got that message posted.. the event may be waiting in tabSRMMs tray...
@@ -419,7 +419,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
// sent from the popup to "dismiss" the event. we should do this in the main thread
case DM_REMOVECLISTEVENT:
- CallService(MS_CLIST_REMOVEEVENT, wParam, lParam);
+ pcli->pfnRemoveEvent(wParam, lParam);
db_event_markRead(wParam, lParam);
return 0;
diff --git a/plugins/TabSRMM/src/mim.cpp b/plugins/TabSRMM/src/mim.cpp
index 9febb58db2..0e2f691201 100644
--- a/plugins/TabSRMM/src/mim.cpp
+++ b/plugins/TabSRMM/src/mim.cpp
@@ -425,7 +425,7 @@ int CMimAPI::MessageEventAdded(WPARAM hContact, LPARAM hDbEvent)
if (dbei.markedRead() || (isCustomEvent && !isShownCustomEvent))
return 0;
- CallServiceSync(MS_CLIST_REMOVEEVENT, hContact, 1);
+ pcli->pfnRemoveEvent(hContact, 1);
bool bAllowAutoCreate = false;
bool bAutoPopup = M.GetBool(SRMSGSET_AUTOPOPUP, SRMSGDEFSET_AUTOPOPUP);
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp
index a1b07a1f7a..a89ba8265a 100644
--- a/plugins/TabSRMM/src/msgdialog.cpp
+++ b/plugins/TabSRMM/src/msgdialog.cpp
@@ -295,7 +295,7 @@ static void MsgWindowUpdateState(TWindowData *dat, UINT msg)
if (dat->dwFlagsEx & MWF_SHOW_FLASHCLIST) {
dat->dwFlagsEx &= ~MWF_SHOW_FLASHCLIST;
if (dat->hFlashingEvent != 0)
- CallService(MS_CLIST_REMOVEEVENT, dat->hContact, (LPARAM)dat->hFlashingEvent);
+ pcli->pfnRemoveEvent(dat->hContact, dat->hFlashingEvent);
dat->hFlashingEvent = 0;
}
dat->pContainer->dwFlags &= ~CNT_NEED_UPDATETITLE;
diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp
index 58ed380ce1..7280b095f6 100644
--- a/plugins/TabSRMM/src/msglog.cpp
+++ b/plugins/TabSRMM/src/msglog.cpp
@@ -451,7 +451,7 @@ static char* Template_CreateRTFFromDbEvent(TWindowData *dat, MCONTACT hContact,
if (!isSent && (bIsStatusChangeEvent || dbei.eventType == EVENTTYPE_MESSAGE || DbEventIsForMsgWindow(&dbei))) {
db_event_markRead(hContact, hDbEvent);
- CallService(MS_CLIST_REMOVEEVENT, hContact, (LPARAM)hDbEvent);
+ pcli->pfnRemoveEvent(hContact, hDbEvent);
}
g_groupBreak = TRUE;