summaryrefslogtreecommitdiff
path: root/plugins/TipperYM/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/TipperYM/src')
-rw-r--r--plugins/TipperYM/src/options.cpp2
-rw-r--r--plugins/TipperYM/src/popwin.cpp2
-rw-r--r--plugins/TipperYM/src/subst.cpp6
-rw-r--r--plugins/TipperYM/src/subst.h2
-rw-r--r--plugins/TipperYM/src/translations.cpp14
5 files changed, 13 insertions, 13 deletions
diff --git a/plugins/TipperYM/src/options.cpp b/plugins/TipperYM/src/options.cpp
index 594d282921..ad60f95536 100644
--- a/plugins/TipperYM/src/options.cpp
+++ b/plugins/TipperYM/src/options.cpp
@@ -187,7 +187,7 @@ void SaveDS(DISPLAYSUBST *ds, int index)
mir_snprintf(setting, "Setting%d", index);
db_set_s(0, MODULE_ITEMS, setting, ds->szSettingName);
mir_snprintf(setting, "TransFuncId%d", index);
- db_set_dw(0, MODULE_ITEMS, setting, (WORD)ds->iTranslateFuncId);
+ db_set_dw(0, MODULE_ITEMS, setting, (uint16_t)ds->iTranslateFuncId);
}
bool LoadDI(DISPLAYITEM *di, int index)
diff --git a/plugins/TipperYM/src/popwin.cpp b/plugins/TipperYM/src/popwin.cpp
index 10e3744cfc..65e75e48b4 100644
--- a/plugins/TipperYM/src/popwin.cpp
+++ b/plugins/TipperYM/src/popwin.cpp
@@ -1584,7 +1584,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa
if (proto == nullptr)
continue;
- WORD wStatus = db_get_w(hContact, proto, "Status", ID_STATUS_OFFLINE);
+ uint16_t wStatus = db_get_w(hContact, proto, "Status", ID_STATUS_OFFLINE);
WordToStatusDesc(hContact, proto, "Status", swzStatus, 256);
if (wStatus != ID_STATUS_OFFLINE)
diff --git a/plugins/TipperYM/src/subst.cpp b/plugins/TipperYM/src/subst.cpp
index 920de10718..efa18fbd4a 100644
--- a/plugins/TipperYM/src/subst.cpp
+++ b/plugins/TipperYM/src/subst.cpp
@@ -189,7 +189,7 @@ bool CanRetrieveStatusMsg(MCONTACT hContact, char *szProto)
{
if (opt.bGetNewStatusMsg) {
int iFlags = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_3, 0);
- WORD wStatus = db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE);
+ uint16_t wStatus = db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE);
if ((CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND) && (iFlags & Proto_Status2Flag(wStatus))) {
iFlags = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & (PF1_VISLIST | PF1_INVISLIST);
if (opt.bDisableIfInvisible && iFlags) {
@@ -216,7 +216,7 @@ wchar_t* GetStatusMessageText(MCONTACT hContact)
if (!mir_strcmp(szProto, META_PROTO))
hContact = db_mc_getMostOnline(hContact);
else {
- WORD wStatus = Proto_GetStatus(szProto);
+ uint16_t wStatus = Proto_GetStatus(szProto);
if (wStatus == ID_STATUS_OFFLINE)
return nullptr;
@@ -684,7 +684,7 @@ void TruncateString(wchar_t *ptszText)
}
}
-wchar_t* GetProtoStatusMessage(char *szProto, WORD wStatus)
+wchar_t* GetProtoStatusMessage(char *szProto, uint16_t wStatus)
{
if (!szProto || wStatus == ID_STATUS_OFFLINE)
return nullptr;
diff --git a/plugins/TipperYM/src/subst.h b/plugins/TipperYM/src/subst.h
index 888ca5b9cb..5e11279c5d 100644
--- a/plugins/TipperYM/src/subst.h
+++ b/plugins/TipperYM/src/subst.h
@@ -35,7 +35,7 @@ bool Uid(MCONTACT hContact, char *szProto, wchar_t *buff, int bufflen);
// get info for status and tray tooltip
bool DBGetContactSettingAsString(MCONTACT hContact, const char *szModuleName, const char *szSettingName, wchar_t *buff, int bufflen);
bool CanRetrieveStatusMsg(MCONTACT hContact, char *szProto);
-wchar_t *GetProtoStatusMessage(char *szProto, WORD status);
+wchar_t *GetProtoStatusMessage(char *szProto, uint16_t status);
wchar_t *GetProtoExtraStatusTitle(char *szProto);
wchar_t *GetProtoExtraStatusMessage(char *szProto);
wchar_t *GetListeningTo(char *szProto);
diff --git a/plugins/TipperYM/src/translations.cpp b/plugins/TipperYM/src/translations.cpp
index 7fc31e59b4..d5b301ff95 100644
--- a/plugins/TipperYM/src/translations.cpp
+++ b/plugins/TipperYM/src/translations.cpp
@@ -228,7 +228,7 @@ wchar_t *SecondsToTimeDifference(MCONTACT hContact, const char *szModuleName, co
wchar_t *WordToStatusDesc(MCONTACT hContact, const char *szModuleName, const char *szSettingName, wchar_t *buff, int bufflen)
{
- WORD wStatus = db_get_w(hContact, szModuleName, szSettingName, ID_STATUS_OFFLINE);
+ uint16_t wStatus = db_get_w(hContact, szModuleName, szSettingName, ID_STATUS_OFFLINE);
wchar_t *szStatus = Clist_GetStatusModeDescription(wStatus, 0);
wcsncpy_s(buff, bufflen, szStatus, _TRUNCATE);
return buff;
@@ -269,8 +269,8 @@ wchar_t *ByteToGender(MCONTACT hContact, const char *szModuleName, const char *s
wchar_t *WordToCountry(MCONTACT hContact, const char *szModuleName, const char *szSettingName, wchar_t *buff, int bufflen)
{
char *szCountryName = nullptr;
- WORD cid = (WORD)db_get_w(hContact, szModuleName, szSettingName, (WORD)-1);
- if (cid != (WORD)-1 && ServiceExists(MS_UTILS_GETCOUNTRYBYNUMBER) && (szCountryName = (char *)CallService(MS_UTILS_GETCOUNTRYBYNUMBER, cid, 0)) != nullptr) {
+ uint16_t cid = (uint16_t)db_get_w(hContact, szModuleName, szSettingName, (uint16_t)-1);
+ if (cid != (uint16_t)-1 && ServiceExists(MS_UTILS_GETCOUNTRYBYNUMBER) && (szCountryName = (char *)CallService(MS_UTILS_GETCOUNTRYBYNUMBER, cid, 0)) != nullptr) {
if (mir_strcmp(szCountryName, "Unknown") == 0)
return nullptr;
a2t(szCountryName, buff, bufflen);
@@ -717,12 +717,12 @@ INT_PTR ServiceAddTranslation(WPARAM, LPARAM lParam)
static DBVTranslation internalTranslations[] =
{
{ NullTranslation, LPGENW("[No translation]") },
- { WordToStatusDesc, LPGENW("WORD to status description") },
+ { WordToStatusDesc, LPGENW("uint16_t to status description") },
{ TimestampToTime, LPGENW("DWORD timestamp to time") },
{ TimestampToTimeDifference, LPGENW("DWORD timestamp to time difference") },
{ ByteToYesNo, LPGENW("uint8_t to Yes/No") },
{ ByteToGender, LPGENW("uint8_t to Male/Female (ICQ)") },
- { WordToCountry, LPGENW("WORD to country name") },
+ { WordToCountry, LPGENW("uint16_t to country name") },
{ DwordToIp, LPGENW("DWORD to IP address") },
{ DayMonthYearToDate, LPGENW("<prefix>Day|Month|Year to date") },
{ DayMonthYearToAge, LPGENW("<prefix>Day|Month|Year to age") },
@@ -736,8 +736,8 @@ static DBVTranslation internalTranslations[] =
{ EmptyXStatusToDefaultName, LPGENW("xStatus: empty xStatus name to default name") },
{ SecondsToTimeDifference, LPGENW("DWORD seconds to time difference") },
{ TimezoneToTime, LPGENW("uint8_t timezone to time") },
- { ByteToDay, LPGENW("WORD to name of a day (0..6, 0 is Sunday)") },
- { ByteToMonth, LPGENW("WORD to name of a month (1..12, 1 is January)") },
+ { ByteToDay, LPGENW("uint16_t to name of a day (0..6, 0 is Sunday)") },
+ { ByteToMonth, LPGENW("uint16_t to name of a month (1..12, 1 is January)") },
{ ByteToLanguage, LPGENW("uint8_t to language (ICQ)") },
};