summaryrefslogtreecommitdiff
path: root/plugins/QuickMessages
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/QuickMessages
parentfcbb395dc7ff3edab972b6d4b27dbbfb3305f5d7 (diff)
BYTE -> uint8_t
Diffstat (limited to 'plugins/QuickMessages')
-rw-r--r--plugins/QuickMessages/src/Utils.cpp6
-rw-r--r--plugins/QuickMessages/src/Utils.h20
-rw-r--r--plugins/QuickMessages/src/options.cpp14
3 files changed, 20 insertions, 20 deletions
diff --git a/plugins/QuickMessages/src/Utils.cpp b/plugins/QuickMessages/src/Utils.cpp
index 0305c08ebf..47f50d34b5 100644
--- a/plugins/QuickMessages/src/Utils.cpp
+++ b/plugins/QuickMessages/src/Utils.cpp
@@ -201,7 +201,7 @@ void CleanSettings(int buttonnum, int from)
db_free(&dbv);
}
-BYTE getEntryByte(int buttonnum, int entrynum, BOOL mode)
+uint8_t getEntryByte(int buttonnum, int entrynum, BOOL mode)
{
char szMEntry[256] = { '\0' };
@@ -270,7 +270,7 @@ void InitButtonsList()
ListData* ld = nullptr;
if (!(pszBName = getMenuEntry(i, 0, 3))) {
g_iButtonsCount = i;
- g_plugin.setByte("ButtonsCount", (BYTE)g_iButtonsCount);
+ g_plugin.setByte("ButtonsCount", (uint8_t)g_iButtonsCount);
break;
}
@@ -328,7 +328,7 @@ void DestructButtonsList()
}
}
-wchar_t* getMenuEntry(int buttonnum, int entrynum, BYTE mode)
+wchar_t* getMenuEntry(int buttonnum, int entrynum, uint8_t mode)
{
wchar_t* buffer = nullptr;
char szMEntry[256];
diff --git a/plugins/QuickMessages/src/Utils.h b/plugins/QuickMessages/src/Utils.h
index c06902ad44..872d6e0b15 100644
--- a/plugins/QuickMessages/src/Utils.h
+++ b/plugins/QuickMessages/src/Utils.h
@@ -30,12 +30,12 @@ typedef struct _tagButtonData
{
DWORD dwPos;
DWORD dwOPPos;
- BYTE fEntryType;
- BYTE fEntryOpType;
- BYTE bIsServName;
- BYTE bIsOpServName;
- BYTE bInQMenu;
- BYTE bOpInQMenu;
+ uint8_t fEntryType;
+ uint8_t fEntryOpType;
+ uint8_t bIsServName;
+ uint8_t bIsOpServName;
+ uint8_t bInQMenu;
+ uint8_t bOpInQMenu;
DWORD dwOPFlags;
wchar_t *pszName;
wchar_t *pszValue;
@@ -51,8 +51,8 @@ typedef struct _tagListData
wchar_t* ptszQValue;
wchar_t* ptszOPQValue;
wchar_t* ptszButtonName;
- BYTE bIsServName;
- BYTE bIsOpServName;
+ uint8_t bIsServName;
+ uint8_t bIsOpServName;
DWORD dwOPFlags;
}ListData;
@@ -60,7 +60,7 @@ typedef struct _tagQuickData
{
DWORD dwPos;
BOOL bIsService;
- BYTE fEntryType;
+ uint8_t fEntryType;
wchar_t* ptszValue;
wchar_t* ptszValueName;
}QuickData;
@@ -71,7 +71,7 @@ int sstSortButtons(const void * vmtbi1, const void * vmtbi2);
int sstOpSortButtons(const void * vmtbi1, const void * vmtbi2);
int sstQuickSortButtons(const void * vmtbi1, const void * vmtbi2);
void li_ZeroQuickList(SortedList *pList);
-wchar_t* getMenuEntry(int entrynum,int buttonnum,BYTE mode) ;
+wchar_t* getMenuEntry(int entrynum,int buttonnum,uint8_t mode) ;
int RegisterCustomButton(WPARAM wParam,LPARAM lParam);
void RemoveMenuEntryNode(SortedList *pList, int index);
void DestroyButton(int listnum);
diff --git a/plugins/QuickMessages/src/options.cpp b/plugins/QuickMessages/src/options.cpp
index ae950639ab..35bb822645 100644
--- a/plugins/QuickMessages/src/options.cpp
+++ b/plugins/QuickMessages/src/options.cpp
@@ -314,7 +314,7 @@ void SaveMenuTree()
iBl++;
}
- g_plugin.setByte("ButtonsCount", (BYTE)g_iButtonsCount);
+ g_plugin.setByte("ButtonsCount", (uint8_t)g_iButtonsCount);
}
void RestoreModuleData()
@@ -567,7 +567,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam)
ButtonData* bd = nullptr;
TVITEM tvi;
RECT rc;
- BYTE height;
+ uint8_t height;
BOOLEAN bAsChild = FALSE;
TreeView_SetInsertMark(hMenuTree, NULL, 0);
@@ -601,7 +601,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam)
drag = 0;
break;
}
- height = (BYTE)(rc.bottom - rc.top);
+ height = (uint8_t)(rc.bottom - rc.top);
if (hti.pt.y - (height / 3) < rc.top) {
HTREEITEM hItem = hti.hItem;
@@ -655,7 +655,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam)
if (hti.flags & (TVHT_ONITEM | TVHT_ONITEMRIGHT)) {
RECT rc;
if (TreeView_GetItemRect(hMenuTree, hti.hItem, &rc, FALSE)) {
- BYTE height = (BYTE)(rc.bottom - rc.top);
+ uint8_t height = (uint8_t)(rc.bottom - rc.top);
if (hti.pt.y - (height / 3) < rc.top) {
SetCursor(LoadCursor(nullptr, IDC_ARROW));
@@ -694,9 +694,9 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam)
SetMenuEntryProperties(hdlg);
SaveMenuTree();
}
- g_plugin.setByte("RClickAuto", (BYTE)(g_bRClickAuto = IsDlgButtonChecked(hdlg, IDC_RAUTOSEND)));
- g_plugin.setByte("LClickAuto", (BYTE)(g_bLClickAuto = IsDlgButtonChecked(hdlg, IDC_LAUTOSEND)));
- g_plugin.setByte("QuickMenu", (BYTE)(g_bQuickMenu = IsDlgButtonChecked(hdlg, IDC_ENABLEQUICKMENU)));
+ g_plugin.setByte("RClickAuto", (uint8_t)(g_bRClickAuto = IsDlgButtonChecked(hdlg, IDC_RAUTOSEND)));
+ g_plugin.setByte("LClickAuto", (uint8_t)(g_bLClickAuto = IsDlgButtonChecked(hdlg, IDC_LAUTOSEND)));
+ g_plugin.setByte("QuickMenu", (uint8_t)(g_bQuickMenu = IsDlgButtonChecked(hdlg, IDC_ENABLEQUICKMENU)));
return 1;
}
else if (((LPNMHDR)lparam)->code == PSN_RESET) {