summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/TabSRMM/src/TSButton.cpp4
-rw-r--r--plugins/TabSRMM/src/chat/chat.h2
-rw-r--r--plugins/TabSRMM/src/chat/log.cpp8
-rw-r--r--plugins/TabSRMM/src/chat/options.cpp83
-rw-r--r--plugins/TabSRMM/src/chat/window.cpp46
-rw-r--r--plugins/TabSRMM/src/mim.h5
-rw-r--r--plugins/TabSRMM/src/msgdialog.cpp8
-rw-r--r--plugins/TabSRMM/src/msgdlgutils.cpp2
-rw-r--r--plugins/TabSRMM/src/tabctrl.cpp2
-rw-r--r--plugins/TabSRMM/src/templates.cpp2
10 files changed, 83 insertions, 79 deletions
diff --git a/plugins/TabSRMM/src/TSButton.cpp b/plugins/TabSRMM/src/TSButton.cpp
index fc8a8df426..c6a68d6877 100644
--- a/plugins/TabSRMM/src/TSButton.cpp
+++ b/plugins/TabSRMM/src/TSButton.cpp
@@ -642,7 +642,7 @@ static LRESULT CALLBACK TSButtonWndProc(HWND hwndDlg, UINT msg, WPARAM wParam,
if (bct->sitem) {
if (bct->sitem->testCloseButton() != -1)
- return(TRUE);
+ return TRUE;
bct->stateId = PBS_PRESSED;
InvalidateRect(bct->hwnd, NULL, TRUE);
bct->sitem->activateSession();
@@ -671,7 +671,7 @@ static LRESULT CALLBACK TSButtonWndProc(HWND hwndDlg, UINT msg, WPARAM wParam,
if (bct->sitem) {
if (bct->sitem->testCloseButton() != -1) {
SendMessage(bct->sitem->getDat()->hwnd, WM_CLOSE, 1, 0);
- return(TRUE);
+ return TRUE;
}
}
if (bct->pushBtn) {
diff --git a/plugins/TabSRMM/src/chat/chat.h b/plugins/TabSRMM/src/chat/chat.h
index 90d9e6446f..316ca997e6 100644
--- a/plugins/TabSRMM/src/chat/chat.h
+++ b/plugins/TabSRMM/src/chat/chat.h
@@ -244,7 +244,7 @@ struct TMUCSettings
bool bShowTime, bShowTimeIfChanged, bLoggingEnabled;
bool bFlashWindow, bFlashWindowHightlight;
bool bOpenInDefault;
- bool bHighlightEnabled, LogIndentEnabled;
+ bool bHighlightEnabled, bLogIndentEnabled;
bool bStripFormat;
bool bBBCodeInPopups;
bool bTrayIconInactiveOnly;
diff --git a/plugins/TabSRMM/src/chat/log.cpp b/plugins/TabSRMM/src/chat/log.cpp
index 5674f68623..d5d6e8e8f5 100644
--- a/plugins/TabSRMM/src/chat/log.cpp
+++ b/plugins/TabSRMM/src/chat/log.cpp
@@ -846,7 +846,7 @@ static char* Log_CreateRTF(LOGSTREAMDATA *streamData)
char pszIndicator[3] = "\0\0";
int crNickIndex = 0;
//mad
- if (g_Settings.bLogClassicIndicators/*g_Settings.bClassicIndicators */||g_Settings.bColorizeNicksInLog) {
+ if (g_Settings.bLogClassicIndicators || g_Settings.bColorizeNicksInLog) {
USERINFO *ui = streamData->si->pUsers;
while (ui) {
if (!lstrcmp(ui->pszNick, lin->ptszNick)) {
@@ -885,8 +885,8 @@ static char* Log_CreateRTF(LOGSTREAMDATA *streamData)
}
Log_Append(&buffer, &bufferEnd, &bufferAlloced, "%s ", Log_SetStyle(lin->bIsMe ? 2 : 1, lin->bIsMe ? 2 : 1));
- //MAD
- if (g_Settings.bLogClassicIndicators /*g_Settings.bClassicIndicators*/)
+
+ if (g_Settings.bLogClassicIndicators)
Log_Append(&buffer, &bufferEnd, &bufferAlloced, "%s", pszIndicator);
lstrcpyn(pszTemp, lin->bIsMe ? g_Settings.pszOutgoingNick : g_Settings.pszIncomingNick, 299);
@@ -1233,7 +1233,7 @@ char * Log_CreateRtfHeader(MODULEINFO * mi)
if (g_Settings.bShowTime) {
int iSize = (g_Settings.LogTextIndent * 1440) / logPixelSX;
Log_Append(&buffer, &bufferEnd, &bufferAlloced, "\\tx%u", iIndent + iSize);
- if (g_Settings.LogIndentEnabled)
+ if (g_Settings.bLogIndentEnabled)
iIndent += iSize;
}
Log_Append(&buffer, &bufferEnd, &bufferAlloced, "\\fi-%u\\li%u", iIndent, iIndent);
diff --git a/plugins/TabSRMM/src/chat/options.cpp b/plugins/TabSRMM/src/chat/options.cpp
index 506388355e..b1e88ead66 100644
--- a/plugins/TabSRMM/src/chat/options.cpp
+++ b/plugins/TabSRMM/src/chat/options.cpp
@@ -833,7 +833,7 @@ int FontServiceFontsChanged(WPARAM,LPARAM)
DeleteObject(hFont);
g_Settings.LogTextIndent = iText;
g_Settings.LogTextIndent = g_Settings.LogTextIndent * 12 / 10;
- g_Settings.LogIndentEnabled = (M.GetByte("Chat", "LogIndentEnabled", 1) != 0);
+ g_Settings.bLogIndentEnabled = M.GetBool("Chat", "LogIndentEnabled", true);
LoadGlobalSettings();
MM_FontsChanged();
@@ -876,11 +876,11 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
SetDlgItemText(hwndDlg, IDC_INSTAMP, g_Settings.pszIncomingNick);
CheckDlgButton(hwndDlg, IDC_LOGGING, g_Settings.bLoggingEnabled);
SetDlgItemText(hwndDlg, IDC_LOGDIRECTORY, g_Settings.pszLogDir);
- Utils::enableDlgControl(hwndDlg, IDC_LOGDIRECTORY, g_Settings.bLoggingEnabled ? TRUE : FALSE);
- Utils::enableDlgControl(hwndDlg, IDC_FONTCHOOSE, g_Settings.bLoggingEnabled ? TRUE : FALSE);
+ Utils::enableDlgControl(hwndDlg, IDC_LOGDIRECTORY, g_Settings.bLoggingEnabled);
+ Utils::enableDlgControl(hwndDlg, IDC_FONTCHOOSE, g_Settings.bLoggingEnabled);
SendDlgItemMessage(hwndDlg, IDC_CHAT_SPIN4, UDM_SETRANGE, 0, MAKELONG(10000, 0));
SendDlgItemMessage(hwndDlg, IDC_CHAT_SPIN4, UDM_SETPOS, 0, MAKELONG(db_get_w(NULL, "Chat", "LoggingLimit", 100), 0));
- Utils::enableDlgControl(hwndDlg, IDC_LIMIT, g_Settings.bLoggingEnabled ? TRUE : FALSE);
+ Utils::enableDlgControl(hwndDlg, IDC_LIMIT, g_Settings.bLoggingEnabled);
if (ServiceExists(MS_UTILS_REPLACEVARS)) {
TCHAR tszTooltipText[2048];
@@ -1028,22 +1028,21 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
case WM_NOTIFY:
if (((LPNMHDR)lParam)->idFrom == 0 && ((LPNMHDR)lParam)->code == PSN_APPLY) {
- int iLen;
TCHAR *p2 = NULL;
char *pszText = NULL;
TCHAR *ptszPath = NULL;
if (PluginConfig.m_chat_enabled) {
-
- iLen = GetWindowTextLength(GetDlgItem(hwndDlg, IDC_LOGDIRECTORY));
+ int iLen = GetWindowTextLength(GetDlgItem(hwndDlg, IDC_LOGDIRECTORY));
if (iLen > 0) {
TCHAR *pszText1 = (TCHAR *)malloc(iLen*sizeof(TCHAR) + 2);
GetDlgItemText(hwndDlg, IDC_LOGDIRECTORY, pszText1, iLen + 1);
db_set_ts(NULL, "Chat", "LogDirectory", pszText1);
free(pszText1);
- g_Settings.bLoggingEnabled = IsDlgButtonChecked(hwndDlg, IDC_LOGGING) == BST_CHECKED ? TRUE : FALSE;
- db_set_b(0, "Chat", "LoggingEnabled", (BYTE)g_Settings.bLoggingEnabled);
- } else {
+ g_Settings.bLoggingEnabled = IsDlgButtonChecked(hwndDlg, IDC_LOGGING) == BST_CHECKED;
+ db_set_b(0, "Chat", "LoggingEnabled", g_Settings.bLoggingEnabled);
+ }
+ else {
db_unset(NULL, "Chat", "LogDirectory");
db_set_b(0, "Chat", "LoggingEnabled", 0);
}
@@ -1108,7 +1107,7 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
DeleteObject(hFont);
g_Settings.LogTextIndent = iText;
g_Settings.LogTextIndent = g_Settings.LogTextIndent * 12 / 10;
- g_Settings.LogIndentEnabled = (M.GetByte("Chat", "LogIndentEnabled", 1) != 0);
+ g_Settings.bLogIndentEnabled = M.GetBool("Chat", "LogIndentEnabled", true);
LoadGlobalSettings();
MM_FontsChanged();
@@ -1246,50 +1245,50 @@ void LoadGlobalSettings(void)
LOGFONT lf;
char szBuf[40];
- g_Settings.bLogLimitNames = M.GetByte("Chat", "LogLimitNames", 1) != 0;
- g_Settings.bShowTime = M.GetByte("Chat", "ShowTimeStamp", 1) != 0;
- g_Settings.bShowTimeIfChanged = M.GetByte("Chat", "ShowTimeStampIfChanged", 0) != 0;
- g_Settings.bTimeStampEventColour = M.GetByte("Chat", "TimeStampEventColour", 0) != 0;
- g_Settings.iEventLimit = db_get_w(NULL, "Chat", "LogLimit", 100) != 0;
+ g_Settings.bLogLimitNames = M.GetBool("Chat", "LogLimitNames", true);
+ g_Settings.bShowTime = M.GetBool("Chat", "ShowTimeStamp", true);
+ g_Settings.bShowTimeIfChanged = M.GetBool("Chat", "ShowTimeStampIfChanged", false);
+ g_Settings.bTimeStampEventColour = M.GetBool("Chat", "TimeStampEventColour", false);
+ g_Settings.iEventLimit = db_get_w(NULL, "Chat", "LogLimit", 100);
g_Settings.iEventLimitThreshold = db_get_w(NULL, "Chat", "LogLimitThreshold", 20);
g_Settings.dwIconFlags = M.GetDword("Chat", "IconFlags", 0x0000);
g_Settings.LoggingLimit = (size_t)db_get_w(NULL, "Chat", "LoggingLimit", 100);
- g_Settings.bLoggingEnabled = M.GetByte("Chat", "LoggingEnabled", 0) != 0;
- g_Settings.bOpenInDefault = M.GetByte("Chat", "DefaultContainer", 1) != 0;
- g_Settings.bFlashWindow = M.GetByte("Chat", "FlashWindow", 0) != 0;
- g_Settings.bFlashWindowHightlight = M.GetByte("Chat", "FlashWindowHighlight", 0) != 0;
- g_Settings.bHighlightEnabled = M.GetByte("Chat", "HighlightEnabled", 1) != 0;
+ g_Settings.bLoggingEnabled = M.GetBool("Chat", "LoggingEnabled", false);
+ g_Settings.bOpenInDefault = M.GetBool("Chat", "DefaultContainer", true);
+ g_Settings.bFlashWindow = M.GetBool("Chat", "FlashWindow", false);
+ g_Settings.bFlashWindowHightlight = M.GetBool("Chat", "FlashWindowHighlight", false);
+ g_Settings.bHighlightEnabled = M.GetBool("Chat", "HighlightEnabled", true);
g_Settings.UserListColors[CHAT_STATUS_NORMAL] = M.GetDword(CHAT_FONTMODULE, "Font18Col", RGB(0, 0, 0));
g_Settings.UserListColors[CHAT_STATUS_AWAY] = M.GetDword(CHAT_FONTMODULE, "Font19Col", RGB(170, 170, 170));
g_Settings.UserListColors[CHAT_STATUS_OFFLINE] = M.GetDword(CHAT_FONTMODULE, "Font5Col", RGB(160, 90, 90));
g_Settings.crUserListBGColor = M.GetDword("Chat", "ColorNicklistBG", SRMSGDEFSET_BKGCOLOUR);
- g_Settings.bStripFormat = M.GetByte("Chat", "StripFormatting", 0) != 0;
- g_Settings.bTrayIconInactiveOnly = M.GetByte("Chat", "TrayIconInactiveOnly", 1) != 0;
+ g_Settings.bStripFormat = M.GetBool("Chat", "StripFormatting", false);
+ g_Settings.bTrayIconInactiveOnly = M.GetBool("Chat", "TrayIconInactiveOnly", true);
g_Settings.bBBCodeInPopups = M.GetByte("Chat", "BBCodeInPopups", 0) != 0;
- g_Settings.bAddColonToAutoComplete = M.GetByte("Chat", "AddColonToAutoComplete", 1) != 0;
+ g_Settings.bAddColonToAutoComplete = M.GetBool("Chat", "AddColonToAutoComplete", true);
g_Settings.iPopupStyle = M.GetByte("Chat", "PopupStyle", 1);
g_Settings.iPopupTimeout = db_get_w(NULL, "Chat", "PopupTimeout", 3);
g_Settings.crPUBkgColour = M.GetDword("Chat", "PopupColorBG", GetSysColor(COLOR_WINDOW));
g_Settings.crPUTextColour = M.GetDword("Chat", "PopupColorText", 0);
- g_Settings.bClassicIndicators = M.GetByte("Chat", "ClassicIndicators", 0) != 0;
+ g_Settings.bClassicIndicators = M.GetBool("Chat", "ClassicIndicators", false);
//MAD
- g_Settings.bLogClassicIndicators = M.GetByte("Chat", "LogClassicIndicators", 0) != 0;
- g_Settings.bAlternativeSorting = M.GetByte("Chat", "AlternativeSorting", 1) != 0;
- g_Settings.bAnnoyingHighlight = M.GetByte("Chat", "AnnoyingHighlight", 0) != 0;
- g_Settings.bCreateWindowOnHighlight = M.GetByte("Chat", "CreateWindowOnHighlight", 1) != 0;
+ g_Settings.bLogClassicIndicators = M.GetBool("Chat", "LogClassicIndicators", false);
+ g_Settings.bAlternativeSorting = M.GetBool("Chat", "AlternativeSorting", true);
+ g_Settings.bAnnoyingHighlight = M.GetBool("Chat", "AnnoyingHighlight", false);
+ g_Settings.bCreateWindowOnHighlight = M.GetBool("Chat", "CreateWindowOnHighlight", true);
//MAD_
- g_Settings.bLogSymbols = M.GetByte("Chat", "LogSymbols", 1) != 0;
- g_Settings.bClickableNicks = M.GetByte("Chat", "ClickableNicks", 1) != 0;
- g_Settings.bColorizeNicks = M.GetByte("Chat", "ColorizeNicks", 1) != 0;
- g_Settings.bColorizeNicksInLog = M.GetByte("Chat", "ColorizeNicksInLog", 1) != 0;
- g_Settings.bScaleIcons = M.GetByte("Chat", "ScaleIcons", 1) != 0;
- g_Settings.bUseDividers = M.GetByte("Chat", "UseDividers", 1) != 0;
- g_Settings.bDividersUsePopupConfig = M.GetByte("Chat", "DividersUsePopupConfig", 1) != 0;
- g_Settings.bMathMod = ServiceExists(MATH_RTF_REPLACE_FORMULAE) && M.GetByte("Chat", "MathModSupport", 0);
-
- g_Settings.bDoubleClick4Privat = M.GetByte("Chat", "DoubleClick4Privat", 0) != 0;
- g_Settings.bShowContactStatus = M.GetByte("Chat", "ShowContactStatus", 1) != 0;
- g_Settings.bContactStatusFirst = M.GetByte("Chat", "ContactStatusFirst", 0) != 0;
+ g_Settings.bLogSymbols = M.GetBool("Chat", "LogSymbols", true);
+ g_Settings.bClickableNicks = M.GetBool("Chat", "ClickableNicks", true);
+ g_Settings.bColorizeNicks = M.GetBool("Chat", "ColorizeNicks", true);
+ g_Settings.bColorizeNicksInLog = M.GetBool("Chat", "ColorizeNicksInLog", true);
+ g_Settings.bScaleIcons = M.GetBool("Chat", "ScaleIcons", true);
+ g_Settings.bUseDividers = M.GetBool("Chat", "UseDividers", true);
+ g_Settings.bDividersUsePopupConfig = M.GetBool("Chat", "DividersUsePopupConfig", true);
+ g_Settings.bMathMod = ServiceExists(MATH_RTF_REPLACE_FORMULAE) && M.GetBool("Chat", "MathModSupport", false);
+
+ g_Settings.bDoubleClick4Privat = M.GetBool("Chat", "DoubleClick4Privat", false);
+ g_Settings.bShowContactStatus = M.GetBool("Chat", "ShowContactStatus", true);
+ g_Settings.bContactStatusFirst = M.GetBool("Chat", "ContactStatusFirst", false);
if (hListBkgBrush)
DeleteObject(hListBkgBrush);
@@ -1310,7 +1309,7 @@ void LoadGlobalSettings(void)
g_Settings.pszLogDir[MAX_PATH - 1] = 0;
- g_Settings.LogIndentEnabled = (M.GetByte("Chat", "LogIndentEnabled", 1) != 0) ? TRUE : FALSE;
+ g_Settings.bLogIndentEnabled = M.GetBool("Chat", "LogIndentEnabled", true);
// nicklist
diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp
index 4d49121ce9..9da631a99f 100644
--- a/plugins/TabSRMM/src/chat/window.cpp
+++ b/plugins/TabSRMM/src/chat/window.cpp
@@ -2258,8 +2258,10 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
}
Log_StreamInEvent(hwndDlg, pLog, si, TRUE, FALSE);
mir_forkthread(phase2, si);
- } else Log_StreamInEvent(hwndDlg, si->pLogEnd, si, TRUE, FALSE);
- } else SendMessage(hwndDlg, GC_EVENT_CONTROL + WM_USER + 500, WINDOW_CLEARLOG, 0);
+ }
+ else Log_StreamInEvent(hwndDlg, si->pLogEnd, si, TRUE, FALSE);
+ }
+ else SendMessage(hwndDlg, GC_EVENT_CONTROL + WM_USER + 500, WINDOW_CLEARLOG, 0);
break;
case GC_REDRAWLOG2:
@@ -2274,27 +2276,27 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
Log_StreamInEvent(hwndDlg, si->pLogEnd, si, TRUE, TRUE);
break;
- case GC_ADDLOG: {
- BOOL fInactive = (GetForegroundWindow() != dat->pContainer->hwnd || GetActiveWindow() != dat->pContainer->hwnd);
+ case GC_ADDLOG:
+ {
+ bool fInactive = (GetForegroundWindow() != dat->pContainer->hwnd || GetActiveWindow() != dat->pContainer->hwnd);
- if (g_Settings.bUseDividers && g_Settings.bDividersUsePopupConfig) {
- if (!MessageWindowOpened(0, (LPARAM)hwndDlg))
- SendMessage(hwndDlg, DM_ADDDIVIDER, 0, 0);
- } else if (g_Settings.bUseDividers) {
- if (fInactive)
- SendMessage(hwndDlg, DM_ADDDIVIDER, 0, 0);
- else {
- if (dat->pContainer->hwndActive != hwndDlg)
+ if (g_Settings.bUseDividers && g_Settings.bDividersUsePopupConfig) {
+ if (!MessageWindowOpened(0, (LPARAM)hwndDlg))
+ SendMessage(hwndDlg, DM_ADDDIVIDER, 0, 0);
+ }
+ else if (g_Settings.bUseDividers) {
+ if (fInactive)
+ SendMessage(hwndDlg, DM_ADDDIVIDER, 0, 0);
+ else if (dat->pContainer->hwndActive != hwndDlg)
SendMessage(hwndDlg, DM_ADDDIVIDER, 0, 0);
}
- }
- if (si->pLogEnd)
- Log_StreamInEvent(hwndDlg, si->pLog, si, FALSE, FALSE);
- else
- SendMessage(hwndDlg, GC_EVENT_CONTROL + WM_USER + 500, WINDOW_CLEARLOG, 0);
+ if (si->pLogEnd)
+ Log_StreamInEvent(hwndDlg, si->pLog, si, FALSE, FALSE);
+ else
+ SendMessage(hwndDlg, GC_EVENT_CONTROL + WM_USER + 500, WINDOW_CLEARLOG, 0);
+ }
break;
- }
case GC_ACKMESSAGE:
SendDlgItemMessage(hwndDlg, IDC_CHAT_MESSAGE, EM_SETREADONLY, FALSE, 0);
@@ -2312,7 +2314,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
if (dat->Panel->isHovered()) {
mis->itemHeight = 0;
mis->itemWidth = 6;
- return(TRUE);
+ return TRUE;
}
return CallService(MS_CLIST_MENUMEASUREITEM, wParam, lParam);
}
@@ -2327,7 +2329,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
if (dis->CtlType == ODT_MENU) {
if (dat->Panel->isHovered()) {
DrawMenuItem(dis, (HICON)dis->itemData, 0);
- return(TRUE);
+ return TRUE;
}
return CallService(MS_CLIST_MENUDRAWITEM, wParam, lParam);
}
@@ -3466,10 +3468,10 @@ LABEL_SHOWWINDOW:
if (wParam == 0 && lParam == 0) {
if (PluginConfig.m_EscapeCloses == 1) {
SendMessage(dat->pContainer->hwnd, WM_SYSCOMMAND, SC_MINIMIZE, 0);
- return(TRUE);
+ return TRUE;
} else if (PluginConfig.m_HideOnClose && PluginConfig.m_EscapeCloses == 2) {
ShowWindow(dat->pContainer->hwnd, SW_HIDE);
- return(TRUE);
+ return TRUE;
}
_dlgReturn(hwndDlg, TRUE);
}
diff --git a/plugins/TabSRMM/src/mim.h b/plugins/TabSRMM/src/mim.h
index 9fcc2c6408..b4bde5e57b 100644
--- a/plugins/TabSRMM/src/mim.h
+++ b/plugins/TabSRMM/src/mim.h
@@ -132,10 +132,13 @@ public:
static int __forceinline GetByte(const char *szSetting, int uDefault)
{ return db_get_b(0, SRMSGMOD_T, szSetting, uDefault); }
static int __forceinline GetByte(const char *szModule, const char *szSetting, int uDefault)
- { return(db_get_b(0, szModule, szSetting, uDefault)); }
+ { return db_get_b(0, szModule, szSetting, uDefault); }
static int __forceinline GetByte(const HANDLE hContact, const char *szSetting, int uDefault)
{ return db_get_b(hContact, SRMSGMOD_T, szSetting, uDefault); }
+ static bool __forceinline GetBool(const char *szModule, const char *szSetting, bool uDefault)
+ { return db_get_b(0, szModule, szSetting, uDefault) != 0; }
+
/*
* path utilities
*/
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp
index 4bb85150f3..34e1d0f78b 100644
--- a/plugins/TabSRMM/src/msgdialog.cpp
+++ b/plugins/TabSRMM/src/msgdialog.cpp
@@ -1313,7 +1313,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
dat->pWnd = 0;
CProxyWindow::add(dat);
dat->szProto = const_cast<char *>(dat->cache->getProto());
- dat->bIsMeta = dat->cache->isMeta() ? TRUE : FALSE;
+ dat->bIsMeta = dat->cache->isMeta();
if (dat->bIsMeta)
dat->cache->updateMeta(true);
dat->cache->updateUIN();
@@ -2907,7 +2907,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
if (dat->Panel->isHovered()) {
lpmi->itemHeight = 0;
lpmi->itemWidth = 6;
- return(TRUE);
+ return TRUE;
}
return CallService(MS_CLIST_MENUMEASUREITEM, wParam, lParam);
}
@@ -3537,11 +3537,11 @@ quote_from_last:
if (wParam == 0 && lParam == 0) {
if (PluginConfig.m_EscapeCloses == 1) {
SendMessage(hwndContainer, WM_SYSCOMMAND, SC_MINIMIZE, 0);
- return(TRUE);
+ return TRUE;
}
else if (PluginConfig.m_HideOnClose && PluginConfig.m_EscapeCloses == 2) {
ShowWindow(hwndContainer, SW_HIDE);
- return(TRUE);
+ return TRUE;
}
_dlgReturn(hwndDlg, TRUE);
}
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp
index f2daace00e..ebd59596fe 100644
--- a/plugins/TabSRMM/src/msgdlgutils.cpp
+++ b/plugins/TabSRMM/src/msgdlgutils.cpp
@@ -2050,7 +2050,7 @@ int TSAPI MsgWindowDrawHandler(WPARAM wParam, LPARAM lParam, TWindowData *dat)
}
else if (dis->CtlType == ODT_MENU && dat->Panel->isHovered()) {
DrawMenuItem(dis, (HICON)dis->itemData, 0);
- return(TRUE);
+ return TRUE;
}
return CallService(MS_CLIST_MENUDRAWITEM, wParam, lParam);
}
diff --git a/plugins/TabSRMM/src/tabctrl.cpp b/plugins/TabSRMM/src/tabctrl.cpp
index 213ad28360..fb4b8069b5 100644
--- a/plugins/TabSRMM/src/tabctrl.cpp
+++ b/plugins/TabSRMM/src/tabctrl.cpp
@@ -1232,7 +1232,7 @@ static LRESULT CALLBACK TabControlSubclassProc(HWND hwnd, UINT msg, WPARAM wPara
if (tabdat->fCloseButton) {
GetCursorPos(&pt);
if (TabCtrl_TestForCloseButton(tabdat, hwnd, pt) != -1)
- return(TRUE);
+ return TRUE;
}
break;
diff --git a/plugins/TabSRMM/src/templates.cpp b/plugins/TabSRMM/src/templates.cpp
index b52f7d1878..b5e078e782 100644
--- a/plugins/TabSRMM/src/templates.cpp
+++ b/plugins/TabSRMM/src/templates.cpp
@@ -341,7 +341,7 @@ INT_PTR CALLBACK DlgProcTemplateEditor(HWND hwndDlg, UINT msg, WPARAM wParam, LP
char *pszName = Translate(TemplateNames[iItem]);
TextOutA(dis->hDC, dis->rcItem.left, dis->rcItem.top, pszName, lstrlenA(pszName));
}
- return(TRUE);
+ return TRUE;
case DM_UPDATETEMPLATEPREVIEW: {
DBEVENTINFO dbei = {0};