diff options
Diffstat (limited to 'plugins/NewXstatusNotify')
-rw-r--r-- | plugins/NewXstatusNotify/src/common.h | 4 | ||||
-rw-r--r-- | plugins/NewXstatusNotify/src/indsnd.cpp | 240 | ||||
-rw-r--r-- | plugins/NewXstatusNotify/src/main.cpp | 22 | ||||
-rw-r--r-- | plugins/NewXstatusNotify/src/popup.cpp | 6 | ||||
-rw-r--r-- | plugins/NewXstatusNotify/src/utils.cpp | 2 | ||||
-rw-r--r-- | plugins/NewXstatusNotify/src/utils.h | 2 | ||||
-rw-r--r-- | plugins/NewXstatusNotify/src/xstatus.cpp | 12 | ||||
-rw-r--r-- | plugins/NewXstatusNotify/src/xstatus.h | 6 |
8 files changed, 130 insertions, 164 deletions
diff --git a/plugins/NewXstatusNotify/src/common.h b/plugins/NewXstatusNotify/src/common.h index a779892e40..3e56ed0fb0 100644 --- a/plugins/NewXstatusNotify/src/common.h +++ b/plugins/NewXstatusNotify/src/common.h @@ -122,7 +122,7 @@ typedef struct tagPLUGINDATA } PLUGINDATA;
typedef struct {
- HANDLE hContact;
+ HCONTACT hContact;
TCHAR *cust;
TCHAR *oldstatusmsg;
TCHAR *newstatusmsg;
@@ -131,7 +131,7 @@ typedef struct { } STATUSMSGINFO;
/*
-HANDLE hContact = (HANDLE)wParam;
+HCONTACT hContact = (HCONTACT)wParam;
WORD oldStatus = LOWORD(lParam);
WORD newStatus = HIWORD(lParam);
oldStatus is the status the contact was before the change.
diff --git a/plugins/NewXstatusNotify/src/indsnd.cpp b/plugins/NewXstatusNotify/src/indsnd.cpp index 88754c3a99..c21bb6f940 100644 --- a/plugins/NewXstatusNotify/src/indsnd.cpp +++ b/plugins/NewXstatusNotify/src/indsnd.cpp @@ -107,24 +107,23 @@ HIMAGELIST GetStatusIconsImgList(char *szProto) INT_PTR CALLBACK DlgProcSoundUIPage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- static HANDLE hContact = NULL;
- switch (msg)
- {
- case WM_INITDIALOG:
- {
- TranslateDialogDefault(hwndDlg);
+ static HCONTACT hContact = NULL;
+ HWND hList = GetDlgItem(hwndDlg, IDC_INDSNDLIST);
- hContact = (HANDLE)lParam;
+ switch (msg) {
+ case WM_INITDIALOG:
+ TranslateDialogDefault(hwndDlg);
+ {
+ hContact = (HCONTACT)lParam;
char *szProto = GetContactProto(hContact);
- HWND hList = GetDlgItem(hwndDlg, IDC_INDSNDLIST);
-
+
ListView_SetImageList(hList, GetStatusIconsImgList(szProto), LVSIL_SMALL);
ListView_SetExtendedListViewStyleEx(hList, LVS_EX_FULLROWSELECT | LVS_EX_INFOTIP, LVS_EX_FULLROWSELECT | LVS_EX_INFOTIP);
- RECT rc = {0};
+ RECT rc = { 0 };
GetClientRect(hList, &rc);
- LV_COLUMN lvc = {0};
+ LV_COLUMN lvc = { 0 };
lvc.mask = LVCF_WIDTH | LVCF_TEXT;
lvc.cx = STATUS_COLUMN;
lvc.pszText = TranslateT("Status");
@@ -134,20 +133,17 @@ INT_PTR CALLBACK DlgProcSoundUIPage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA lvc.pszText = TranslateT("Sound for the status");
ListView_InsertColumn(hList, 1, &lvc);
- if (szProto)
- {
+ if (szProto) {
DBVARIANT dbv;
TCHAR buff[MAX_PATH];
- for (int i = ID_STATUS_MAX; i >= ID_STATUS_MIN; i--)
- {
+ for (int i = ID_STATUS_MAX; i >= ID_STATUS_MIN; i--) {
int flags = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_2, 0);
- if (flags == 0)
- flags = PF2_ONLINE|PF2_INVISIBLE|PF2_SHORTAWAY|PF2_LONGAWAY|PF2_LIGHTDND|PF2_HEAVYDND|PF2_FREECHAT|PF2_OUTTOLUNCH|PF2_ONTHEPHONE;
-
- if ((flags & Proto_Status2Flag(i)) || i == ID_STATUS_OFFLINE)
- {
- LV_ITEM lvi = {0};
+ if (flags == 0)
+ flags = PF2_ONLINE | PF2_INVISIBLE | PF2_SHORTAWAY | PF2_LONGAWAY | PF2_LIGHTDND | PF2_HEAVYDND | PF2_FREECHAT | PF2_OUTTOLUNCH | PF2_ONTHEPHONE;
+
+ if ((flags & Proto_Status2Flag(i)) || i == ID_STATUS_OFFLINE) {
+ LV_ITEM lvi = { 0 };
lvi.mask = LVIF_TEXT | LVIF_PARAM | LVIF_IMAGE;
lvi.iItem = 0;
lvi.iSubItem = 0;
@@ -156,8 +152,7 @@ INT_PTR CALLBACK DlgProcSoundUIPage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA lvi.pszText = TranslateTS(StatusList[Index(i)].lpzStandardText);
lvi.iItem = ListView_InsertItem(hList, &lvi);
- if (!db_get_ts(hContact, MODULE, StatusList[Index(i)].lpzSkinSoundName, &dbv))
- {
+ if (!db_get_ts(hContact, MODULE, StatusList[Index(i)].lpzSkinSoundName, &dbv)) {
_tcscpy(buff, dbv.ptszVal);
db_free(&dbv);
}
@@ -168,7 +163,7 @@ INT_PTR CALLBACK DlgProcSoundUIPage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA }
}
- LV_ITEM lvi = {0};
+ LV_ITEM lvi = { 0 };
lvi.mask = LVIF_TEXT | LVIF_PARAM | LVIF_IMAGE;
lvi.iItem = 0;
lvi.iSubItem = 0;
@@ -177,148 +172,119 @@ INT_PTR CALLBACK DlgProcSoundUIPage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA lvi.pszText = TranslateT("From offline");
lvi.iItem = ListView_InsertItem(hList, &lvi);
- if (!db_get_ts(hContact, MODULE, "UserFromOffline", &dbv))
- {
+ if (!db_get_ts(hContact, MODULE, "UserFromOffline", &dbv)) {
_tcscpy(buff, dbv.ptszVal);
db_free(&dbv);
}
- else
- _tcscpy(buff, TranslateT(DEFAULT_SOUND));
+ else _tcscpy(buff, TranslateT(DEFAULT_SOUND));
ListView_SetItemText(hList, lvi.iItem, 1, buff);
}
CheckDlgButton(hwndDlg, IDC_CHECK_NOTIFYSOUNDS, db_get_b(hContact, MODULE, "EnableSounds", 1));
- CheckDlgButton(hwndDlg, IDC_CHECK_NOTIFYPOPUPS, db_get_b(hContact, MODULE, "EnablePopups", 1));
-
+ CheckDlgButton(hwndDlg, IDC_CHECK_NOTIFYPOPUPS, db_get_b(hContact, MODULE, "EnablePopups", 1));
+
ShowWindow(GetDlgItem(hwndDlg, IDC_INDSNDLIST), opt.UseIndSnd ? SW_SHOW : SW_HIDE);
ShowWindow(GetDlgItem(hwndDlg, IDC_TEXT_ENABLE_IS), opt.UseIndSnd ? SW_HIDE : SW_SHOW);
ShowWindow(GetDlgItem(hwndDlg, IDC_CHANGE), opt.UseIndSnd ? SW_SHOW : SW_HIDE);
ShowWindow(GetDlgItem(hwndDlg, IDC_PREVIEW), opt.UseIndSnd ? SW_SHOW : SW_HIDE);
ShowWindow(GetDlgItem(hwndDlg, IDC_DELETE), opt.UseIndSnd ? SW_SHOW : SW_HIDE);
-
- return TRUE;
}
- case WM_COMMAND:
- {
- switch (LOWORD(wParam))
+ return TRUE;
+
+ case WM_COMMAND:
+ switch (LOWORD(wParam)) {
+ case IDC_PREVIEW:
+ if (ListView_GetSelectionMark(hList) != -1)
+ PreviewSound(hList);
+ break;
+
+ case IDC_CHANGE:
{
- case IDC_PREVIEW:
- {
- HWND hList = GetDlgItem(hwndDlg, IDC_INDSNDLIST);
- if (ListView_GetSelectionMark(hList) != -1)
- PreviewSound(hList);
- break;
- }
- case IDC_CHANGE:
- {
- HWND hList = GetDlgItem(hwndDlg, IDC_INDSNDLIST);
- int iSel = ListView_GetNextItem(GetDlgItem(hwndDlg, IDC_INDSNDLIST), -1, LVNI_SELECTED);
- if (iSel != -1)
- {
- TCHAR stzFilePath[MAX_PATH];
- if (SelectSound(hwndDlg, stzFilePath) != NULL)
- {
- iSel = -1;
- while ((iSel = ListView_GetNextItem(hList, iSel, LVNI_SELECTED)) != -1)
- ListView_SetItemText(hList, iSel, 1, stzFilePath);
+ int iSel = ListView_GetNextItem(GetDlgItem(hwndDlg, IDC_INDSNDLIST), -1, LVNI_SELECTED);
+ if (iSel != -1) {
+ TCHAR stzFilePath[MAX_PATH];
+ if (SelectSound(hwndDlg, stzFilePath) != NULL) {
+ iSel = -1;
+ while ((iSel = ListView_GetNextItem(hList, iSel, LVNI_SELECTED)) != -1)
+ ListView_SetItemText(hList, iSel, 1, stzFilePath);
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- }
- }
- break;
- }
- case IDC_DELETE:
- {
- HWND hList = GetDlgItem(hwndDlg, IDC_INDSNDLIST);
- if (ListView_GetSelectionMark(hList) != -1)
- {
- if (RemoveSoundFromList(GetDlgItem(hwndDlg, IDC_INDSNDLIST)))
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
}
- break;
- }
- case IDC_CHECK_NOTIFYSOUNDS:
- {
- db_set_b(hContact, MODULE, "EnableSounds", IsDlgButtonChecked(hwndDlg, IDC_CHECK_NOTIFYSOUNDS) ? 1 : 0);
- break;
}
- case IDC_CHECK_NOTIFYPOPUPS:
- {
- db_set_b(hContact, MODULE, "EnablePopups", IsDlgButtonChecked(hwndDlg, IDC_CHECK_NOTIFYPOPUPS) ? 1 : 0);
- break;
- }
- }
+ }
+ break;
+ case IDC_DELETE:
+ if (ListView_GetSelectionMark(hList) != -1)
+ if (RemoveSoundFromList(GetDlgItem(hwndDlg, IDC_INDSNDLIST)))
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ break;
+
+ case IDC_CHECK_NOTIFYSOUNDS:
+ db_set_b(hContact, MODULE, "EnableSounds", IsDlgButtonChecked(hwndDlg, IDC_CHECK_NOTIFYSOUNDS) ? 1 : 0);
+ break;
+
+ case IDC_CHECK_NOTIFYPOPUPS:
+ db_set_b(hContact, MODULE, "EnablePopups", IsDlgButtonChecked(hwndDlg, IDC_CHECK_NOTIFYPOPUPS) ? 1 : 0);
break;
}
- case WM_NOTIFY:
- {
- LPNMHDR pParam = (LPNMHDR)lParam;
- if (pParam->code == PSN_APPLY)
- {
- TCHAR buff[MAX_PATH];
- HWND hList = GetDlgItem(hwndDlg, IDC_INDSNDLIST);
+ break;
- LVITEM lvi = {0};
- lvi.mask = LVIF_PARAM;
- //Cycle through the list reading the text associated to each status.
- for (lvi.iItem = ListView_GetItemCount(hList) - 1; lvi.iItem >= 0; lvi.iItem--)
- {
- ListView_GetItem(hList, &lvi);
- ListView_GetItemText(hList, lvi.iItem, 1, buff, SIZEOF(buff));
+ case WM_NOTIFY:
+ if (((LPNMHDR)lParam)->code == PSN_APPLY) {
+ TCHAR buff[MAX_PATH];
+ HWND hList = GetDlgItem(hwndDlg, IDC_INDSNDLIST);
- if (!_tcscmp(buff, TranslateT(DEFAULT_SOUND)))
- {
- if (lvi.lParam == ID_STATUS_FROMOFFLINE)
- db_unset(hContact, MODULE, "UserFromOffline");
- else
- db_unset(hContact, MODULE, StatusList[Index(lvi.lParam)].lpzSkinSoundName);
- }
- else
- {
- TCHAR stzSoundPath[MAX_PATH] = { 0 };
- PathToRelativeT(buff, stzSoundPath);
- if (lvi.lParam == ID_STATUS_FROMOFFLINE)
- db_set_ws(hContact, MODULE, "UserFromOffline", stzSoundPath);
- else
- db_set_ws(hContact, MODULE, StatusList[Index(lvi.lParam)].lpzSkinSoundName, stzSoundPath);
- }
+ LVITEM lvi = { 0 };
+ lvi.mask = LVIF_PARAM;
+ //Cycle through the list reading the text associated to each status.
+ for (lvi.iItem = ListView_GetItemCount(hList) - 1; lvi.iItem >= 0; lvi.iItem--) {
+ ListView_GetItem(hList, &lvi);
+ ListView_GetItemText(hList, lvi.iItem, 1, buff, SIZEOF(buff));
+
+ if (!_tcscmp(buff, TranslateT(DEFAULT_SOUND))) {
+ if (lvi.lParam == ID_STATUS_FROMOFFLINE)
+ db_unset(hContact, MODULE, "UserFromOffline");
+ else
+ db_unset(hContact, MODULE, StatusList[Index(lvi.lParam)].lpzSkinSoundName);
+ }
+ else {
+ TCHAR stzSoundPath[MAX_PATH] = { 0 };
+ PathToRelativeT(buff, stzSoundPath);
+ if (lvi.lParam == ID_STATUS_FROMOFFLINE)
+ db_set_ws(hContact, MODULE, "UserFromOffline", stzSoundPath);
+ else
+ db_set_ws(hContact, MODULE, StatusList[Index(lvi.lParam)].lpzSkinSoundName, stzSoundPath);
}
-
- return TRUE;
}
- int hlpControlID = (int)wParam;
- switch (hlpControlID)
- {
- case IDC_INDSNDLIST:
- {
- if (pParam->code == NM_DBLCLK)
- {
- TCHAR stzFilePath[MAX_PATH];
- if (SelectSound(hwndDlg, stzFilePath) != NULL)
- {
- int iSel = -1;
- HWND hList = GetDlgItem(hwndDlg, IDC_INDSNDLIST);
- while ((iSel = ListView_GetNextItem(hList, iSel, LVNI_SELECTED)) != -1)
- ListView_SetItemText(hList, iSel, 1, stzFilePath);
+ return TRUE;
+ }
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- }
- return TRUE;
- }
- else if (pParam->code == LVN_KEYDOWN)
- {
- LPNMLVKEYDOWN pnkd = (LPNMLVKEYDOWN)lParam;
- if (pnkd->wVKey == VK_DELETE)
- RemoveSoundFromList(GetDlgItem(hwndDlg, IDC_INDSNDLIST));
- }
+ int hlpControlID = (int)wParam;
+ switch (hlpControlID) {
+ case IDC_INDSNDLIST:
+ if (((LPNMHDR)lParam)->code == NM_DBLCLK) {
+ TCHAR stzFilePath[MAX_PATH];
+ if (SelectSound(hwndDlg, stzFilePath) != NULL) {
+ int iSel = -1;
+ HWND hList = GetDlgItem(hwndDlg, IDC_INDSNDLIST);
+ while ((iSel = ListView_GetNextItem(hList, iSel, LVNI_SELECTED)) != -1)
+ ListView_SetItemText(hList, iSel, 1, stzFilePath);
- break;
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
}
+ return TRUE;
+ }
+ else if (((LPNMHDR)lParam)->code == LVN_KEYDOWN) {
+ LPNMLVKEYDOWN pnkd = (LPNMLVKEYDOWN)lParam;
+ if (pnkd->wVKey == VK_DELETE)
+ RemoveSoundFromList(GetDlgItem(hwndDlg, IDC_INDSNDLIST));
}
+
break;
}
+ break;
}
return FALSE;
}
@@ -365,7 +331,7 @@ void SetAllContactsIcons(HWND hwndList) {
BYTE EnableSounds, EnablePopups, EnableXStatus, EnableLogging;
- for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem) {
char *szProto = GetContactProto(hContact);
@@ -604,7 +570,7 @@ INT_PTR CALLBACK DlgProcFiltering(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM 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)) {
HANDLE hItem = (HANDLE)SendMessage(hList, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem) {
if (GetExtraImage(hList, hItem, EXTRA_IMAGE_SOUND) == EXTRA_IMAGE_SOUND)
diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp index 3c01e6802a..5616832ce7 100644 --- a/plugins/NewXstatusNotify/src/main.cpp +++ b/plugins/NewXstatusNotify/src/main.cpp @@ -60,7 +60,7 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD miranda extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = {MIID_USERONLINE, MIID_LAST};
-BYTE GetGender(HANDLE hContact)
+BYTE GetGender(HCONTACT hContact)
{
char *szProto =GetContactProto(hContact);
if (szProto) {
@@ -84,7 +84,7 @@ HANDLE GetIconHandle(char *szIcon) return Skin_GetIconHandle(szSettingName);
}
-bool IsNewExtraStatus(HANDLE hContact, char *szSetting, TCHAR *newStatusTitle)
+bool IsNewExtraStatus(HCONTACT hContact, char *szSetting, TCHAR *newStatusTitle)
{
DBVARIANT dbv;
bool result = true;
@@ -97,7 +97,7 @@ bool IsNewExtraStatus(HANDLE hContact, char *szSetting, TCHAR *newStatusTitle) return result;
}
-int ProcessExtraStatus(DBCONTACTWRITESETTING *cws, HANDLE hContact)
+int ProcessExtraStatus(DBCONTACTWRITESETTING *cws, HCONTACT hContact)
{
XSTATUSCHANGE *xsc;
char *szProto = GetContactProto(hContact);
@@ -408,12 +408,12 @@ TCHAR* GetStr(STATUSMSGINFO *n, const TCHAR *tmplt) return str;
}
-bool SkipHiddenContact(HANDLE hContact)
+bool SkipHiddenContact(HCONTACT hContact)
{
return (!opt.HiddenContactsToo && (db_get_b(hContact, "CList", "Hidden", 0) == 1));
}
-int ProcessStatus(DBCONTACTWRITESETTING *cws, HANDLE hContact)
+int ProcessStatus(DBCONTACTWRITESETTING *cws, HCONTACT hContact)
{
if ( !strcmp(cws->szSetting, "Status")) {
WORD newStatus = cws->value.wVal;
@@ -543,7 +543,7 @@ int ProcessStatus(DBCONTACTWRITESETTING *cws, HANDLE hContact) int ContactSettingChanged(WPARAM wParam, LPARAM lParam)
{
- HANDLE hContact = (HANDLE)wParam;
+ HCONTACT hContact = (HCONTACT)wParam;
if (hContact == NULL)
return 0;
@@ -612,7 +612,7 @@ int StatusModeChanged(WPARAM wParam, LPARAM lParam) return 0;
}
-void ShowStatusChangePopup(HANDLE hContact, char *szProto, WORD oldStatus, WORD newStatus)
+void ShowStatusChangePopup(HCONTACT hContact, char *szProto, WORD oldStatus, WORD newStatus)
{
TCHAR stzStatusText[MAX_SECONDLINE] = {0};
WORD myStatus = (WORD)CallProtoService(szProto, PS_GETSTATUS, 0, 0);
@@ -686,7 +686,7 @@ void ShowStatusChangePopup(HANDLE hContact, char *szProto, WORD oldStatus, WORD PUAddPopupT(&ppd);
}
-void BlinkIcon(HANDLE hContact, char* szProto, WORD status)
+void BlinkIcon(HCONTACT hContact, char* szProto, WORD status)
{
CLISTEVENT cle = {0};
TCHAR stzTooltip[256];
@@ -704,7 +704,7 @@ void BlinkIcon(HANDLE hContact, char* szProto, WORD status) CallService(MS_CLIST_ADDEVENT, 0, (LPARAM)&cle);
}
-void PlayChangeSound(HANDLE hContact, WORD oldStatus, WORD newStatus)
+void PlayChangeSound(HCONTACT hContact, WORD oldStatus, WORD newStatus)
{
DBVARIANT dbv;
if (opt.UseIndSnd) {
@@ -751,7 +751,7 @@ int ContactStatusChanged(WPARAM wParam, LPARAM lParam) {
WORD oldStatus = LOWORD(lParam);
WORD newStatus = HIWORD(lParam);
- HANDLE hContact = (HANDLE)wParam;
+ HCONTACT hContact = (HCONTACT)wParam;
bool bEnablePopup = true, bEnableSound = true;
char *hlpProto = GetContactProto(hContact);
@@ -777,7 +777,7 @@ int ContactStatusChanged(WPARAM wParam, LPARAM lParam) }
if (strcmp(szProto, szMetaModuleName) == 0) { //this contact is Meta
- HANDLE hSubContact = (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ HCONTACT hSubContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
hlpProto = GetContactProto(hSubContact);
if (hlpProto == NULL)
return 0;
diff --git a/plugins/NewXstatusNotify/src/popup.cpp b/plugins/NewXstatusNotify/src/popup.cpp index 211b4f6956..2a35c7f8ed 100644 --- a/plugins/NewXstatusNotify/src/popup.cpp +++ b/plugins/NewXstatusNotify/src/popup.cpp @@ -38,7 +38,7 @@ static int AwayMsgHook(WPARAM wParam, LPARAM lParam, LPARAM pObj) if (ack->result != ACKRESULT_SUCCESS)
return 0;
- HANDLE hContact = PUGetContact(pdp->hWnd);
+ HCONTACT hContact = PUGetContact(pdp->hWnd);
ptrT pstzLast( db_get_tsa(hContact, MODULE, "LastPopupText"));
TCHAR *tszStatus = (TCHAR*)ack->lParam;
@@ -58,7 +58,7 @@ static int AwayMsgHook(WPARAM wParam, LPARAM lParam, LPARAM pObj) void QueryAwayMessage(HWND hWnd, PLUGINDATA *pdp)
{
- HANDLE hContact = PUGetContact(hWnd);
+ HCONTACT hContact = PUGetContact(hWnd);
char *szProto = GetContactProto(hContact);
if (szProto)
{
@@ -76,7 +76,7 @@ void QueryAwayMessage(HWND hWnd, PLUGINDATA *pdp) void PopupAction(HWND hWnd, BYTE action)
{
- HANDLE hContact = PUGetContact(hWnd);
+ HCONTACT hContact = PUGetContact(hWnd);
if (hContact && hContact != INVALID_HANDLE_VALUE) {
switch (action) {
case PCA_OPENMESSAGEWND:
diff --git a/plugins/NewXstatusNotify/src/utils.cpp b/plugins/NewXstatusNotify/src/utils.cpp index ecbcb36a79..7e1f988ab1 100644 --- a/plugins/NewXstatusNotify/src/utils.cpp +++ b/plugins/NewXstatusNotify/src/utils.cpp @@ -39,7 +39,7 @@ TCHAR *db2t(DBVARIANT *dbv) return buff;
}
-int DBGetStringDefault(HANDLE hContact, const char *szModule, const char *szSetting, TCHAR *setting, int size, const TCHAR *defaultValue)
+int DBGetStringDefault(HCONTACT hContact, const char *szModule, const char *szSetting, TCHAR *setting, int size, const TCHAR *defaultValue)
{
DBVARIANT dbv;
if ( !db_get_ts(hContact, szModule, szSetting, &dbv)) {
diff --git a/plugins/NewXstatusNotify/src/utils.h b/plugins/NewXstatusNotify/src/utils.h index 384b01c511..55e97a0ddc 100644 --- a/plugins/NewXstatusNotify/src/utils.h +++ b/plugins/NewXstatusNotify/src/utils.h @@ -23,7 +23,7 @@ #define UTILS_H
TCHAR *db2t(DBVARIANT *dbv);
-int DBGetStringDefault(HANDLE hContact, const char *szModule, const char *szSetting, TCHAR *setting, int size, const TCHAR *defaultValue);
+int DBGetStringDefault(HCONTACT hContact, const char *szModule, const char *szSetting, TCHAR *setting, int size, const TCHAR *defaultValue);
void HigherLower(int maxValue, int minValue);
void ShowLog(TCHAR *file);
BOOL StatusHasAwayMessage(char *szProto, int status);
diff --git a/plugins/NewXstatusNotify/src/xstatus.cpp b/plugins/NewXstatusNotify/src/xstatus.cpp index 1ca031ac7a..e1d6313bb1 100644 --- a/plugins/NewXstatusNotify/src/xstatus.cpp +++ b/plugins/NewXstatusNotify/src/xstatus.cpp @@ -19,7 +19,7 @@ #include "common.h"
-XSTATUSCHANGE *NewXSC(HANDLE hContact, char *szProto, int xstatusType, int action, TCHAR *stzTitle, TCHAR *stzText)
+XSTATUSCHANGE *NewXSC(HCONTACT hContact, char *szProto, int xstatusType, int action, TCHAR *stzTitle, TCHAR *stzText)
{
XSTATUSCHANGE *xsc = (XSTATUSCHANGE *)mir_alloc(sizeof(XSTATUSCHANGE));
xsc->hContact = hContact;
@@ -41,7 +41,7 @@ void FreeXSC(XSTATUSCHANGE *xsc) }
}
-void RemoveLoggedEvents(HANDLE hContact)
+void RemoveLoggedEvents(HCONTACT hContact)
{
for (int i = eventList.getCount()-1; i >= 0; i--) {
DBEVENT *dbevent = eventList[i];
@@ -351,7 +351,7 @@ TCHAR *GetDefaultXstatusName(int statusID, char *szProto, TCHAR *buff, int buffl return buff;
}
-TCHAR *GetIcqXStatus(HANDLE hContact, char *szProto, char *szValue, TCHAR *buff, int bufflen)
+TCHAR *GetIcqXStatus(HCONTACT hContact, char *szProto, char *szValue, TCHAR *buff, int bufflen)
{
DBVARIANT dbv;
buff[0] = 0;
@@ -372,7 +372,7 @@ TCHAR *GetIcqXStatus(HANDLE hContact, char *szProto, char *szValue, TCHAR *buff, return buff;
}
-TCHAR *GetJabberAdvStatusText(HANDLE hContact, char *szProto, char *szSlot, char *szValue, TCHAR *buff, int bufflen)
+TCHAR *GetJabberAdvStatusText(HCONTACT hContact, char *szProto, char *szSlot, char *szValue, TCHAR *buff, int bufflen)
{
DBVARIANT dbv;
char szSetting[128];
@@ -388,7 +388,7 @@ TCHAR *GetJabberAdvStatusText(HANDLE hContact, char *szProto, char *szSlot, char return buff;
}
-void LogXstatusChange(HANDLE hContact, char *szProto, int xstatusType, TCHAR *stzTitle, TCHAR *stzText)
+void LogXstatusChange(HCONTACT hContact, char *szProto, int xstatusType, TCHAR *stzTitle, TCHAR *stzText)
{
XSTATUSCHANGE *xsc =
NewXSC(
@@ -406,7 +406,7 @@ void LogXstatusChange(HANDLE hContact, char *szProto, int xstatusType, TCHAR *st void AddEventThread(void *arg)
{
- HANDLE hContact = (HANDLE)arg;
+ HCONTACT hContact = (HCONTACT)arg;
TCHAR stzTitle[MAX_TITLE_LEN], stzText[MAX_TEXT_LEN];
char *szProto = GetContactProto(hContact);
diff --git a/plugins/NewXstatusNotify/src/xstatus.h b/plugins/NewXstatusNotify/src/xstatus.h index 5468d2c5ff..b5ba28e71f 100644 --- a/plugins/NewXstatusNotify/src/xstatus.h +++ b/plugins/NewXstatusNotify/src/xstatus.h @@ -75,7 +75,7 @@ typedef struct tagXSTATUSCHANGE
{
- HANDLE hContact;
+ HCONTACT hContact;
char *szProto;
int type;
int action;
@@ -85,7 +85,7 @@ typedef struct tagXSTATUSCHANGE typedef struct tagDBEVENT
{
- HANDLE hContact;
+ HCONTACT hContact;
HANDLE hDBEvent;
} DBEVENT;
@@ -96,7 +96,7 @@ typedef struct tagPROTOTEMPLATE } PROTOTEMPLATE;
TCHAR *GetDefaultXstatusName(int statusID, char *szProto, TCHAR *buff, int bufflen);
-XSTATUSCHANGE *NewXSC(HANDLE hContact, char *szProto, int xstatusType, int action, TCHAR *stzTitle, TCHAR *stzText);
+XSTATUSCHANGE *NewXSC(HCONTACT hContact, char *szProto, int xstatusType, int action, TCHAR *stzTitle, TCHAR *stzText);
void ExtraStatusChanged(XSTATUSCHANGE *xsc);
void FreeXSC(XSTATUSCHANGE *xsc);
int OnWindowEvent(WPARAM wParam, LPARAM lParam);
|