summaryrefslogtreecommitdiff
path: root/src/mir_app
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 /src/mir_app
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 'src/mir_app')
-rw-r--r--src/mir_app/src/chat_clist.cpp12
-rw-r--r--src/mir_app/src/chat_tools.cpp4
-rw-r--r--src/mir_app/src/clistevents.cpp9
3 files changed, 8 insertions, 17 deletions
diff --git a/src/mir_app/src/chat_clist.cpp b/src/mir_app/src/chat_clist.cpp
index 267fca44d5..62c313c8b2 100644
--- a/src/mir_app/src/chat_clist.cpp
+++ b/src/mir_app/src/chat_clist.cpp
@@ -121,7 +121,7 @@ int RoomDoubleclicked(WPARAM hContact, LPARAM)
// is the "toggle visibility option set, so we need to close the window?
if (si->hWnd != NULL &&
db_get_b(NULL, CHAT_MODULE, "ToggleVisibility", 0) == 1 &&
- !CallService(MS_CLIST_GETEVENT, hContact, 0) &&
+ !cli.pfnGetEvent(hContact, 0) &&
IsWindowVisible(si->hWnd) && !IsIconic(si->hWnd))
{
if (chatApi.OnDblClickSession)
@@ -220,13 +220,13 @@ BOOL AddEvent(MCONTACT hContact, HICON hIcon, MEVENT hEvent, int type, TCHAR* fm
cle.pszService = "GChat/DblClickEvent" ;
cle.ptszTooltip = TranslateTS(szBuf);
if (type) {
- if (!CallService(MS_CLIST_GETEVENT, hContact, 0))
- CallService(MS_CLIST_ADDEVENT, hContact, (LPARAM)&cle);
+ if (!cli.pfnGetEvent(hContact, 0))
+ cli.pfnAddEvent(&cle);
}
else {
- if (CallService(MS_CLIST_GETEVENT, hContact, 0))
- CallService(MS_CLIST_REMOVEEVENT, hContact, (LPARAM)GC_FAKE_EVENT);
- CallService(MS_CLIST_ADDEVENT, hContact, (LPARAM)&cle);
+ if (cli.pfnGetEvent(hContact, 0))
+ cli.pfnRemoveEvent(hContact, GC_FAKE_EVENT);
+ cli.pfnAddEvent(&cle);
}
return TRUE;
}
diff --git a/src/mir_app/src/chat_tools.cpp b/src/mir_app/src/chat_tools.cpp
index 5d8e7c7dfa..2497dabec7 100644
--- a/src/mir_app/src/chat_tools.cpp
+++ b/src/mir_app/src/chat_tools.cpp
@@ -151,8 +151,8 @@ static LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPA
case WM_CONTEXTMENU:
SESSION_INFO *si = (SESSION_INFO*)PUGetPluginData(hWnd);
if (si->hContact)
- if (CallService(MS_CLIST_GETEVENT, (WPARAM)si->hContact, 0))
- CallService(MS_CLIST_REMOVEEVENT, (WPARAM)si->hContact, (LPARAM)GC_FAKE_EVENT);
+ if (cli.pfnGetEvent(si->hContact, 0))
+ cli.pfnRemoveEvent(si->hContact, GC_FAKE_EVENT);
if (si->hWnd && KillTimer(si->hWnd, TIMERID_FLASHWND))
FlashWindow(si->hWnd, FALSE);
diff --git a/src/mir_app/src/clistevents.cpp b/src/mir_app/src/clistevents.cpp
index 2d7e90aaa2..7ed8ef4485 100644
--- a/src/mir_app/src/clistevents.cpp
+++ b/src/mir_app/src/clistevents.cpp
@@ -376,11 +376,6 @@ static int CListEventSettingsChanged(WPARAM hContact, LPARAM lParam)
/***************************************************************************************/
-INT_PTR AddEventSyncStub(WPARAM wParam, LPARAM lParam) { return CallServiceSync(MS_CLIST_ADDEVENT"_SYNC", wParam, lParam); }
-INT_PTR AddEventStub(WPARAM, LPARAM lParam) { return cli.pfnAddEvent((CLISTEVENT*)lParam) == NULL; }
-INT_PTR RemoveEventStub(WPARAM wParam, LPARAM lParam) { return cli.pfnRemoveEvent(wParam, lParam); }
-INT_PTR GetEventStub(WPARAM wParam, LPARAM lParam) { return (INT_PTR)cli.pfnGetEvent(wParam, (int)lParam); }
-
int InitCListEvents(void)
{
memset(&cli.events, 0, sizeof(cli.events));
@@ -388,10 +383,6 @@ int InitCListEvents(void)
disableTrayFlash = db_get_b(NULL, "CList", "DisableTrayFlash", 0);
disableIconFlash = db_get_b(NULL, "CList", "NoIconBlink", 0);
- CreateServiceFunction(MS_CLIST_ADDEVENT, AddEventSyncStub); //need to be called through sync to keep flash timer workable
- CreateServiceFunction(MS_CLIST_ADDEVENT"_SYNC", AddEventStub);
- CreateServiceFunction(MS_CLIST_REMOVEEVENT, RemoveEventStub);
- CreateServiceFunction(MS_CLIST_GETEVENT, GetEventStub);
HookEvent(ME_DB_CONTACT_DELETED, RemoveEventsForContact);
HookEvent(ME_DB_CONTACT_SETTINGCHANGED, CListEventSettingsChanged);
return 0;