diff options
author | George Hazan <george.hazan@gmail.com> | 2014-02-10 08:04:30 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-02-10 08:04:30 +0000 |
commit | ddba4ede6b451d0cfcd0d32b5180fbd0689966bf (patch) | |
tree | 5d74f37a7013d13b92c182628d6b68a58e148ae4 /plugins/YARelay | |
parent | c39340bf493a1745a41317bbf937fc7eb6cbb26a (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/YARelay')
-rw-r--r-- | plugins/YARelay/src/main.cpp | 11 | ||||
-rw-r--r-- | plugins/YARelay/src/options.cpp | 6 | ||||
-rw-r--r-- | plugins/YARelay/src/stdafx.h | 2 |
3 files changed, 10 insertions, 9 deletions
diff --git a/plugins/YARelay/src/main.cpp b/plugins/YARelay/src/main.cpp index 34cf80857a..6eee2d60eb 100644 --- a/plugins/YARelay/src/main.cpp +++ b/plugins/YARelay/src/main.cpp @@ -25,7 +25,7 @@ CLIST_INTERFACE *pcli; HINSTANCE hInst;
int hLangpack;
-HANDLE hForwardFrom, hForwardTo;
+HCONTACT hForwardFrom, hForwardTo;
TCHAR tszForwardTemplate[MAXTEMPLATESIZE];
int iSplit, iSplitMaxSize, iSendParts, iMarkRead, iSendAndHistory, iForwardOnStatus;
@@ -89,7 +89,8 @@ int ProtoAck(WPARAM wparam,LPARAM lparam) */
static int MessageEventAdded(WPARAM wParam, LPARAM lParam)
{
- HANDLE hContact = (HANDLE)wParam, hDBEvent = (HANDLE)lParam;
+ HCONTACT hContact = (HCONTACT)wParam;
+ HANDLE hDBEvent = (HANDLE)lParam;
// is the message sender accepted for forwarding
if (hForwardFrom != 0 && hForwardFrom != hContact)
@@ -209,7 +210,7 @@ static int MessageEventAdded(WPARAM wParam, LPARAM lParam) strncpy(szMsgPart, szBuf, cbPortion);
szMsgPart[cbPortion] = 0;
- HANDLE hMsgProc = (HANDLE)CallContactService((HANDLE)hForwardTo, PSS_MESSAGE, PREF_UTF, (LPARAM)szMsgPart);
+ HANDLE hMsgProc = (HANDLE)CallContactService(hForwardTo, PSS_MESSAGE, PREF_UTF, (LPARAM)szMsgPart);
MESSAGE_PROC* msgProc = (MESSAGE_PROC*)mir_alloc(sizeof(MESSAGE_PROC));
msgProc->hProcess = hMsgProc;
@@ -235,8 +236,8 @@ extern "C" int __declspec(dllexport) Load() mir_getCLI();
// Load plugin options from DB
- hForwardFrom = (HANDLE)db_get_dw(NULL, "yaRelay", "ForwardFrom", 0);
- hForwardTo = (HANDLE)db_get_dw(NULL, "yaRelay", "ForwardTo", 0);
+ hForwardFrom = (HCONTACT)db_get_dw(NULL, "yaRelay", "ForwardFrom", 0);
+ hForwardTo = (HCONTACT)db_get_dw(NULL, "yaRelay", "ForwardTo", 0);
iForwardOnStatus = db_get_dw(NULL, "yaRelay", "ForwardOnStatus", STATUS_OFFLINE | STATUS_AWAY | STATUS_NA);
diff --git a/plugins/YARelay/src/options.cpp b/plugins/YARelay/src/options.cpp index 4d96a1ca49..eafc4f93b1 100644 --- a/plugins/YARelay/src/options.cpp +++ b/plugins/YARelay/src/options.cpp @@ -50,7 +50,7 @@ static void OptionsFrameEnableControls(HWND hwndDlg) */
static INT_PTR CALLBACK OptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
- HANDLE hContact;
+ HCONTACT hContact;
int idx;
switch (uMsg) {
case WM_INITDIALOG:
@@ -144,9 +144,9 @@ static INT_PTR CALLBACK OptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, if (SendMessage(GetDlgItem(hwndDlg, IDC_RADIO_ALL), BM_GETCHECK, 0, 0) == BST_CHECKED)
hForwardFrom = 0;
else
- hForwardFrom = (HANDLE)SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_FROM), CB_GETITEMDATA, SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_FROM), CB_GETCURSEL, 0, 0), 0);
+ hForwardFrom = (HCONTACT)SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_FROM), CB_GETITEMDATA, SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_FROM), CB_GETCURSEL, 0, 0), 0);
- hForwardTo = (HANDLE)SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_TO), CB_GETITEMDATA, SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_TO), CB_GETCURSEL, 0, 0), 0);
+ hForwardTo = (HCONTACT)SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_TO), CB_GETITEMDATA, SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_TO), CB_GETCURSEL, 0, 0), 0);
iForwardOnStatus = 0;
if (SendMessage(GetDlgItem(hwndDlg, IDC_CHECK1), BM_GETCHECK, 0, 0) == BST_CHECKED) iForwardOnStatus |= STATUS_OFFLINE;
if (SendMessage(GetDlgItem(hwndDlg, IDC_CHECK2), BM_GETCHECK, 0, 0) == BST_CHECKED) iForwardOnStatus |= STATUS_ONLINE;
diff --git a/plugins/YARelay/src/stdafx.h b/plugins/YARelay/src/stdafx.h index cc74ee704e..248f7fe5f1 100644 --- a/plugins/YARelay/src/stdafx.h +++ b/plugins/YARelay/src/stdafx.h @@ -48,7 +48,7 @@ Features: extern HINSTANCE hInst;
-extern HANDLE hForwardFrom, hForwardTo;
+extern HCONTACT hForwardFrom, hForwardTo;
extern TCHAR tszForwardTemplate[MAXTEMPLATESIZE];
extern int iSplit, iSplitMaxSize, iSendParts, iMarkRead, iSendAndHistory, iForwardOnStatus;
|