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/TipperYM | |
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/TipperYM')
-rw-r--r-- | plugins/TipperYM/src/message_pump.cpp | 18 | ||||
-rw-r--r-- | plugins/TipperYM/src/options.cpp | 4 | ||||
-rw-r--r-- | plugins/TipperYM/src/popwin.cpp | 12 | ||||
-rw-r--r-- | plugins/TipperYM/src/popwin.h | 2 | ||||
-rw-r--r-- | plugins/TipperYM/src/subst.cpp | 42 | ||||
-rw-r--r-- | plugins/TipperYM/src/subst.h | 14 | ||||
-rw-r--r-- | plugins/TipperYM/src/tipper.cpp | 2 | ||||
-rw-r--r-- | plugins/TipperYM/src/translations.cpp | 46 | ||||
-rw-r--r-- | plugins/TipperYM/src/translations.h | 6 |
9 files changed, 73 insertions, 73 deletions
diff --git a/plugins/TipperYM/src/message_pump.cpp b/plugins/TipperYM/src/message_pump.cpp index 7bd6e7980b..0bf9936be4 100644 --- a/plugins/TipperYM/src/message_pump.cpp +++ b/plugins/TipperYM/src/message_pump.cpp @@ -48,14 +48,14 @@ bool NeedWaitForContent(CLCINFOTIPEX *clcitex) if (opt.bWaitForContent && IsContactTooltip(clcitex))
{
- char *szProto = GetContactProto((HCONTACT)clcitex->hItem);
+ char *szProto = GetContactProto((MCONTACT)clcitex->hItem);
if (!szProto) return false;
if (opt.bWaitForStatusMsg && !bStatusMsgReady)
{
- db_unset((HCONTACT)clcitex->hItem, MODULE, "TempStatusMsg");
- if (CanRetrieveStatusMsg((HCONTACT)clcitex->hItem, szProto) &&
- CallContactService((HCONTACT)clcitex->hItem, PSS_GETAWAYMSG, 0, 0))
+ db_unset((MCONTACT)clcitex->hItem, MODULE, "TempStatusMsg");
+ if (CanRetrieveStatusMsg((MCONTACT)clcitex->hItem, szProto) &&
+ CallContactService((MCONTACT)clcitex->hItem, PSS_GETAWAYMSG, 0, 0))
{
if (WaitForContentTimerID)
KillTimer(0, WaitForContentTimerID);
@@ -69,7 +69,7 @@ bool NeedWaitForContent(CLCINFOTIPEX *clcitex) CallProtoService(szProto, PS_GETAVATARCAPS, AF_ENABLED, 0))
{
DBVARIANT dbv;
- if (!db_get_s((HCONTACT)clcitex->hItem, "ContactPhoto", "File", &dbv))
+ if (!db_get_s((MCONTACT)clcitex->hItem, "ContactPhoto", "File", &dbv))
{
if (!strstr(dbv.pszVal, ".xml"))
{
@@ -153,7 +153,7 @@ unsigned int CALLBACK MessagePumpThread(void *param) }
case MUM_GOTSTATUS:
{
- HCONTACT hContact = (HCONTACT)hwndMsg.wParam;
+ MCONTACT hContact = (MCONTACT)hwndMsg.wParam;
TCHAR *swzMsg = (TCHAR *)hwndMsg.lParam;
if (opt.bWaitForContent && bStatusMsgReady == false && clcitex && clcitex->hItem == (HANDLE)hContact) {
@@ -163,7 +163,7 @@ unsigned int CALLBACK MessagePumpThread(void *param) }
if (swzMsg) {
- db_set_ts((HCONTACT)clcitex->hItem, MODULE, "TempStatusMsg", swzMsg);
+ db_set_ts((MCONTACT)clcitex->hItem, MODULE, "TempStatusMsg", swzMsg);
mir_free(swzMsg);
}
@@ -185,7 +185,7 @@ unsigned int CALLBACK MessagePumpThread(void *param) }
case MUM_GOTAVATAR:
{
- HCONTACT hContact = (HCONTACT)hwndMsg.wParam;
+ MCONTACT hContact = (MCONTACT)hwndMsg.wParam;
if (opt.bWaitForContent && bAvatarReady == false && clcitex && clcitex->hItem == (HANDLE)hContact)
{
if (WaitForContentTimerID)
@@ -340,7 +340,7 @@ int ProtoAck(WPARAM wParam, LPARAM lParam) int AvatarChanged(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
PostMPMessage(MUM_GOTAVATAR, (WPARAM)hContact, 0);
return 0;
}
diff --git a/plugins/TipperYM/src/options.cpp b/plugins/TipperYM/src/options.cpp index ed49ccb962..07d22050da 100644 --- a/plugins/TipperYM/src/options.cpp +++ b/plugins/TipperYM/src/options.cpp @@ -2101,7 +2101,7 @@ INT_PTR CALLBACK DlgProcFavouriteContacts(HWND hwndDlg, UINT msg, WPARAM wParam, SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETGREYOUTFLAGS, 0, 0);
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETLEFTMARGIN, 2, 0);
{
- 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) SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem && db_get_b(hContact, MODULE, "FavouriteContact", 0))
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItem, 1);
@@ -2118,7 +2118,7 @@ INT_PTR CALLBACK DlgProcFavouriteContacts(HWND hwndDlg, UINT msg, WPARAM wParam, BYTE isChecked;
int count = 0;
- 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) SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem) {
isChecked = (BYTE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0);
diff --git a/plugins/TipperYM/src/popwin.cpp b/plugins/TipperYM/src/popwin.cpp index 0a7cfa7dce..92566cd72e 100644 --- a/plugins/TipperYM/src/popwin.cpp +++ b/plugins/TipperYM/src/popwin.cpp @@ -305,7 +305,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa pwd->bIsTextTip = false;
pwd->iIndent = opt.iTextIndent;
pwd->iSidebarWidth= opt.iSidebarWidth;
- pwd->hContact = (HCONTACT)pwd->clcit.hItem;
+ pwd->hContact = (MCONTACT)pwd->clcit.hItem;
pwd->iIconIndex = (int)CallService(MS_CLIST_GETCONTACTICON, (WPARAM)pwd->hContact, 0);
// don't use stored status message
@@ -976,7 +976,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa break;
case PUM_SETSTATUSTEXT:
- if (pwd && (HCONTACT)wParam == pwd->hContact) {
+ if (pwd && (MCONTACT)wParam == pwd->hContact) {
db_set_ts(pwd->hContact, MODULE, "TempStatusMsg", (TCHAR *)lParam);
pwd->bIsPainted = false;
pwd->bNeedRefresh = true;
@@ -988,7 +988,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa return TRUE;
case PUM_SHOWXSTATUS:
- if (pwd && (HCONTACT)wParam == pwd->hContact) {
+ if (pwd && (MCONTACT)wParam == pwd->hContact) {
// in case we have retrieve xstatus
pwd->bIsPainted = false;
SendMessage(hwnd, PUM_REFRESH_VALUES, TRUE, 0);
@@ -997,7 +997,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa return TRUE;
case PUM_SETAVATAR:
- if (pwd && (HCONTACT)wParam == pwd->hContact) {
+ if (pwd && (MCONTACT)wParam == pwd->hContact) {
pwd->bIsPainted = false;
SendMessage(hwnd, PUM_GETHEIGHT, 0, 0);
SendMessage(hwnd, PUM_CALCPOS, 0, 0);
@@ -1528,7 +1528,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa if (dwItems & TRAYTIP_NUMCONTACTS) {
int iCount = 0, iCountOnline = 0;
- for (HCONTACT hContact = db_find_first(pa->szModuleName); hContact; hContact = db_find_next(hContact, pa->szModuleName)) {
+ for (MCONTACT hContact = db_find_first(pa->szModuleName); hContact; hContact = db_find_next(hContact, pa->szModuleName)) {
if (db_get_w(hContact, pa->szModuleName, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE)
iCountOnline++;
iCount++;
@@ -1646,7 +1646,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa bool bTitlePainted = false;
int iCount = 0, iCountOnline = 0;
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
if (db_get_b(hContact, MODULE, "FavouriteContact", 0)) {
char *proto = GetContactProto(hContact);
if (proto == NULL)
diff --git a/plugins/TipperYM/src/popwin.h b/plugins/TipperYM/src/popwin.h index 64e8df08ce..8ef1208a5f 100644 --- a/plugins/TipperYM/src/popwin.h +++ b/plugins/TipperYM/src/popwin.h @@ -107,7 +107,7 @@ typedef struct { HPEN hpenBorder, hpenDivider;
int iTitleHeight, iAvatarHeight, iIconsHeight, iTextHeight, iLabelWidth;
int iRealAvatarWidth, iRealAvatarHeight;
- HCONTACT hContact;
+ MCONTACT hContact;
int iIconIndex;
CLCINFOTIPEX clcit;
TCHAR swzTitle[TITLE_TEXT_LEN];
diff --git a/plugins/TipperYM/src/subst.cpp b/plugins/TipperYM/src/subst.cpp index 77938b3d62..441897d5f0 100644 --- a/plugins/TipperYM/src/subst.cpp +++ b/plugins/TipperYM/src/subst.cpp @@ -20,7 +20,7 @@ Boston, MA 02111-1307, USA. #include "common.h"
-bool DBGetContactSettingAsString(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+bool DBGetContactSettingAsString(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
DBVARIANT dbv;
buff[0] = 0;
@@ -63,7 +63,7 @@ bool DBGetContactSettingAsString(HCONTACT hContact, const char *szModuleName, co return buff[0] ? true : false;
}
-bool CheckContactType(HCONTACT hContact, const DISPLAYITEM &di)
+bool CheckContactType(MCONTACT hContact, const DISPLAYITEM &di)
{
if (di.type == DIT_ALL)
return true;
@@ -127,7 +127,7 @@ void StripBBCodesInPlace(TCHAR *swzText) }
}
-DWORD LastMessageTimestamp(HCONTACT hContact)
+DWORD LastMessageTimestamp(MCONTACT hContact)
{
HANDLE hDbEvent = db_event_last(hContact);
while (hDbEvent) {
@@ -153,7 +153,7 @@ void FormatTimestamp(DWORD ts, char *szFormat, TCHAR *buff, int bufflen) CallService(MS_DB_TIME_TIMESTAMPTOSTRINGT, (WPARAM)ts, (LPARAM)&dbt);
}
-bool Uid(HCONTACT hContact, char *szProto, TCHAR *buff, int bufflen)
+bool Uid(MCONTACT hContact, char *szProto, TCHAR *buff, int bufflen)
{
char *tmpProto = NULL;
@@ -184,7 +184,7 @@ bool UidName(char *szProto, TCHAR *buff, int bufflen) return false;
}
-TCHAR *GetLastMessageText(HCONTACT hContact)
+TCHAR *GetLastMessageText(MCONTACT hContact)
{
HANDLE hDbEvent = db_event_last(hContact);
while (hDbEvent) {
@@ -210,7 +210,7 @@ TCHAR *GetLastMessageText(HCONTACT hContact) return 0;
}
-bool CanRetrieveStatusMsg(HCONTACT hContact, char *szProto)
+bool CanRetrieveStatusMsg(MCONTACT hContact, char *szProto)
{
if (opt.bGetNewStatusMsg)
{
@@ -242,7 +242,7 @@ bool CanRetrieveStatusMsg(HCONTACT hContact, char *szProto) return false;
}
-TCHAR *GetStatusMessageText(HCONTACT hContact)
+TCHAR *GetStatusMessageText(MCONTACT hContact)
{
TCHAR *swzMsg = 0;
DBVARIANT dbv;
@@ -250,7 +250,7 @@ TCHAR *GetStatusMessageText(HCONTACT hContact) char *szProto = GetContactProto(hContact);
if (szProto) {
if (!strcmp(szProto, szMetaModuleName))
- hContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
else {
WORD wStatus = (int)CallProtoService(szProto, PS_GETSTATUS, 0, 0);
if (wStatus == ID_STATUS_OFFLINE)
@@ -286,7 +286,7 @@ TCHAR *GetStatusMessageText(HCONTACT hContact) return swzMsg;
}
-bool GetSysSubstText(HCONTACT hContact, TCHAR *swzRawSpec, TCHAR *buff, int bufflen)
+bool GetSysSubstText(MCONTACT hContact, TCHAR *swzRawSpec, TCHAR *buff, int bufflen)
{
if (!_tcscmp(swzRawSpec, _T("uid")))
{
@@ -361,7 +361,7 @@ bool GetSysSubstText(HCONTACT hContact, TCHAR *swzRawSpec, TCHAR *buff, int buff }
else if (!_tcscmp(swzRawSpec, _T("meta_subuid")))
{
- HCONTACT hSubContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ MCONTACT hSubContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
if (!hSubContact || (INT_PTR)hSubContact == CALLSERVICE_NOTFOUND)
return false;
return Uid(hSubContact, 0, buff, bufflen);
@@ -369,7 +369,7 @@ bool GetSysSubstText(HCONTACT hContact, TCHAR *swzRawSpec, TCHAR *buff, int buff else if (!_tcscmp(swzRawSpec, _T("meta_subproto")))
{
// get protocol of active subcontact
- HCONTACT hSubContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ MCONTACT hSubContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
if (!hSubContact || (INT_PTR)hSubContact == CALLSERVICE_NOTFOUND)
return false;
return GetSysSubstText(hSubContact, _T("account"), buff, bufflen);
@@ -409,18 +409,18 @@ bool GetSysSubstText(HCONTACT hContact, TCHAR *swzRawSpec, TCHAR *buff, int buff DWORD dwLastTs, dwNewTs, dwRecountTs;
DWORD dwTime, dwDiff;
int iNumber = 1;
- HCONTACT hTmpContact = hContact;
+ MCONTACT hTmpContact = hContact;
char *szProto = GetContactProto(hContact);
if (szProto && !strcmp(szProto, szMetaModuleName))
{
iNumber = CallService(MS_MC_GETNUMCONTACTS, (WPARAM)hContact, 0);
- hTmpContact = (HCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hContact, 0);
+ hTmpContact = (MCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hContact, 0);
}
for (int i = 0; i < iNumber; i++) {
if (i > 0)
- hTmpContact = (HCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hContact, i);
+ hTmpContact = (MCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hContact, i);
dwRecountTs = db_get_dw(hTmpContact, MODULE, "LastCountTS", 0);
dwTime = (DWORD)time(0);
dwDiff = (dwTime - dwRecountTs);
@@ -474,7 +474,7 @@ bool GetSysSubstText(HCONTACT hContact, TCHAR *swzRawSpec, TCHAR *buff, int buff return false;
}
-bool GetSubstText(HCONTACT hContact, const DISPLAYSUBST &ds, TCHAR *buff, int bufflen)
+bool GetSubstText(MCONTACT hContact, const DISPLAYSUBST &ds, TCHAR *buff, int bufflen)
{
TranslateFunc *transFunc = 0;
for (int i = 0; i < iTransFuncsCount; i++)
@@ -509,7 +509,7 @@ bool GetSubstText(HCONTACT hContact, const DISPLAYSUBST &ds, TCHAR *buff, int bu return false;
}
-bool GetRawSubstText(HCONTACT hContact, char *szRawSpec, TCHAR *buff, int bufflen)
+bool GetRawSubstText(MCONTACT hContact, char *szRawSpec, TCHAR *buff, int bufflen)
{
size_t lenght = strlen(szRawSpec);
for (size_t i = 0; i < lenght; i++)
@@ -541,7 +541,7 @@ bool GetRawSubstText(HCONTACT hContact, char *szRawSpec, TCHAR *buff, int buffle return false;
}
-bool ApplySubst(HCONTACT hContact, const TCHAR *swzSource, bool parseTipperVarsFirst, TCHAR *swzDest, int iDestLen)
+bool ApplySubst(MCONTACT hContact, const TCHAR *swzSource, bool parseTipperVarsFirst, TCHAR *swzDest, int iDestLen)
{
// hack - allow empty strings before passing to variables (note - zero length strings return false after this)
if (swzDest && swzSource && _tcslen(swzSource) == 0) {
@@ -785,12 +785,12 @@ error: return true;
}
-bool GetLabelText(HCONTACT hContact, const DISPLAYITEM &di, TCHAR *buff, int bufflen)
+bool GetLabelText(MCONTACT hContact, const DISPLAYITEM &di, TCHAR *buff, int bufflen)
{
return ApplySubst(hContact, di.swzLabel, false, buff, bufflen);
}
-bool GetValueText(HCONTACT hContact, const DISPLAYITEM &di, TCHAR *buff, int bufflen)
+bool GetValueText(MCONTACT hContact, const DISPLAYITEM &di, TCHAR *buff, int bufflen)
{
return ApplySubst(hContact, di.swzValue, di.bParseTipperVarsFirst, buff, bufflen);
}
@@ -889,7 +889,7 @@ TCHAR *GetProtoExtraStatusMessage(char *szProto) db_free(&dbv);
if (ServiceExists(MS_VARS_FORMATSTRING)) {
- HCONTACT hContact = db_find_first();
+ MCONTACT hContact = db_find_first();
char *proto = GetContactProto(hContact);
while(!proto) {
hContact = db_find_next(hContact);
@@ -957,7 +957,7 @@ TCHAR *GetJabberAdvStatusText(char *szProto, const char *szSlot, const char *szV return swzText;
}
-HICON GetJabberActivityIcon(HCONTACT hContact, char *szProto)
+HICON GetJabberActivityIcon(MCONTACT hContact, char *szProto)
{
DBVARIANT dbv;
HICON hIcon = NULL;
diff --git a/plugins/TipperYM/src/subst.h b/plugins/TipperYM/src/subst.h index 05e62014da..53c2d9ab51 100644 --- a/plugins/TipperYM/src/subst.h +++ b/plugins/TipperYM/src/subst.h @@ -21,25 +21,25 @@ Boston, MA 02111-1307, USA. #ifndef _SUBST_INC
#define _SUBST_INC
-bool GetLabelText(HCONTACT hContact, const DISPLAYITEM &di, TCHAR *buff, int iBufflen);
-bool GetValueText(HCONTACT hContact, const DISPLAYITEM &di, TCHAR *buff, int iBufflen);
+bool GetLabelText(MCONTACT hContact, const DISPLAYITEM &di, TCHAR *buff, int iBufflen);
+bool GetValueText(MCONTACT hContact, const DISPLAYITEM &di, TCHAR *buff, int iBufflen);
-bool CheckContactType(HCONTACT hContact, const DISPLAYITEM &di);
+bool CheckContactType(MCONTACT hContact, const DISPLAYITEM &di);
void StripBBCodesInPlace(TCHAR *text);
// can be used with hContact == 0 to get uid for a given proto
bool UidName(char *szProto, TCHAR *buff, int bufflen);
-bool Uid(HCONTACT hContact, char *szProto, TCHAR *buff, int bufflen);
+bool Uid(MCONTACT hContact, char *szProto, TCHAR *buff, int bufflen);
// get info for status and tray tooltip
-bool DBGetContactSettingAsString(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen);
-bool CanRetrieveStatusMsg(HCONTACT hContact, char *szProto);
+bool DBGetContactSettingAsString(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen);
+bool CanRetrieveStatusMsg(MCONTACT hContact, char *szProto);
TCHAR *GetProtoStatusMessage(char *szProto, WORD status);
TCHAR *GetProtoExtraStatusTitle(char *szProto);
TCHAR *GetProtoExtraStatusMessage(char *szProto);
TCHAR *GetListeningTo(char *szProto);
TCHAR *GetJabberAdvStatusText(char *szProto, const char *szSlot, const char *szValue);
-HICON GetJabberActivityIcon(HCONTACT hContact, char *szProto);
+HICON GetJabberActivityIcon(MCONTACT hContact, char *szProto);
#endif
diff --git a/plugins/TipperYM/src/tipper.cpp b/plugins/TipperYM/src/tipper.cpp index 91ef259fa6..52ea8a876f 100644 --- a/plugins/TipperYM/src/tipper.cpp +++ b/plugins/TipperYM/src/tipper.cpp @@ -113,7 +113,7 @@ int EventDeleted(WPARAM wParam, LPARAM lParam) DBEVENTINFO dbei = { sizeof(dbei) };
if (!db_event_get((HANDLE)lParam, &dbei))
if (dbei.eventType == EVENTTYPE_MESSAGE)
- db_unset((HCONTACT)wParam, MODULE, "LastCountTS");
+ db_unset((MCONTACT)wParam, MODULE, "LastCountTS");
return 0;
}
diff --git a/plugins/TipperYM/src/translations.cpp b/plugins/TipperYM/src/translations.cpp index 5fcb384aa4..ad98d19a5e 100644 --- a/plugins/TipperYM/src/translations.cpp +++ b/plugins/TipperYM/src/translations.cpp @@ -61,14 +61,14 @@ void AddTranslation(DBVTranslation *newTrans) mir_free(szName);
}
-TCHAR *NullTranslation(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *NullTranslation(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
if (DBGetContactSettingAsString(hContact, szModuleName, szSettingName, buff, bufflen))
return buff;
return NULL;
}
-TCHAR *TimestampToShortDate(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *TimestampToShortDate(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
DWORD ts = db_get_dw(hContact, szModuleName, szSettingName, 0);
if (ts == 0) return 0;
@@ -81,7 +81,7 @@ TCHAR *TimestampToShortDate(HCONTACT hContact, const char *szModuleName, const c return buff;
}
-TCHAR *TimestampToLongDate(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *TimestampToLongDate(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
DWORD ts = db_get_dw(hContact, szModuleName, szSettingName, 0);
if (ts == 0) return 0;
@@ -94,7 +94,7 @@ TCHAR *TimestampToLongDate(HCONTACT hContact, const char *szModuleName, const ch return buff;
}
-TCHAR *TimestampToTime(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *TimestampToTime(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
DWORD ts = db_get_dw(hContact, szModuleName, szSettingName, 0);
if (ts == 0) return 0;
@@ -107,7 +107,7 @@ TCHAR *TimestampToTime(HCONTACT hContact, const char *szModuleName, const char * return buff;
}
-TCHAR *TimestampToTimeNoSecs(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *TimestampToTimeNoSecs(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
DWORD ts = db_get_dw(hContact, szModuleName, szSettingName, 0);
if (ts == 0) return 0;
@@ -120,7 +120,7 @@ TCHAR *TimestampToTimeNoSecs(HCONTACT hContact, const char *szModuleName, const return buff;
}
-TCHAR *TimestampToTimeDifference(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *TimestampToTimeDifference(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
DWORD ts = db_get_dw(hContact, szModuleName, szSettingName, 0);
DWORD t = (DWORD)time(0);
@@ -140,7 +140,7 @@ TCHAR *TimestampToTimeDifference(HCONTACT hContact, const char *szModuleName, co return buff;
}
-TCHAR *SecondsToTimeDifference(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *SecondsToTimeDifference(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
DWORD diff = db_get_dw(hContact, szModuleName, szSettingName, 0);
int d = (diff / 60 / 60 / 24);
@@ -156,7 +156,7 @@ TCHAR *SecondsToTimeDifference(HCONTACT hContact, const char *szModuleName, cons return buff;
}
-TCHAR *WordToStatusDesc(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *WordToStatusDesc(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
WORD wStatus = db_get_w(hContact, szModuleName, szSettingName, ID_STATUS_OFFLINE);
TCHAR *szStatus = pcli->pfnGetStatusModeDescription(wStatus, 0);
@@ -164,7 +164,7 @@ TCHAR *WordToStatusDesc(HCONTACT hContact, const char *szModuleName, const char return buff;
}
-TCHAR *ByteToYesNo(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *ByteToYesNo(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
DBVARIANT dbv;
if (!db_get(hContact, szModuleName, szSettingName, &dbv))
@@ -184,7 +184,7 @@ TCHAR *ByteToYesNo(HCONTACT hContact, const char *szModuleName, const char *szSe return 0;
}
-TCHAR *ByteToGender(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *ByteToGender(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
BYTE val = (BYTE)db_get_b(hContact, szModuleName, szSettingName, 0);
if (val == 'F')
@@ -198,7 +198,7 @@ TCHAR *ByteToGender(HCONTACT hContact, const char *szModuleName, const char *szS return buff;
}
-TCHAR *WordToCountry(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *WordToCountry(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
char *szCountryName = 0;
WORD cid = (WORD)db_get_w(hContact, szModuleName, szSettingName, (WORD)-1);
@@ -213,7 +213,7 @@ TCHAR *WordToCountry(HCONTACT hContact, const char *szModuleName, const char *sz return 0;
}
-TCHAR *DwordToIp(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *DwordToIp(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
DWORD ip = db_get_dw(hContact, szModuleName, szSettingName, 0);
if (ip) {
@@ -243,7 +243,7 @@ bool GetInt(const DBVARIANT &dbv, int *iVal) return false;
}
-TCHAR *DayMonthYearToDate(HCONTACT hContact, const char *szModuleName, const char *prefix, TCHAR *buff, int bufflen)
+TCHAR *DayMonthYearToDate(MCONTACT hContact, const char *szModuleName, const char *prefix, TCHAR *buff, int bufflen)
{
DBVARIANT dbv;
char szSettingName[256];
@@ -291,7 +291,7 @@ TCHAR *DayMonthYearToDate(HCONTACT hContact, const char *szModuleName, const cha return 0;
}
-TCHAR *DayMonthYearToAge(HCONTACT hContact, const char *szModuleName, const char *szPrefix, TCHAR *buff, int bufflen)
+TCHAR *DayMonthYearToAge(MCONTACT hContact, const char *szModuleName, const char *szPrefix, TCHAR *buff, int bufflen)
{
DBVARIANT dbv;
char szSettingName[256];
@@ -340,7 +340,7 @@ TCHAR *DayMonthYearToAge(HCONTACT hContact, const char *szModuleName, const char return 0;
}
-TCHAR *HoursMinutesSecondsToTime(HCONTACT hContact, const char *szModuleName, const char *szPrefix, TCHAR *buff, int bufflen)
+TCHAR *HoursMinutesSecondsToTime(MCONTACT hContact, const char *szModuleName, const char *szPrefix, TCHAR *buff, int bufflen)
{
DBVARIANT dbv;
char szSettingName[256];
@@ -384,7 +384,7 @@ TCHAR *HoursMinutesSecondsToTime(HCONTACT hContact, const char *szModuleName, co return 0;
}
-TCHAR *HoursMinutesToTime(HCONTACT hContact, const char *szModuleName, const char *szPrefix, TCHAR *buff, int bufflen)
+TCHAR *HoursMinutesToTime(MCONTACT hContact, const char *szModuleName, const char *szPrefix, TCHAR *buff, int bufflen)
{
DBVARIANT dbv;
char szSettingName[256];
@@ -420,7 +420,7 @@ TCHAR *HoursMinutesToTime(HCONTACT hContact, const char *szModuleName, const cha return 0;
}
-TCHAR *DmyToTimeDifference(HCONTACT hContact, const char *szModuleName, const char *szPrefix, TCHAR *buff, int bufflen)
+TCHAR *DmyToTimeDifference(MCONTACT hContact, const char *szModuleName, const char *szPrefix, TCHAR *buff, int bufflen)
{
DBVARIANT dbv;
char szSettingName[256];
@@ -522,7 +522,7 @@ TCHAR *DmyToTimeDifference(HCONTACT hContact, const char *szModuleName, const ch return 0;
}
-TCHAR *DayMonthToDaysToNextBirthday(HCONTACT hContact, const char *szModuleName, const char *szPrefix, TCHAR *buff, int bufflen)
+TCHAR *DayMonthToDaysToNextBirthday(MCONTACT hContact, const char *szModuleName, const char *szPrefix, TCHAR *buff, int bufflen)
{
DBVARIANT dbv;
char szSettingName[256];
@@ -575,7 +575,7 @@ TCHAR *DayMonthToDaysToNextBirthday(HCONTACT hContact, const char *szModuleName, }
-TCHAR *EmptyXStatusToDefaultName(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *EmptyXStatusToDefaultName(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
TCHAR szDefaultName[1024];
CUSTOM_STATUS xstatus = {0};
@@ -615,7 +615,7 @@ TCHAR *EmptyXStatusToDefaultName(HCONTACT hContact, const char *szModuleName, co return 0;
}
-TCHAR *TimezoneToTime(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *TimezoneToTime(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
int timezone = db_get_b(hContact,szModuleName,szSettingName,256);
if (timezone==256 || (char)timezone==-100)
@@ -640,7 +640,7 @@ TCHAR *TimezoneToTime(HCONTACT hContact, const char *szModuleName, const char *s return buff;
}
-TCHAR *ByteToDay(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *ByteToDay(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
int iDay = db_get_w(hContact, szModuleName, szSettingName, -1);
if (iDay > -1 && iDay < 7)
@@ -653,7 +653,7 @@ TCHAR *ByteToDay(HCONTACT hContact, const char *szModuleName, const char *szSett return 0;
}
-TCHAR *ByteToMonth(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *ByteToMonth(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
int iMonth = db_get_w(hContact, szModuleName, szSettingName, 0);
if (iMonth > 0 && iMonth < 13)
@@ -666,7 +666,7 @@ TCHAR *ByteToMonth(HCONTACT hContact, const char *szModuleName, const char *szSe return 0;
}
-TCHAR *ByteToLanguage(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *ByteToLanguage(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
int iLang = db_get_b(hContact, szModuleName, szSettingName, 0);
if (iLang)
diff --git a/plugins/TipperYM/src/translations.h b/plugins/TipperYM/src/translations.h index 7f09002bad..1ed2e8f53e 100644 --- a/plugins/TipperYM/src/translations.h +++ b/plugins/TipperYM/src/translations.h @@ -117,9 +117,9 @@ static char *months[12] = { void InitTranslations();
void DeinitTranslations();
-TCHAR *TimestampToTimeDifference(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen);
-TCHAR *EmptyXStatusToDefaultName(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen);
-TCHAR *WordToStatusDesc(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen);
+TCHAR *TimestampToTimeDifference(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen);
+TCHAR *EmptyXStatusToDefaultName(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen);
+TCHAR *WordToStatusDesc(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen);
#endif
|