diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/stdautoaway/src/options.cpp | 4 | ||||
-rw-r--r-- | src/core/stdautoaway/src/stdafx.h | 2 | ||||
-rw-r--r-- | src/core/stdaway/src/awaymsg.cpp | 2 | ||||
-rw-r--r-- | src/core/stdclist/src/clcopts.cpp | 6 | ||||
-rw-r--r-- | src/core/stdclist/src/cluiopts.cpp | 2 | ||||
-rw-r--r-- | src/core/stdcrypt/src/encrypt.cpp | 4 | ||||
-rw-r--r-- | src/core/stdfile/src/filexferdlg.cpp | 2 | ||||
-rw-r--r-- | src/core/stdmsg/src/chat_manager.cpp | 4 | ||||
-rw-r--r-- | src/core/stdmsg/src/chat_options.cpp | 2 | ||||
-rw-r--r-- | src/core/stdmsg/src/globals.h | 4 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgs.h | 4 | ||||
-rw-r--r-- | src/core/stdmsg/src/tabs.cpp | 4 | ||||
-rw-r--r-- | src/core/stdpopup/src/services.cpp | 2 | ||||
-rw-r--r-- | src/core/stduserinfo/src/stdinfo.cpp | 4 | ||||
-rw-r--r-- | src/core/stduseronline/src/useronline.cpp | 2 |
15 files changed, 24 insertions, 24 deletions
diff --git a/src/core/stdautoaway/src/options.cpp b/src/core/stdautoaway/src/options.cpp index 608f626753..5f176ab467 100644 --- a/src/core/stdautoaway/src/options.cpp +++ b/src/core/stdautoaway/src/options.cpp @@ -24,9 +24,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h" -static const WORD aa_Status[] = { ID_STATUS_AWAY, ID_STATUS_NA, ID_STATUS_OCCUPIED, ID_STATUS_DND }; +static const uint16_t aa_Status[] = { ID_STATUS_AWAY, ID_STATUS_NA, ID_STATUS_OCCUPIED, ID_STATUS_DND }; -int IdleGetStatusIndex(WORD status) +int IdleGetStatusIndex(uint16_t status) { for (int j = 0; j < _countof(aa_Status); j++) if (aa_Status[j] == status) diff --git a/src/core/stdautoaway/src/stdafx.h b/src/core/stdautoaway/src/stdafx.h index 1e820ab127..4471a6ddf2 100644 --- a/src/core/stdautoaway/src/stdafx.h +++ b/src/core/stdautoaway/src/stdafx.h @@ -79,7 +79,7 @@ struct CMPlugin : public PLUGIN<CMPlugin> CMOption<uint8_t> bIdleCheck, bIdleMethod, bIdleOnSaver, bIdleOnFullScr, bIdleOnLock;
CMOption<uint8_t> bIdlePrivate, bIdleSoundsOff, bIdleOnTerminal, bIdleStatusLock;
CMOption<uint8_t> bAAEnable;
- CMOption<WORD> bAAStatus;
+ CMOption<uint16_t> bAAStatus;
CMOption<DWORD> iIdleTime1st;
};
diff --git a/src/core/stdaway/src/awaymsg.cpp b/src/core/stdaway/src/awaymsg.cpp index 6d72b72b6b..d0db6e96e8 100644 --- a/src/core/stdaway/src/awaymsg.cpp +++ b/src/core/stdaway/src/awaymsg.cpp @@ -90,7 +90,7 @@ public: wchar_t *contactName = Clist_GetContactDisplayName(m_hContact);
char *szProto = Proto_GetBaseAccountName(m_hContact);
- WORD dwStatus = db_get_w(m_hContact, szProto, "Status", ID_STATUS_OFFLINE);
+ uint16_t dwStatus = db_get_w(m_hContact, szProto, "Status", ID_STATUS_OFFLINE);
wchar_t *status = Clist_GetStatusModeDescription(dwStatus, 0);
wchar_t str[256], format[128];
diff --git a/src/core/stdclist/src/clcopts.cpp b/src/core/stdclist/src/clcopts.cpp index 49c9d76abd..24ebb16c9f 100644 --- a/src/core/stdclist/src/clcopts.cpp +++ b/src/core/stdclist/src/clcopts.cpp @@ -233,7 +233,7 @@ static INT_PTR CALLBACK DlgProcClcMainOpts(HWND hwndDlg, UINT msg, WPARAM wParam }
db_set_b(0, "CLC", "ShowIdle", (uint8_t)(IsDlgButtonChecked(hwndDlg, IDC_IDLE) ? 1 : 0));
db_set_b(0, "CLC", "LeftMargin", (uint8_t)SendDlgItemMessage(hwndDlg, IDC_LEFTMARGINSPIN, UDM_GETPOS, 0, 0));
- db_set_w(0, "CLC", "ScrollTime", (WORD)SendDlgItemMessage(hwndDlg, IDC_SMOOTHTIMESPIN, UDM_GETPOS, 0, 0));
+ db_set_w(0, "CLC", "ScrollTime", (uint16_t)SendDlgItemMessage(hwndDlg, IDC_SMOOTHTIMESPIN, UDM_GETPOS, 0, 0));
db_set_b(0, "CLC", "GroupIndent", (uint8_t)SendDlgItemMessage(hwndDlg, IDC_GROUPINDENTSPIN, UDM_GETPOS, 0, 0));
db_set_b(0, "CLC", "NoVScrollBar", (uint8_t)(IsDlgButtonChecked(hwndDlg, IDC_NOSCROLLBAR) ? 1 : 0));
db_set_b(0, "CLC", "RowHeight", (uint8_t)SendDlgItemMessage(hwndDlg, IDC_ROWHEIGHTSPIN, UDM_GETPOS, 0, 0));
@@ -280,7 +280,7 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, }
}
{
- WORD bmpUse = db_get_w(0, "CLC", "BkBmpUse", CLCDEFAULT_BKBMPUSE);
+ uint16_t bmpUse = db_get_w(0, "CLC", "BkBmpUse", CLCDEFAULT_BKBMPUSE);
CheckDlgButton(hwndDlg, IDC_STRETCHH, bmpUse & CLB_STRETCHH ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_STRETCHV, bmpUse & CLB_STRETCHV ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_TILEH, bmpUse & CLBF_TILEH ? BST_CHECKED : BST_UNCHECKED);
@@ -371,7 +371,7 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, db_set_s(0, "CLC", "BkBitmap", str);
}
{
- WORD flags = 0;
+ uint16_t flags = 0;
if (IsDlgButtonChecked(hwndDlg, IDC_STRETCHH))
flags |= CLB_STRETCHH;
if (IsDlgButtonChecked(hwndDlg, IDC_STRETCHV))
diff --git a/src/core/stdclist/src/cluiopts.cpp b/src/core/stdclist/src/cluiopts.cpp index 536fa29a97..61e29dfbf7 100644 --- a/src/core/stdclist/src/cluiopts.cpp +++ b/src/core/stdclist/src/cluiopts.cpp @@ -153,7 +153,7 @@ static INT_PTR CALLBACK DlgProcCluiOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L db_set_b(0, "CLUI", "MaxSizeHeight", (uint8_t)GetDlgItemInt(hwndDlg, IDC_MAXSIZEHEIGHT, nullptr, FALSE));
db_set_b(0, "CLUI", "AutoSizeUpward", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_AUTOSIZEUPWARD));
g_plugin.setByte("AutoHide", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_AUTOHIDE));
- g_plugin.setWord("HideTime", (WORD)SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN, UDM_GETPOS, 0, 0));
+ g_plugin.setWord("HideTime", (uint16_t)SendDlgItemMessage(hwndDlg, IDC_HIDETIMESPIN, UDM_GETPOS, 0, 0));
g_plugin.setByte("Transparent", (uint8_t)IsDlgButtonChecked(hwndDlg, IDC_TRANSPARENT));
g_plugin.setByte("Alpha", (uint8_t)SendDlgItemMessage(hwndDlg, IDC_TRANSACTIVE, TBM_GETPOS, 0, 0));
g_plugin.setByte("AutoAlpha", (uint8_t)SendDlgItemMessage(hwndDlg, IDC_TRANSINACTIVE, TBM_GETPOS, 0, 0));
diff --git a/src/core/stdcrypt/src/encrypt.cpp b/src/core/stdcrypt/src/encrypt.cpp index 3b8d173229..44bdec84d1 100644 --- a/src/core/stdcrypt/src/encrypt.cpp +++ b/src/core/stdcrypt/src/encrypt.cpp @@ -148,7 +148,7 @@ uint8_t* CStdCrypt::encodeBuffer(const void *src, size_t cbLen, size_t *cbResult return nullptr;
uint8_t *tmpBuf = (uint8_t*)_alloca(cbLen + 2);
- *(PWORD)tmpBuf = (WORD)cbLen;
+ *(PWORD)tmpBuf = (uint16_t)cbLen;
memcpy(tmpBuf + 2, src, cbLen);
cbLen += 2;
size_t rest = cbLen % BLOCK_SIZE;
@@ -199,7 +199,7 @@ void* CStdCrypt::decodeBuffer(const uint8_t *pBuf, size_t bufLen, size_t *cbResu }
result[bufLen] = 0;
- WORD cbLen = *(PWORD)result;
+ uint16_t cbLen = *(PWORD)result;
if (cbLen > bufLen) {
mir_free(result);
return nullptr;
diff --git a/src/core/stdfile/src/filexferdlg.cpp b/src/core/stdfile/src/filexferdlg.cpp index 1e6b22b57d..ed445a5907 100644 --- a/src/core/stdfile/src/filexferdlg.cpp +++ b/src/core/stdfile/src/filexferdlg.cpp @@ -281,7 +281,7 @@ INT_PTR CALLBACK DlgProcFileTransfer(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR dat->hIcon = nullptr; { char *szProto = Proto_GetBaseAccountName(dat->hContact); - WORD status = db_get_w(dat->hContact, szProto, "Status", ID_STATUS_ONLINE); + uint16_t status = db_get_w(dat->hContact, szProto, "Status", ID_STATUS_ONLINE); SendDlgItemMessage(hwndDlg, IDC_CONTACT, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_LoadProtoIcon(szProto, status)); } diff --git a/src/core/stdmsg/src/chat_manager.cpp b/src/core/stdmsg/src/chat_manager.cpp index 0cf8673da1..0623a7ecd7 100644 --- a/src/core/stdmsg/src/chat_manager.cpp +++ b/src/core/stdmsg/src/chat_manager.cpp @@ -236,8 +236,8 @@ void Load_ChatModule() void Unload_ChatModule() { - db_set_w(0, CHAT_MODULE, "SplitterX", (WORD)g_Settings.iSplitterX); - db_set_w(0, CHAT_MODULE, "SplitterY", (WORD)g_Settings.iSplitterY); + db_set_w(0, CHAT_MODULE, "SplitterX", (uint16_t)g_Settings.iSplitterX); + db_set_w(0, CHAT_MODULE, "SplitterY", (uint16_t)g_Settings.iSplitterY); db_set_dw(0, CHAT_MODULE, "roomx", g_Settings.iX); db_set_dw(0, CHAT_MODULE, "roomy", g_Settings.iY); db_set_dw(0, CHAT_MODULE, "roomwidth", g_Settings.iWidth); diff --git a/src/core/stdmsg/src/chat_options.cpp b/src/core/stdmsg/src/chat_options.cpp index d94f9133fc..62936a6fdb 100644 --- a/src/core/stdmsg/src/chat_options.cpp +++ b/src/core/stdmsg/src/chat_options.cpp @@ -529,7 +529,7 @@ public: iLen = SendDlgItemMessage(m_hwnd, IDC_SPIN1, UDM_GETPOS, 0, 0); g_Settings.iPopupTimeout = iLen; - db_set_w(0, CHAT_MODULE, "PopupTimeout", (WORD)iLen); + db_set_w(0, CHAT_MODULE, "PopupTimeout", (uint16_t)iLen); db_set_dw(0, CHAT_MODULE, "PopupColorBG", g_Settings.crPUBkgColour = clrBack.GetColor()); db_set_dw(0, CHAT_MODULE, "PopupColorText", g_Settings.crPUTextColour = clrText.GetColor()); diff --git a/src/core/stdmsg/src/globals.h b/src/core/stdmsg/src/globals.h index 7207ccb9c3..12d06a65cf 100644 --- a/src/core/stdmsg/src/globals.h +++ b/src/core/stdmsg/src/globals.h @@ -55,7 +55,7 @@ struct GlobalMessageData CMOption<bool> bUseStatusWinIcon;
CMOption<bool> bLimitAvatarHeight;
- CMOption<WORD> iAvatarHeight;
+ CMOption<uint16_t> iAvatarHeight;
CMOption<DWORD> popupFlags;
CMOption<DWORD> msgTimeout;
@@ -63,7 +63,7 @@ struct GlobalMessageData CMOption<uint8_t> iGap;
CMOption<uint8_t> iLoadHistory;
- CMOption<WORD> nLoadCount, nLoadTime;
+ CMOption<uint16_t> nLoadCount, nLoadTime;
bool bSmileyInstalled = false;
};
diff --git a/src/core/stdmsg/src/msgs.h b/src/core/stdmsg/src/msgs.h index b5ddbf823d..304ada7afb 100644 --- a/src/core/stdmsg/src/msgs.h +++ b/src/core/stdmsg/src/msgs.h @@ -97,8 +97,8 @@ class CMsgDialog : public CSrmmBaseDialog int m_limitAvatarH = 0;
DWORD m_lastMessage = 0;
HANDLE m_hTimeZone = 0;
- WORD m_wStatus = ID_STATUS_OFFLINE, m_wOldStatus = ID_STATUS_OFFLINE;
- WORD m_wMinute = 0;
+ uint16_t m_wStatus = ID_STATUS_OFFLINE, m_wOldStatus = ID_STATUS_OFFLINE;
+ uint16_t m_wMinute = 0;
bool m_bIsMeta = false, m_bWindowCascaded = false, m_bNoActivate = false;
public:
diff --git a/src/core/stdmsg/src/tabs.cpp b/src/core/stdmsg/src/tabs.cpp index 18df3dee7f..2a88e29ba1 100644 --- a/src/core/stdmsg/src/tabs.cpp +++ b/src/core/stdmsg/src/tabs.cpp @@ -597,7 +597,7 @@ INT_PTR CTabbedWindow::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) TranslateMenu(hSubMenu); if (si != nullptr) { - WORD w = db_get_w(si->hContact, si->pszModule, "TabPosition", 0); + uint16_t w = db_get_w(si->hContact, si->pszModule, "TabPosition", 0); if (w == 0) CheckMenuItem(hSubMenu, ID_LOCKPOSITION, MF_BYCOMMAND | MF_UNCHECKED); else @@ -614,7 +614,7 @@ INT_PTR CTabbedWindow::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) if (si != nullptr) { if (!(GetMenuState(hSubMenu, ID_LOCKPOSITION, MF_BYCOMMAND)&MF_CHECKED)) { if (si->hContact) - db_set_w(si->hContact, si->pszModule, "TabPosition", (WORD)(i + 1)); + db_set_w(si->hContact, si->pszModule, "TabPosition", (uint16_t)(i + 1)); } else db_unset(si->hContact, si->pszModule, "TabPosition"); } diff --git a/src/core/stdpopup/src/services.cpp b/src/core/stdpopup/src/services.cpp index 52bdcd5dbc..e6a1be8e7b 100644 --- a/src/core/stdpopup/src/services.cpp +++ b/src/core/stdpopup/src/services.cpp @@ -304,7 +304,7 @@ static INT_PTR RegisterPopupClass(WPARAM, LPARAM lParam) char setting[256]; mir_snprintf(setting, "%s/Timeout", pc->pszName); pc->iSeconds = g_plugin.getWord(setting, pc->iSeconds); - if (pc->iSeconds == (WORD)-1) pc->iSeconds = -1; + if (pc->iSeconds == (uint16_t)-1) pc->iSeconds = -1; mir_snprintf(setting, "%s/TextCol", pc->pszName); pc->colorText = (COLORREF)g_plugin.getDword(setting, (DWORD)pc->colorText); mir_snprintf(setting, "%s/BgCol", pc->pszName); diff --git a/src/core/stduserinfo/src/stdinfo.cpp b/src/core/stduserinfo/src/stdinfo.cpp index e6c28b3828..e93a697c24 100644 --- a/src/core/stduserinfo/src/stdinfo.cpp +++ b/src/core/stduserinfo/src/stdinfo.cpp @@ -121,8 +121,8 @@ static void SetValue(HWND hwndDlg, int idCtrl, MCONTACT hContact, char *szModule case DBVT_WORD:
if (special == SVS_COUNTRY) {
- WORD wSave = dbv.wVal;
- if (wSave == (WORD)-1) {
+ uint16_t wSave = dbv.wVal;
+ if (wSave == (uint16_t)-1) {
char szSettingName[100];
mir_snprintf(szSettingName, "%sName", szSetting);
if (!db_get_ws(hContact, szModule, szSettingName, &dbv)) {
diff --git a/src/core/stduseronline/src/useronline.cpp b/src/core/stduseronline/src/useronline.cpp index ae2d1221bd..173269f7f4 100644 --- a/src/core/stduseronline/src/useronline.cpp +++ b/src/core/stduseronline/src/useronline.cpp @@ -34,7 +34,7 @@ static int UserOnlineSettingChanged(WPARAM hContact, LPARAM lParam) int newStatus = cws->value.wVal;
int oldStatus = g_plugin.getWord(hContact, "OldStatus", ID_STATUS_OFFLINE);
- g_plugin.setWord(hContact, "OldStatus", (WORD)newStatus);
+ g_plugin.setWord(hContact, "OldStatus", (uint16_t)newStatus);
if (Ignore_IsIgnored(hContact, IGNOREEVENT_USERONLINE)) return 0;
if (Contact_IsHidden(hContact)) return 0;
if (newStatus == ID_STATUS_OFFLINE && oldStatus != ID_STATUS_OFFLINE) {
|