diff options
author | George Hazan <george.hazan@gmail.com> | 2014-02-10 20:47:51 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-02-10 20:47:51 +0000 |
commit | 68d3fd47bb9b75e65859d14199ffee01f16ac9a7 (patch) | |
tree | fcc340ad7067561e57733b287f193a7dbed93dd4 /plugins/NewXstatusNotify | |
parent | 7193759b046338c6f47ff2edb34743a1465791cd (diff) |
HCONTACT is not needed anymore
git-svn-id: http://svn.miranda-ng.org/main/trunk@8086 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/NewXstatusNotify')
-rw-r--r-- | plugins/NewXstatusNotify/src/common.h | 4 | ||||
-rw-r--r-- | plugins/NewXstatusNotify/src/indsnd.cpp | 8 | ||||
-rw-r--r-- | plugins/NewXstatusNotify/src/main.cpp | 22 | ||||
-rw-r--r-- | plugins/NewXstatusNotify/src/popup.cpp | 8 | ||||
-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, 32 insertions, 32 deletions
diff --git a/plugins/NewXstatusNotify/src/common.h b/plugins/NewXstatusNotify/src/common.h index 3e56ed0fb0..53ab39ce15 100644 --- a/plugins/NewXstatusNotify/src/common.h +++ b/plugins/NewXstatusNotify/src/common.h @@ -122,7 +122,7 @@ typedef struct tagPLUGINDATA } PLUGINDATA;
typedef struct {
- HCONTACT hContact;
+ MCONTACT hContact;
TCHAR *cust;
TCHAR *oldstatusmsg;
TCHAR *newstatusmsg;
@@ -131,7 +131,7 @@ typedef struct { } STATUSMSGINFO;
/*
-HCONTACT hContact = (HCONTACT)wParam;
+MCONTACT hContact = (MCONTACT)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 c21bb6f940..19ecaa0d90 100644 --- a/plugins/NewXstatusNotify/src/indsnd.cpp +++ b/plugins/NewXstatusNotify/src/indsnd.cpp @@ -107,14 +107,14 @@ HIMAGELIST GetStatusIconsImgList(char *szProto) INT_PTR CALLBACK DlgProcSoundUIPage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- static HCONTACT hContact = NULL;
+ static MCONTACT hContact = NULL;
HWND hList = GetDlgItem(hwndDlg, IDC_INDSNDLIST);
switch (msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
{
- hContact = (HCONTACT)lParam;
+ hContact = (MCONTACT)lParam;
char *szProto = GetContactProto(hContact);
ListView_SetImageList(hList, GetStatusIconsImgList(szProto), LVSIL_SMALL);
@@ -331,7 +331,7 @@ void SetAllContactsIcons(HWND hwndList) {
BYTE EnableSounds, EnablePopups, EnableXStatus, EnableLogging;
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT 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);
@@ -570,7 +570,7 @@ INT_PTR CALLBACK DlgProcFiltering(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM case 0:
switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT 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 42a831073a..39b9d5a9cb 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(HCONTACT hContact)
+BYTE GetGender(MCONTACT hContact)
{
char *szProto =GetContactProto(hContact);
if (szProto) {
@@ -84,7 +84,7 @@ HANDLE GetIconHandle(char *szIcon) return Skin_GetIconHandle(szSettingName);
}
-bool IsNewExtraStatus(HCONTACT hContact, char *szSetting, TCHAR *newStatusTitle)
+bool IsNewExtraStatus(MCONTACT hContact, char *szSetting, TCHAR *newStatusTitle)
{
DBVARIANT dbv;
bool result = true;
@@ -97,7 +97,7 @@ bool IsNewExtraStatus(HCONTACT hContact, char *szSetting, TCHAR *newStatusTitle) return result;
}
-int ProcessExtraStatus(DBCONTACTWRITESETTING *cws, HCONTACT hContact)
+int ProcessExtraStatus(DBCONTACTWRITESETTING *cws, MCONTACT hContact)
{
XSTATUSCHANGE *xsc;
char *szProto = GetContactProto(hContact);
@@ -408,12 +408,12 @@ TCHAR* GetStr(STATUSMSGINFO *n, const TCHAR *tmplt) return str;
}
-bool SkipHiddenContact(HCONTACT hContact)
+bool SkipHiddenContact(MCONTACT hContact)
{
return (!opt.HiddenContactsToo && (db_get_b(hContact, "CList", "Hidden", 0) == 1));
}
-int ProcessStatus(DBCONTACTWRITESETTING *cws, HCONTACT hContact)
+int ProcessStatus(DBCONTACTWRITESETTING *cws, MCONTACT hContact)
{
if ( !strcmp(cws->szSetting, "Status")) {
WORD newStatus = cws->value.wVal;
@@ -543,7 +543,7 @@ int ProcessStatus(DBCONTACTWRITESETTING *cws, HCONTACT hContact) int ContactSettingChanged(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact == NULL)
return 0;
@@ -612,7 +612,7 @@ int StatusModeChanged(WPARAM wParam, LPARAM lParam) return 0;
}
-void ShowStatusChangePopup(HCONTACT hContact, char *szProto, WORD oldStatus, WORD newStatus)
+void ShowStatusChangePopup(MCONTACT 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(HCONTACT hContact, char *szProto, WORD oldStatus, WOR PUAddPopupT(&ppd);
}
-void BlinkIcon(HCONTACT hContact, char* szProto, WORD status)
+void BlinkIcon(MCONTACT hContact, char* szProto, WORD status)
{
CLISTEVENT cle = {0};
TCHAR stzTooltip[256];
@@ -704,7 +704,7 @@ void BlinkIcon(HCONTACT hContact, char* szProto, WORD status) CallService(MS_CLIST_ADDEVENT, 0, (LPARAM)&cle);
}
-void PlayChangeSound(HCONTACT hContact, WORD oldStatus, WORD newStatus)
+void PlayChangeSound(MCONTACT 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);
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)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
- HCONTACT hSubContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ MCONTACT hSubContact = (MCONTACT)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 7aba8a569e..8d36c769ab 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;
- HCONTACT hContact = PUGetContact(pdp->hWnd);
+ MCONTACT 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)
{
- HCONTACT hContact = PUGetContact(hWnd);
+ MCONTACT hContact = PUGetContact(hWnd);
char *szProto = GetContactProto(hContact);
if (szProto)
{
@@ -76,8 +76,8 @@ void QueryAwayMessage(HWND hWnd, PLUGINDATA *pdp) void PopupAction(HWND hWnd, BYTE action)
{
- HCONTACT hContact = PUGetContact(hWnd);
- if (hContact && hContact != (HCONTACT)INVALID_HANDLE_VALUE) {
+ MCONTACT hContact = PUGetContact(hWnd);
+ if (hContact && hContact != INVALID_CONTACT_ID) {
switch (action) {
case PCA_OPENMESSAGEWND:
CallServiceSync(MS_MSG_SENDMESSAGET, (WPARAM)hContact, 0);
diff --git a/plugins/NewXstatusNotify/src/utils.cpp b/plugins/NewXstatusNotify/src/utils.cpp index 7e1f988ab1..a86f7e80bc 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(HCONTACT hContact, const char *szModule, const char *szSetting, TCHAR *setting, int size, const TCHAR *defaultValue)
+int DBGetStringDefault(MCONTACT 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 55e97a0ddc..e1a33b8de6 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(HCONTACT hContact, const char *szModule, const char *szSetting, TCHAR *setting, int size, const TCHAR *defaultValue);
+int DBGetStringDefault(MCONTACT 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 ed150f927a..4930aaac08 100644 --- a/plugins/NewXstatusNotify/src/xstatus.cpp +++ b/plugins/NewXstatusNotify/src/xstatus.cpp @@ -19,7 +19,7 @@ #include "common.h"
-XSTATUSCHANGE *NewXSC(HCONTACT hContact, char *szProto, int xstatusType, int action, TCHAR *stzTitle, TCHAR *stzText)
+XSTATUSCHANGE *NewXSC(MCONTACT 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(HCONTACT hContact)
+void RemoveLoggedEvents(MCONTACT 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(HCONTACT hContact, char *szProto, char *szValue, TCHAR *buff, int bufflen)
+TCHAR *GetIcqXStatus(MCONTACT hContact, char *szProto, char *szValue, TCHAR *buff, int bufflen)
{
DBVARIANT dbv;
buff[0] = 0;
@@ -372,7 +372,7 @@ TCHAR *GetIcqXStatus(HCONTACT hContact, char *szProto, char *szValue, TCHAR *buf return buff;
}
-TCHAR *GetJabberAdvStatusText(HCONTACT hContact, char *szProto, char *szSlot, char *szValue, TCHAR *buff, int bufflen)
+TCHAR *GetJabberAdvStatusText(MCONTACT hContact, char *szProto, char *szSlot, char *szValue, TCHAR *buff, int bufflen)
{
DBVARIANT dbv;
char szSetting[128];
@@ -388,7 +388,7 @@ TCHAR *GetJabberAdvStatusText(HCONTACT hContact, char *szProto, char *szSlot, ch return buff;
}
-void LogXstatusChange(HCONTACT hContact, char *szProto, int xstatusType, TCHAR *stzTitle, TCHAR *stzText)
+void LogXstatusChange(MCONTACT hContact, char *szProto, int xstatusType, TCHAR *stzTitle, TCHAR *stzText)
{
XSTATUSCHANGE *xsc =
NewXSC(
@@ -406,7 +406,7 @@ void LogXstatusChange(HCONTACT hContact, char *szProto, int xstatusType, TCHAR * void AddEventThread(void *arg)
{
- HCONTACT hContact = (HCONTACT)arg;
+ MCONTACT hContact = (MCONTACT)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 b5ba28e71f..c2d4d46113 100644 --- a/plugins/NewXstatusNotify/src/xstatus.h +++ b/plugins/NewXstatusNotify/src/xstatus.h @@ -75,7 +75,7 @@ typedef struct tagXSTATUSCHANGE
{
- HCONTACT hContact;
+ MCONTACT hContact;
char *szProto;
int type;
int action;
@@ -85,7 +85,7 @@ typedef struct tagXSTATUSCHANGE typedef struct tagDBEVENT
{
- HCONTACT hContact;
+ MCONTACT hContact;
HANDLE hDBEvent;
} DBEVENT;
@@ -96,7 +96,7 @@ typedef struct tagPROTOTEMPLATE } PROTOTEMPLATE;
TCHAR *GetDefaultXstatusName(int statusID, char *szProto, TCHAR *buff, int bufflen);
-XSTATUSCHANGE *NewXSC(HCONTACT hContact, char *szProto, int xstatusType, int action, TCHAR *stzTitle, TCHAR *stzText);
+XSTATUSCHANGE *NewXSC(MCONTACT 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);
|