summaryrefslogtreecommitdiff
path: root/plugins/NewXstatusNotify/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-12-26 17:06:04 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-12-26 17:06:04 +0300
commit1039b2829a264280493ba0fa979214fe024dc70c (patch)
tree8fa6a60eb46627582c372b56a4a1d4754d6732c3 /plugins/NewXstatusNotify/src
parent62a186697df33c96dc1a6dac0f4dfc38652fb96f (diff)
WORD -> uint16_t
Diffstat (limited to 'plugins/NewXstatusNotify/src')
-rw-r--r--plugins/NewXstatusNotify/src/main.cpp14
-rw-r--r--plugins/NewXstatusNotify/src/options.cpp2
-rw-r--r--plugins/NewXstatusNotify/src/popup.cpp2
-rw-r--r--plugins/NewXstatusNotify/src/popup.h6
-rw-r--r--plugins/NewXstatusNotify/src/stdafx.h4
5 files changed, 14 insertions, 14 deletions
diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp
index 461d1477ca..27bee1fdd9 100644
--- a/plugins/NewXstatusNotify/src/main.cpp
+++ b/plugins/NewXstatusNotify/src/main.cpp
@@ -34,7 +34,7 @@ STATUS StatusList[STATUS_COUNT];
STATUS StatusListEx[STATUSEX_COUNT];
HWND SecretWnd;
-int ContactStatusChanged(MCONTACT hContact, WORD oldStatus, WORD newStatus);
+int ContactStatusChanged(MCONTACT hContact, uint16_t oldStatus, uint16_t newStatus);
IconItem iconList[ICO_MAXID] =
{
@@ -287,7 +287,7 @@ void LogSMsgToDB(STATUSMSGINFO *smi, const wchar_t *tmplt)
}
}
-void GetStatusText(MCONTACT hContact, WORD newStatus, WORD oldStatus, wchar_t *stzStatusText)
+void GetStatusText(MCONTACT hContact, uint16_t newStatus, uint16_t oldStatus, wchar_t *stzStatusText)
{
if (opt.UseAlternativeText) {
switch (GetGender(hContact)) {
@@ -347,7 +347,7 @@ void PlayChangeSound(MCONTACT hContact, const char *name)
Skin_PlaySound(name);
}
-int ContactStatusChanged(MCONTACT hContact, WORD oldStatus, WORD newStatus)
+int ContactStatusChanged(MCONTACT hContact, uint16_t oldStatus, uint16_t newStatus)
{
if (opt.LogToDB && (!opt.LogToDB_WinOpen || CheckMsgWnd(hContact))) {
wchar_t stzStatusText[MAX_SECONDLINE] = { 0 };
@@ -469,7 +469,7 @@ int ContactStatusChanged(MCONTACT hContact, WORD oldStatus, WORD newStatus)
int ProcessStatus(DBCONTACTWRITESETTING *cws, MCONTACT hContact)
{
- WORD newStatus = cws->value.wVal;
+ uint16_t newStatus = cws->value.wVal;
if (newStatus < ID_STATUS_MIN || newStatus > ID_STATUS_MAX)
return 0;
@@ -481,7 +481,7 @@ int ProcessStatus(DBCONTACTWRITESETTING *cws, MCONTACT hContact)
if (db_get_b(hContact, szProto, "ChatRoom", 0) == 1)
return 0;
- WORD oldStatus = DBGetContactSettingRangedWord(hContact, "UserOnline", "LastStatus", ID_STATUS_OFFLINE, ID_STATUS_MIN, ID_STATUS_MAX);
+ uint16_t oldStatus = DBGetContactSettingRangedWord(hContact, "UserOnline", "LastStatus", ID_STATUS_OFFLINE, ID_STATUS_MIN, ID_STATUS_MAX);
if (oldStatus == newStatus)
return 0;
@@ -1004,8 +1004,8 @@ int ProtoAck(WPARAM, LPARAM lParam)
ACKDATA *ack = (ACKDATA *)lParam;
if (ack->type == ACKTYPE_STATUS) {
- WORD newStatus = (WORD)ack->lParam;
- WORD oldStatus = (DWORD_PTR)ack->hProcess;
+ uint16_t newStatus = (uint16_t)ack->lParam;
+ uint16_t oldStatus = (DWORD_PTR)ack->hProcess;
if (oldStatus == newStatus)
return 0;
diff --git a/plugins/NewXstatusNotify/src/options.cpp b/plugins/NewXstatusNotify/src/options.cpp
index c3339b35f9..6712414044 100644
--- a/plugins/NewXstatusNotify/src/options.cpp
+++ b/plugins/NewXstatusNotify/src/options.cpp
@@ -342,7 +342,7 @@ INT_PTR CALLBACK DlgProcPopupOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
case WM_COMMAND:
{
- WORD idCtrl = LOWORD(wParam);
+ uint16_t idCtrl = LOWORD(wParam);
if (HIWORD(wParam) == CPN_COLOURCHANGED) {
if (idCtrl >= IDC_CHK_OFFLINE) {
COLORREF colour = SendDlgItemMessage(hwndDlg, idCtrl, CPM_GETCOLOUR, 0, 0);
diff --git a/plugins/NewXstatusNotify/src/popup.cpp b/plugins/NewXstatusNotify/src/popup.cpp
index d9f651bc13..6c43a08686 100644
--- a/plugins/NewXstatusNotify/src/popup.cpp
+++ b/plugins/NewXstatusNotify/src/popup.cpp
@@ -21,7 +21,7 @@
#include "stdafx.h"
-void ShowChangePopup(MCONTACT hContact, HICON hIcon, WORD newStatus, const wchar_t *stzText, PLUGINDATA *pdp)
+void ShowChangePopup(MCONTACT hContact, HICON hIcon, uint16_t newStatus, const wchar_t *stzText, PLUGINDATA *pdp)
{
POPUPDATAW ppd;
ppd.lchContact = hContact;
diff --git a/plugins/NewXstatusNotify/src/popup.h b/plugins/NewXstatusNotify/src/popup.h
index 5e0c70d00e..aa067c80b0 100644
--- a/plugins/NewXstatusNotify/src/popup.h
+++ b/plugins/NewXstatusNotify/src/popup.h
@@ -39,8 +39,8 @@
typedef struct tagPLUGINDATA
{
- WORD newStatus;
- WORD oldStatus;
+ uint16_t newStatus;
+ uint16_t oldStatus;
HWND hWnd;
HANDLE hAwayMsgProcess;
HANDLE hAwayMsgHook;
@@ -58,7 +58,7 @@ static struct {
LPGENW("Do nothing"), PCA_DONOTHING
};
-void ShowChangePopup(MCONTACT hContact, HICON hIcon, WORD newStatus, const wchar_t *stzText, PLUGINDATA *pdp = nullptr);
+void ShowChangePopup(MCONTACT hContact, HICON hIcon, uint16_t newStatus, const wchar_t *stzText, PLUGINDATA *pdp = nullptr);
LRESULT CALLBACK PopupDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
#endif \ No newline at end of file
diff --git a/plugins/NewXstatusNotify/src/stdafx.h b/plugins/NewXstatusNotify/src/stdafx.h
index 270cb562d0..d4fde75939 100644
--- a/plugins/NewXstatusNotify/src/stdafx.h
+++ b/plugins/NewXstatusNotify/src/stdafx.h
@@ -149,8 +149,8 @@ typedef struct {
/*
MCONTACT hContact = wParam;
-WORD oldStatus = LOWORD(lParam);
-WORD newStatus = HIWORD(lParam);
+uint16_t oldStatus = LOWORD(lParam);
+uint16_t newStatus = HIWORD(lParam);
oldStatus is the status the contact was before the change.
newStatus is the status the contact is now.
Cast them to (int) if you need them that way.