From 1925d3521846f4e6683d3d537cc41de9c9bd7250 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 11 Feb 2014 19:01:03 +0000 Subject: "we don't need these variables" (c) Pink Floyd git-svn-id: http://svn.miranda-ng.org/main/trunk@8101 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/NoHistory/src/dllmain.cpp | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'plugins/NoHistory/src') diff --git a/plugins/NoHistory/src/dllmain.cpp b/plugins/NoHistory/src/dllmain.cpp index 7258e4962e..6b13f688ea 100644 --- a/plugins/NoHistory/src/dllmain.cpp +++ b/plugins/NoHistory/src/dllmain.cpp @@ -112,9 +112,8 @@ void CALLBACK TimerProc(HWND hWnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime) RemoveReadEvents(); } -int OnDatabaseEventAdd(WPARAM wParam, LPARAM lParam) +int OnDatabaseEventAdd(WPARAM hContact, LPARAM lParam) { - MCONTACT hContact = wParam; HANDLE hDBEvent = (HANDLE)lParam; // history not disabled for this contact @@ -138,20 +137,16 @@ int OnDatabaseEventAdd(WPARAM wParam, LPARAM lParam) return 0; } -INT_PTR ServiceClear(WPARAM wParam, LPARAM lParam) +INT_PTR ServiceClear(WPARAM hContact, LPARAM lParam) { - if (MessageBox(0, TranslateT("This operation will PERMANENTLY REMOVE all history for this contact.\nAre you sure you want to do this?"), TranslateT("Clear History"), MB_YESNO | MB_ICONWARNING) == IDYES) { - MCONTACT hContact = wParam; + if (MessageBox(0, TranslateT("This operation will PERMANENTLY REMOVE all history for this contact.\nAre you sure you want to do this?"), TranslateT("Clear History"), MB_YESNO | MB_ICONWARNING) == IDYES) RemoveAllEvents(hContact); - } return 0; } -int PrebuildContactMenu(WPARAM wParam, LPARAM lParam) +int PrebuildContactMenu(WPARAM hContact, LPARAM lParam) { - MCONTACT hContact = wParam; - bool remove = db_get_b(hContact, MODULE, DBSETTING_REMOVE, 0) != 0; char *proto = GetContactProto(hContact); bool chat_room = (proto && db_get_b(hContact, proto, "ChatRoom", 0) != 0); @@ -170,10 +165,8 @@ int PrebuildContactMenu(WPARAM wParam, LPARAM lParam) return 0; } -INT_PTR ServiceToggle(WPARAM wParam, LPARAM lParam) +INT_PTR ServiceToggle(WPARAM hContact, LPARAM lParam) { - MCONTACT hContact = wParam; - int remove = db_get_b(hContact, MODULE, DBSETTING_REMOVE, 0) != 0; remove = !remove; db_set_b(hContact, MODULE, DBSETTING_REMOVE, remove != 0); @@ -216,9 +209,8 @@ int WindowEvent(WPARAM wParam, LPARAM lParam) return 0; } -int IconPressed(WPARAM wParam, LPARAM lParam) +int IconPressed(WPARAM hContact, LPARAM lParam) { - MCONTACT hContact = wParam; StatusIconClickData *sicd = (StatusIconClickData *)lParam; if (sicd->cbSize < (int)sizeof(StatusIconClickData)) return 0; -- cgit v1.2.3