summaryrefslogtreecommitdiff
path: root/src/mir_app
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-03-08 16:57:24 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-03-08 16:57:24 +0300
commit43177ef97c1421502b5a2be9b8b62a6809fb29bf (patch)
treeb2f27ba9258583afbf4633ef5736bc876bbc4111 /src/mir_app
parent7b19b6715a75c52e0285ee2031a8fa2ddace1da7 (diff)
cosmetic code cleaning
Diffstat (limited to 'src/mir_app')
-rw-r--r--src/mir_app/src/chat_manager.cpp2
-rw-r--r--src/mir_app/src/chat_svc.cpp8
-rw-r--r--src/mir_app/src/chat_tools.cpp10
-rw-r--r--src/mir_app/src/colorchooser.cpp4
4 files changed, 12 insertions, 12 deletions
diff --git a/src/mir_app/src/chat_manager.cpp b/src/mir_app/src/chat_manager.cpp
index e98e0cbe87..9c373c376a 100644
--- a/src/mir_app/src/chat_manager.cpp
+++ b/src/mir_app/src/chat_manager.cpp
@@ -161,7 +161,7 @@ BOOL SM_SetOffline(const wchar_t *pszID, const char *pszModule)
si->pMe = NULL;
si->nUsersInNicklist = 0;
if (si->iType != GCW_SERVER)
- si->bInitDone = FALSE;
+ si->bInitDone = false;
if (chatApi.OnOfflineSession)
chatApi.OnOfflineSession(si);
if (pszID)
diff --git a/src/mir_app/src/chat_svc.cpp b/src/mir_app/src/chat_svc.cpp
index 3d8317e20f..2d8dc7cb24 100644
--- a/src/mir_app/src/chat_svc.cpp
+++ b/src/mir_app/src/chat_svc.cpp
@@ -235,17 +235,17 @@ EXTERN_C MIR_APP_DLL(GCSessionInfoBase*) Chat_NewSession(
si->iType = iType;
si->ptszName = mir_wstrdup(ptszName);
si->iLogFilterFlags = db_get_dw(NULL, CHAT_MODULE, "FilterFlags", 0x03E0);
- si->bFilterEnabled = db_get_b(NULL, CHAT_MODULE, "FilterEnabled", 0);
- si->bNicklistEnabled = db_get_b(NULL, CHAT_MODULE, "ShowNicklist", 1);
+ si->bFilterEnabled = db_get_b(NULL, CHAT_MODULE, "FilterEnabled", 0) != 0;
+ si->bNicklistEnabled = db_get_b(NULL, CHAT_MODULE, "ShowNicklist", 1) != 0;
si->currentHovered = -1;
if (mi->bColor) {
si->iFG = 4;
- si->bFGSet = TRUE;
+ si->bFGSet = true;
}
if (mi->bBkgColor) {
si->iBG = 2;
- si->bBGSet = TRUE;
+ si->bBGSet = true;
}
wchar_t szTemp[256];
diff --git a/src/mir_app/src/chat_tools.cpp b/src/mir_app/src/chat_tools.cpp
index 5dc9bd26f2..39ad6f98a4 100644
--- a/src/mir_app/src/chat_tools.cpp
+++ b/src/mir_app/src/chat_tools.cpp
@@ -868,7 +868,7 @@ static void CALLBACK ChatTimerProc(HWND hwnd, UINT, UINT_PTR idEvent, DWORD)
CLCINFOTIP ti = { sizeof(ti) };
if (CallService("mToolTip/ShowTipW", (WPARAM)tszBuf, (LPARAM)&ti))
- si->isToolTip = TRUE;
+ si->bHasToolTip = true;
}
KillTimer(hwnd, idEvent);
}
@@ -894,9 +894,9 @@ MIR_APP_DLL(void) Chat_HoverMouse(SESSION_INFO *si, HWND hwnd, LPARAM lParam, bo
KillTimer(hwnd, 1);
- if (si->isToolTip) {
+ if (si->bHasToolTip) {
CallService("mToolTip/HideTip", 0, 0);
- si->isToolTip = FALSE;
+ si->bHasToolTip = false;
}
if (nItemUnderMouse != -1)
@@ -907,9 +907,9 @@ MIR_APP_DLL(void) Chat_HoverMouse(SESSION_INFO *si, HWND hwnd, LPARAM lParam, bo
else {
if (bUseToolTip) {
KillTimer(hwnd, 1);
- if (si->isToolTip) {
+ if (si->bHasToolTip) {
CallService("mToolTip/HideTip", 0, 0);
- si->isToolTip = FALSE;
+ si->bHasToolTip = false;
}
}
else ProcessNickListHovering(hwnd, -1, NULL);
diff --git a/src/mir_app/src/colorchooser.cpp b/src/mir_app/src/colorchooser.cpp
index f885658b8a..b33d296a81 100644
--- a/src/mir_app/src/colorchooser.cpp
+++ b/src/mir_app/src/colorchooser.cpp
@@ -140,7 +140,7 @@ public:
int ctrlId = GetDlgCtrlID(m_hwndChooser);
if (m_bForeground) {
- m_si->bFGSet = TRUE;
+ m_si->bFGSet = true;
m_si->iFG = iCurrentHotTrack;
if (IsDlgButtonChecked(hWindow, ctrlId)) {
cf.dwMask = CFM_COLOR;
@@ -149,7 +149,7 @@ public:
}
}
else {
- m_si->bBGSet = TRUE;
+ m_si->bBGSet = true;
m_si->iBG = iCurrentHotTrack;
if (IsDlgButtonChecked(hWindow, ctrlId)) {
cf.dwMask = CFM_BACKCOLOR;