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/SimpleStatusMsg | |
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/SimpleStatusMsg')
-rw-r--r-- | plugins/SimpleStatusMsg/src/awaymsg.cpp | 22 | ||||
-rw-r--r-- | plugins/SimpleStatusMsg/src/main.cpp | 6 |
2 files changed, 14 insertions, 14 deletions
diff --git a/plugins/SimpleStatusMsg/src/awaymsg.cpp b/plugins/SimpleStatusMsg/src/awaymsg.cpp index 991384b69a..f2888d2443 100644 --- a/plugins/SimpleStatusMsg/src/awaymsg.cpp +++ b/plugins/SimpleStatusMsg/src/awaymsg.cpp @@ -79,7 +79,7 @@ static TCHAR *StrNormNewline(TCHAR *tszStr) struct AwayMsgDlgData
{
- HANDLE hContact;
+ HCONTACT hContact;
HANDLE hSeq;
HANDLE hAwayMsgEvent;
};
@@ -97,7 +97,7 @@ static INT_PTR CALLBACK ReadAwayMsgDlgProc(HWND hwndDlg, UINT message, WPARAM wP dat = (AwayMsgDlgData*)mir_alloc(sizeof(AwayMsgDlgData));
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)dat);
- dat->hContact = (HANDLE)lParam;
+ dat->hContact = (HCONTACT)lParam;
dat->hSeq = (HANDLE)CallContactService(dat->hContact, PSS_GETAWAYMSG, 0, 0);
dat->hAwayMsgEvent = dat->hSeq ? HookEventMessage(ME_PROTO_ACK, hwndDlg, HM_AWAYMSG) : NULL;
WindowList_Add(hWindowList, hwndDlg, dat->hContact);
@@ -126,7 +126,7 @@ static INT_PTR CALLBACK ReadAwayMsgDlgProc(HWND hwndDlg, UINT message, WPARAM wP SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)LoadSkinnedProtoIcon(szProto, dwStatus));
EnableWindow(GetDlgItem(hwndDlg, IDC_COPY), FALSE);
}
- Utils_RestoreWindowPosition(hwndDlg, (HANDLE)lParam, "SRAway", "AwayMsgDlg");
+ Utils_RestoreWindowPosition(hwndDlg, (HCONTACT)lParam, "SRAway", "AwayMsgDlg");
return TRUE;
case HM_AWAYMSG:
@@ -203,7 +203,7 @@ static INT_PTR CALLBACK ReadAwayMsgDlgProc(HWND hwndDlg, UINT message, WPARAM wP static INT_PTR GetMessageCommand(WPARAM wParam, LPARAM)
{
- if (HWND hwnd = WindowList_Find(hWindowList, (HANDLE)wParam))
+ if (HWND hwnd = WindowList_Find(hWindowList, (HCONTACT)wParam))
{
SetForegroundWindow(hwnd);
SetFocus(hwnd);
@@ -227,7 +227,7 @@ static INT_PTR CALLBACK CopyAwayMsgDlgProc(HWND hwndDlg, UINT message, WPARAM wP dat = (AwayMsgDlgData*)mir_alloc(sizeof(AwayMsgDlgData));
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)dat);
- dat->hContact = (HANDLE)lParam;
+ dat->hContact = (HCONTACT)lParam;
dat->hSeq = (HANDLE)CallContactService(dat->hContact, PSS_GETAWAYMSG, 0, 0);
dat->hAwayMsgEvent = dat->hSeq ? HookEventMessage(ME_PROTO_ACK, hwndDlg, HM_AWAYMSG) : NULL;
WindowList_Add(hWindowList2, hwndDlg, dat->hContact);
@@ -301,7 +301,7 @@ static INT_PTR CALLBACK CopyAwayMsgDlgProc(HWND hwndDlg, UINT message, WPARAM wP static INT_PTR CopyAwayMsgCommand(WPARAM wParam, LPARAM)
{
- if (HWND hwnd = WindowList_Find(hWindowList2, (HANDLE)wParam))
+ if (HWND hwnd = WindowList_Find(hWindowList2, (HCONTACT)wParam))
{
SetForegroundWindow(hwnd);
SetFocus(hwnd);
@@ -330,7 +330,7 @@ static char *StrFindURL(char *pszStr) static INT_PTR GoToURLMsgCommand(WPARAM wParam, LPARAM lParam)
{
- ptrA szMsg(db_get_sa((HANDLE)wParam, "CList", "StatusMsg"));
+ ptrA szMsg(db_get_sa((HCONTACT)wParam, "CList", "StatusMsg"));
char *szURL = StrFindURL(szMsg);
if (szURL != NULL)
@@ -354,8 +354,8 @@ static INT_PTR GoToURLMsgCommand(WPARAM wParam, LPARAM lParam) static int AwayMsgPreBuildMenu(WPARAM wParam, LPARAM lParam)
{
TCHAR str[128];
- char *szProto = GetContactProto((HANDLE)wParam);
- int iHidden = szProto ? db_get_b((HANDLE)wParam, szProto, "ChatRoom", 0) : 0;
+ char *szProto = GetContactProto((HCONTACT)wParam);
+ int iHidden = szProto ? db_get_b((HCONTACT)wParam, szProto, "ChatRoom", 0) : 0;
int iStatus;
CLISTMENUITEM clmi = { sizeof(clmi) };
@@ -363,7 +363,7 @@ static int AwayMsgPreBuildMenu(WPARAM wParam, LPARAM lParam) clmi.flags = CMIM_FLAGS | CMIF_HIDDEN | CMIF_TCHAR;
if (!iHidden) {
iHidden = 1;
- iStatus = db_get_w((HANDLE)wParam, szProto, "Status", ID_STATUS_OFFLINE);
+ iStatus = db_get_w((HCONTACT)wParam, szProto, "Status", ID_STATUS_OFFLINE);
if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1,0) & PF1_MODEMSGRECV) {
if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_3,0) & Proto_Status2Flag(iStatus == ID_STATUS_OFFLINE ? ID_STATUS_INVISIBLE : iStatus)) {
iHidden = 0;
@@ -377,7 +377,7 @@ static int AwayMsgPreBuildMenu(WPARAM wParam, LPARAM lParam) Menu_ModifyItem(hAwayMsgMenuItem, &clmi);
Skin_ReleaseIcon(clmi.hIcon);
- ptrA szMsg(db_get_sa((HANDLE)wParam, "CList", "StatusMsg"));
+ ptrA szMsg(db_get_sa((HCONTACT)wParam, "CList", "StatusMsg"));
clmi.flags = CMIM_FLAGS | CMIF_HIDDEN | CMIF_TCHAR;
if (!iHidden && szMsg != NULL) {
diff --git a/plugins/SimpleStatusMsg/src/main.cpp b/plugins/SimpleStatusMsg/src/main.cpp index fc120c6acb..8494ad66d6 100644 --- a/plugins/SimpleStatusMsg/src/main.cpp +++ b/plugins/SimpleStatusMsg/src/main.cpp @@ -384,7 +384,7 @@ TCHAR *InsertBuiltinVarsIntoMsg(TCHAR *in, const char *szProto, int status) return msg;
}
-TCHAR *InsertVarsIntoMsg(TCHAR *tszMsg, const char *szProto, int iStatus, HANDLE hContact)
+TCHAR *InsertVarsIntoMsg(TCHAR *tszMsg, const char *szProto, int iStatus, HCONTACT hContact)
{
if (ServiceExists(MS_VARS_FORMATSTRING) && db_get_b(NULL, "SimpleStatusMsg", "EnableVariables", 1))
{
@@ -523,7 +523,7 @@ void SaveStatusAsCurrent(const char *szProto, int iStatus) db_set_w(NULL, "SimpleStatusMsg", szSetting, (WORD)iStatus);
}
-static TCHAR *GetAwayMessage(int iStatus, const char *szProto, BOOL bInsertVars, HANDLE hContact)
+static TCHAR *GetAwayMessage(int iStatus, const char *szProto, BOOL bInsertVars, HCONTACT hContact)
{
TCHAR *format = NULL;
char szSetting[80];
@@ -1775,7 +1775,7 @@ static int OnICQStatusMsgRequest(WPARAM wParam, LPARAM lParam, LPARAM lMirParam) char *szProto = (char *)lMirParam;
BOOL bContactFound = FALSE;
- HANDLE hContact;
+ HCONTACT hContact;
for (hContact = db_find_first(szProto); hContact; hContact = db_find_next(hContact, szProto)) {
if (db_get_dw(hContact, szProto, "UIN", 0) == (DWORD)lParam) {
|