summaryrefslogtreecommitdiff
path: root/plugins/NoHistory
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-02-10 08:04:30 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-02-10 08:04:30 +0000
commitddba4ede6b451d0cfcd0d32b5180fbd0689966bf (patch)
tree5d74f37a7013d13b92c182628d6b68a58e148ae4 /plugins/NoHistory
parentc39340bf493a1745a41317bbf937fc7eb6cbb26a (diff)
- HANDLE hContact => HCONTACT
- GCF_* prefix was added to chat constants to avoid name conflicts git-svn-id: http://svn.miranda-ng.org/main/trunk@8078 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/NoHistory')
-rw-r--r--plugins/NoHistory/src/dllmain.cpp22
-rw-r--r--plugins/NoHistory/src/options.cpp4
2 files changed, 14 insertions, 12 deletions
diff --git a/plugins/NoHistory/src/dllmain.cpp b/plugins/NoHistory/src/dllmain.cpp
index 22c6dde6e6..49c30e0f5a 100644
--- a/plugins/NoHistory/src/dllmain.cpp
+++ b/plugins/NoHistory/src/dllmain.cpp
@@ -4,7 +4,7 @@ HINSTANCE hInst;
int hLangpack = 0;
// add icon to srmm status icons
-static void SrmmMenu_UpdateIcon(HANDLE hContact);
+static void SrmmMenu_UpdateIcon(HCONTACT hContact);
static int SrmmMenu_ProcessEvent(WPARAM wParam, LPARAM lParam);
static int SrmmMenu_ProcessIconClick(WPARAM wParam, LPARAM lParam);
@@ -20,7 +20,8 @@ CRITICAL_SECTION list_cs;
// a list of db events - we'll check them for the 'read' flag periodically and delete them whwen marked as read
struct EventListNode {
- HANDLE hContact, hDBEvent;
+ HCONTACT hContact;
+ HANDLE hDBEvent;
EventListNode *next;
};
@@ -53,7 +54,7 @@ extern "C" __declspec (dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirand
return &pluginInfo;
}
-void RemoveReadEvents(HANDLE hContact = 0)
+void RemoveReadEvents(HCONTACT hContact = 0)
{
DBEVENTINFO info = { sizeof(info) };
bool remove;
@@ -96,7 +97,7 @@ void RemoveReadEvents(HANDLE hContact = 0)
LeaveCriticalSection(&list_cs);
}
-void RemoveAllEvents(HANDLE hContact)
+void RemoveAllEvents(HCONTACT hContact)
{
HANDLE hDBEvent = db_event_first(hContact);
while(hDBEvent) {
@@ -113,7 +114,8 @@ void CALLBACK TimerProc(HWND hWnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime)
int OnDatabaseEventAdd(WPARAM wParam, LPARAM lParam)
{
- HANDLE hContact = (HANDLE)wParam, hDBEvent = (HANDLE)lParam;
+ HCONTACT hContact = (HCONTACT)wParam;
+ HANDLE hDBEvent = (HANDLE)lParam;
// history not disabled for this contact
if (db_get_b(hContact, MODULE, DBSETTING_REMOVE, 0) == 0)
@@ -139,7 +141,7 @@ int OnDatabaseEventAdd(WPARAM wParam, LPARAM lParam)
INT_PTR ServiceClear(WPARAM wParam, 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) {
- HANDLE hContact = (HANDLE)wParam;
+ HCONTACT hContact = (HCONTACT)wParam;
RemoveAllEvents(hContact);
}
@@ -148,7 +150,7 @@ INT_PTR ServiceClear(WPARAM wParam, LPARAM lParam)
int PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
{
- HANDLE hContact = (HANDLE)wParam;
+ HCONTACT hContact = (HCONTACT)wParam;
bool remove = db_get_b(hContact, MODULE, DBSETTING_REMOVE, 0) != 0;
char *proto = GetContactProto(hContact);
@@ -170,7 +172,7 @@ int PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
INT_PTR ServiceToggle(WPARAM wParam, LPARAM lParam)
{
- HANDLE hContact = (HANDLE)wParam;
+ HCONTACT hContact = (HCONTACT)wParam;
int remove = db_get_b(hContact, MODULE, DBSETTING_REMOVE, 0) != 0;
remove = !remove;
@@ -190,7 +192,7 @@ INT_PTR ServiceToggle(WPARAM wParam, LPARAM lParam)
int WindowEvent(WPARAM wParam, LPARAM lParam)
{
MessageWindowEventData *mwd = (MessageWindowEventData *)lParam;
- HANDLE hContact = mwd->hContact;
+ HCONTACT hContact = mwd->hContact;
switch(mwd->uType) {
case MSG_WINDOW_EVT_CLOSE:
@@ -216,7 +218,7 @@ int WindowEvent(WPARAM wParam, LPARAM lParam)
int IconPressed(WPARAM wParam, LPARAM lParam)
{
- HANDLE hContact = (HANDLE)wParam;
+ HCONTACT hContact = (HCONTACT)wParam;
StatusIconClickData *sicd = (StatusIconClickData *)lParam;
if (sicd->cbSize < (int)sizeof(StatusIconClickData))
return 0;
diff --git a/plugins/NoHistory/src/options.cpp b/plugins/NoHistory/src/options.cpp
index ea790bd978..14fa6d0d10 100644
--- a/plugins/NoHistory/src/options.cpp
+++ b/plugins/NoHistory/src/options.cpp
@@ -84,7 +84,7 @@ static void ResetListOptions(HWND hwndList)
static void SetAllContactIcons(HWND hwndList)
{
- for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
char *proto = GetContactProto(hContact);
bool chat_room = (proto && db_get_b(hContact, proto, "ChatRoom", 0) != 0);
@@ -198,7 +198,7 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA
case 0:
switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
- for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
char *proto = GetContactProto(hContact);
bool chat_room = (proto && db_get_b(hContact, proto, "ChatRoom", 0) != 0);