From bb5aff746c50564ded61159c5ae28e6218d0a49d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 28 Jan 2016 16:04:16 +0000 Subject: 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 --- src/mir_app/src/chat_clist.cpp | 12 ++++++------ src/mir_app/src/chat_tools.cpp | 4 ++-- src/mir_app/src/clistevents.cpp | 9 --------- 3 files changed, 8 insertions(+), 17 deletions(-) (limited to 'src/mir_app') 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; -- cgit v1.2.3