summaryrefslogtreecommitdiff
path: root/plugins/Scriver
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-12-26 16:39:04 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-12-26 16:39:04 +0300
commit62a186697df33c96dc1a6dac0f4dfc38652fb96f (patch)
tree1437d0906218fae8827aed384026f2b7e656f4ac /plugins/Scriver
parentfcbb395dc7ff3edab972b6d4b27dbbfb3305f5d7 (diff)
BYTE -> uint8_t
Diffstat (limited to 'plugins/Scriver')
-rw-r--r--plugins/Scriver/src/chat_options.cpp16
-rw-r--r--plugins/Scriver/src/infobar.cpp2
-rw-r--r--plugins/Scriver/src/msgoptions.cpp4
-rw-r--r--plugins/Scriver/src/msgutils.cpp4
-rw-r--r--plugins/Scriver/src/stdafx.h16
-rw-r--r--plugins/Scriver/src/tabs.cpp6
6 files changed, 24 insertions, 24 deletions
diff --git a/plugins/Scriver/src/chat_options.cpp b/plugins/Scriver/src/chat_options.cpp
index b84b34ab5a..cfb17740ce 100644
--- a/plugins/Scriver/src/chat_options.cpp
+++ b/plugins/Scriver/src/chat_options.cpp
@@ -30,7 +30,7 @@ struct branch_t
wchar_t *szDescr;
char *szDBName;
int iMode;
- BYTE bDefault;
+ uint8_t bDefault;
HTREEITEM hItem;
};
@@ -100,7 +100,7 @@ static void SaveBranch(HWND hwndTree, struct branch_t *branch, int nValues)
for (int i = 0; i < nValues; i++) {
tvi.hItem = branch[i].hItem;
TreeView_GetItem(hwndTree, &tvi);
- BYTE bChecked = ((tvi.state&TVIS_STATEIMAGEMASK) >> 12 == 1) ? 0 : 1;
+ uint8_t bChecked = ((tvi.state&TVIS_STATEIMAGEMASK) >> 12 == 1) ? 0 : 1;
if (branch[i].iMode) {
if (bChecked)
iState |= branch[i].iMode;
@@ -256,7 +256,7 @@ static INT_PTR CALLBACK DlgProcOptions1(HWND hwndDlg, UINT uMsg, WPARAM wParam,
iLen = SendDlgItemMessage(hwndDlg, IDC_CHAT_SPIN2, UDM_GETPOS, 0, 0);
if (iLen > 0)
- db_set_b(0, CHAT_MODULE, "NicklistRowDist", (BYTE)iLen);
+ db_set_b(0, CHAT_MODULE, "NicklistRowDist", (uint8_t)iLen);
else
db_unset(0, CHAT_MODULE, "NicklistRowDist");
SaveBranch(GetDlgItem(hwndDlg, IDC_CHAT_CHECKBOXES), branch1, _countof(branch1));
@@ -266,7 +266,7 @@ static INT_PTR CALLBACK DlgProcOptions1(HWND hwndDlg, UINT uMsg, WPARAM wParam,
break;
case WM_DESTROY:
- BYTE b = TreeView_GetItemState(GetDlgItem(hwndDlg, IDC_CHAT_CHECKBOXES), hListHeading1, TVIS_EXPANDED)&TVIS_EXPANDED ? 1 : 0;
+ uint8_t b = TreeView_GetItemState(GetDlgItem(hwndDlg, IDC_CHAT_CHECKBOXES), hListHeading1, TVIS_EXPANDED)&TVIS_EXPANDED ? 1 : 0;
db_set_b(0, CHAT_MODULE, "Branch1Exp", b);
break;
}
@@ -509,10 +509,10 @@ static INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam,
else db_unset(0, CHAT_MODULE, "HeaderOutgoing");
g_Settings.bHighlightEnabled = IsDlgButtonChecked(hwndDlg, IDC_CHAT_HIGHLIGHT) == BST_CHECKED ? TRUE : FALSE;
- db_set_b(0, CHAT_MODULE, "HighlightEnabled", (BYTE)g_Settings.bHighlightEnabled);
+ db_set_b(0, CHAT_MODULE, "HighlightEnabled", (uint8_t)g_Settings.bHighlightEnabled);
g_Settings.bLoggingEnabled = IsDlgButtonChecked(hwndDlg, IDC_CHAT_LOGGING) == BST_CHECKED ? TRUE : FALSE;
- db_set_b(0, CHAT_MODULE, "LoggingEnabled", (BYTE)g_Settings.bLoggingEnabled);
+ db_set_b(0, CHAT_MODULE, "LoggingEnabled", (uint8_t)g_Settings.bLoggingEnabled);
iLen = SendDlgItemMessage(hwndDlg, IDC_CHAT_SPIN2, UDM_GETPOS, 0, 0);
db_set_w(0, CHAT_MODULE, "LogLimit", (WORD)iLen);
@@ -547,7 +547,7 @@ static INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam,
hPathTip = nullptr;
}
- BYTE b = TreeView_GetItemState(GetDlgItem(hwndDlg, IDC_CHAT_CHECKBOXES), hListHeading2, TVIS_EXPANDED) & TVIS_EXPANDED ? 1 : 0;
+ uint8_t b = TreeView_GetItemState(GetDlgItem(hwndDlg, IDC_CHAT_CHECKBOXES), hListHeading2, TVIS_EXPANDED) & TVIS_EXPANDED ? 1 : 0;
db_set_b(0, CHAT_MODULE, "Branch2Exp", b);
break;
}
@@ -607,7 +607,7 @@ static INT_PTR CALLBACK DlgProcOptionsPopup(HWND hwndDlg, UINT uMsg, WPARAM wPar
iLen = 1;
g_Settings.iPopupStyle = iLen;
- db_set_b(0, CHAT_MODULE, "PopupStyle", (BYTE)iLen);
+ db_set_b(0, CHAT_MODULE, "PopupStyle", (uint8_t)iLen);
iLen = SendDlgItemMessage(hwndDlg, IDC_CHAT_SPIN1, UDM_GETPOS, 0, 0);
g_Settings.iPopupTimeout = iLen;
diff --git a/plugins/Scriver/src/infobar.cpp b/plugins/Scriver/src/infobar.cpp
index 2fb79a8d5c..1d1fda210b 100644
--- a/plugins/Scriver/src/infobar.cpp
+++ b/plugins/Scriver/src/infobar.cpp
@@ -72,7 +72,7 @@ void CMsgDialog::RefreshInfobar()
ptrW szXStatusMsg(db_get_wsa(m_hContact, m_szProto, "XStatusMsg"));
HICON hIcon = nullptr;
- BYTE bXStatus = db_get_b(m_hContact, m_szProto, "XStatusId", 0);
+ uint8_t bXStatus = db_get_b(m_hContact, m_szProto, "XStatusId", 0);
if (bXStatus > 0)
hIcon = (HICON)CallProtoService(m_szProto, PS_GETCUSTOMSTATUSICON, bXStatus, 0);
diff --git a/plugins/Scriver/src/msgoptions.cpp b/plugins/Scriver/src/msgoptions.cpp
index b095ef49ee..04aff9202f 100644
--- a/plugins/Scriver/src/msgoptions.cpp
+++ b/plugins/Scriver/src/msgoptions.cpp
@@ -31,7 +31,7 @@ struct
const wchar_t *szDescr;
COLORREF defColour;
const wchar_t *szDefFace;
- BYTE defStyle;
+ uint8_t defStyle;
char defSize;
const wchar_t *szBkgName;
}
@@ -769,7 +769,7 @@ public:
void onRebuildClist(CCtrlClc *)
{
- BYTE defType = g_plugin.bTypingNew;
+ uint8_t defType = g_plugin.bTypingNew;
if (hItemNew && defType)
m_list.SetCheck(hItemNew, 1);
diff --git a/plugins/Scriver/src/msgutils.cpp b/plugins/Scriver/src/msgutils.cpp
index 3f2111f646..6764ff9598 100644
--- a/plugins/Scriver/src/msgutils.cpp
+++ b/plugins/Scriver/src/msgutils.cpp
@@ -300,8 +300,8 @@ void CMsgDialog::StopMessageSending()
void CMsgDialog::SwitchTyping()
{
if (IsTypingNotificationSupported()) {
- BYTE typingNotify = (g_plugin.getByte(m_hContact, SRMSGSET_TYPING, g_plugin.bTypingNew));
- g_plugin.setByte(m_hContact, SRMSGSET_TYPING, (BYTE)!typingNotify);
+ uint8_t typingNotify = (g_plugin.getByte(m_hContact, SRMSGSET_TYPING, g_plugin.bTypingNew));
+ g_plugin.setByte(m_hContact, SRMSGSET_TYPING, (uint8_t)!typingNotify);
Srmm_SetIconFlags(m_hContact, SRMM_MODULE, 1, typingNotify ? MBF_DISABLED : 0);
}
}
diff --git a/plugins/Scriver/src/stdafx.h b/plugins/Scriver/src/stdafx.h
index b439a70149..93afc9f910 100644
--- a/plugins/Scriver/src/stdafx.h
+++ b/plugins/Scriver/src/stdafx.h
@@ -71,14 +71,14 @@ struct CMPlugin : public PLUGIN<CMPlugin>
{
HANDLE hLogger;
- CMOption<BYTE> bSavePerContact, bCascade, bStayMinimized, bAutoMin, bSaveDrafts, bDelTemp, bHideContainer, bAutoPopup;
- CMOption<BYTE> bUseTransparency, bTopmost, bAutoClose, bTypingNew, bTypingUnknown;
- CMOption<BYTE> bShowTitleBar, bShowStatusBar, bShowToolBar, bShowInfoBar;
- CMOption<BYTE> bShowAvatar, bShowProgress, bShowIcons, bShowTime, bShowSeconds, bShowDate, bLongDate, bRelativeDate;
- CMOption<BYTE> bGroupMessages, bMarkFollowups, bMsgOnNewline, bDrawLines, bHideNames, bIndentText;
- CMOption<BYTE> bUseTabs, bLimitTabs, bLimitChatTabs, bLimitNames, bSeparateChats, bTabCloseButton, bHideOneTab, bTabsAtBottom, bSwitchToActive;
- CMOption<BYTE> bShowTyping, bShowTypingWin, bShowTypingTray, bShowTypingClist, bShowTypingSwitch;
- CMOption<BYTE> iFlashCount, iHistoryMode;
+ CMOption<uint8_t> bSavePerContact, bCascade, bStayMinimized, bAutoMin, bSaveDrafts, bDelTemp, bHideContainer, bAutoPopup;
+ CMOption<uint8_t> bUseTransparency, bTopmost, bAutoClose, bTypingNew, bTypingUnknown;
+ CMOption<uint8_t> bShowTitleBar, bShowStatusBar, bShowToolBar, bShowInfoBar;
+ CMOption<uint8_t> bShowAvatar, bShowProgress, bShowIcons, bShowTime, bShowSeconds, bShowDate, bLongDate, bRelativeDate;
+ CMOption<uint8_t> bGroupMessages, bMarkFollowups, bMsgOnNewline, bDrawLines, bHideNames, bIndentText;
+ CMOption<uint8_t> bUseTabs, bLimitTabs, bLimitChatTabs, bLimitNames, bSeparateChats, bTabCloseButton, bHideOneTab, bTabsAtBottom, bSwitchToActive;
+ CMOption<uint8_t> bShowTyping, bShowTypingWin, bShowTypingTray, bShowTypingClist, bShowTypingSwitch;
+ CMOption<uint8_t> iFlashCount, iHistoryMode;
CMOption<WORD> iLimitNames, iLimitTabs, iLimitChatTabs, iLoadCount, iLoadTime, iIndentSize, iAutoResizeLines;
CMOption<DWORD> iPopFlags, iMsgTimeout, iActiveAlpha, iInactiveAlpha;
diff --git a/plugins/Scriver/src/tabs.cpp b/plugins/Scriver/src/tabs.cpp
index e50c07cff4..2a138e80ee 100644
--- a/plugins/Scriver/src/tabs.cpp
+++ b/plugins/Scriver/src/tabs.cpp
@@ -342,7 +342,7 @@ void ParentWindowData::SetContainerWindowStyle()
ws |= flags2.bUseTransparency ? WS_EX_LAYERED : 0;
SetWindowLongPtr(m_hwnd, GWL_EXSTYLE, ws);
if (flags2.bUseTransparency)
- SetLayeredWindowAttributes(m_hwnd, RGB(255, 255, 255), (BYTE)(255 - g_dat.inactiveAlpha), LWA_ALPHA);
+ SetLayeredWindowAttributes(m_hwnd, RGB(255, 255, 255), (uint8_t)(255 - g_dat.inactiveAlpha), LWA_ALPHA);
ws = GetWindowLongPtr(m_hwndTabs, GWL_STYLE) & ~(TCS_BOTTOM | 0x2000);
if (flags2.bTabsAtBottom)
@@ -1034,7 +1034,7 @@ static INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wPara
ws |= dat->flags2.bUseTransparency ? WS_EX_LAYERED : 0;
SetWindowLongPtr(hwndDlg, GWL_EXSTYLE, ws);
if (dat->flags2.bUseTransparency)
- SetLayeredWindowAttributes(hwndDlg, RGB(255, 255, 255), (BYTE)(255 - g_dat.inactiveAlpha), LWA_ALPHA);
+ SetLayeredWindowAttributes(hwndDlg, RGB(255, 255, 255), (uint8_t)(255 - g_dat.inactiveAlpha), LWA_ALPHA);
break;
}
if (dat->m_hwndActive != nullptr) {
@@ -1053,7 +1053,7 @@ static INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wPara
SetWindowLongPtr(hwndDlg, GWL_EXSTYLE, ws);
}
if (dat->flags2.bUseTransparency)
- SetLayeredWindowAttributes(hwndDlg, RGB(255, 255, 255), (BYTE)(255 - g_dat.activeAlpha), LWA_ALPHA);
+ SetLayeredWindowAttributes(hwndDlg, RGB(255, 255, 255), (uint8_t)(255 - g_dat.activeAlpha), LWA_ALPHA);
break;
case WM_LBUTTONDOWN: