diff options
author | George Hazan <george.hazan@gmail.com> | 2013-07-06 12:28:50 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-07-06 12:28:50 +0000 |
commit | 0db5618a347355245230f25992343febaaec0e43 (patch) | |
tree | 27e2970909a30bc5fed0faccce1e538ded7b3604 /plugins | |
parent | 6af7ff26a41182bf79986e25b2c3e583ea9bc2b2 (diff) |
more booleans
git-svn-id: http://svn.miranda-ng.org/main/trunk@5246 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/TabSRMM/src/chat/chat.h | 43 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat/log.cpp | 42 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat/manager.cpp | 6 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat/options.cpp | 74 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat/services.cpp | 6 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat/tools.cpp | 14 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat/window.cpp | 32 |
7 files changed, 103 insertions, 114 deletions
diff --git a/plugins/TabSRMM/src/chat/chat.h b/plugins/TabSRMM/src/chat/chat.h index 9a69a10f43..90d9e6446f 100644 --- a/plugins/TabSRMM/src/chat/chat.h +++ b/plugins/TabSRMM/src/chat/chat.h @@ -241,16 +241,16 @@ struct LOGSTREAMDATA struct TMUCSettings
{
HICON hIconOverlay;
- bool ShowTime, ShowTimeIfChanged, LoggingEnabled;
- bool FlashWindow, FlashWindowHightlight;
- bool OpenInDefault;
- bool HighlightEnabled, LogIndentEnabled;
- bool StripFormat;
- bool BBCodeInPopups;
- bool TrayIconInactiveOnly;
- bool AddColonToAutoComplete;
- bool LogLimitNames;
- bool TimeStampEventColour;
+ bool bShowTime, bShowTimeIfChanged, bLoggingEnabled;
+ bool bFlashWindow, bFlashWindowHightlight;
+ bool bOpenInDefault;
+ bool bHighlightEnabled, LogIndentEnabled;
+ bool bStripFormat;
+ bool bBBCodeInPopups;
+ bool bTrayIconInactiveOnly;
+ bool bAddColonToAutoComplete;
+ bool bLogLimitNames;
+ bool bTimeStampEventColour;
DWORD dwIconFlags;
int LogTextIndent;
long LoggingLimit;
@@ -270,29 +270,18 @@ struct TMUCSettings COLORREF crUserListBGColor;
COLORREF crPUTextColour;
COLORREF crPUBkgColour;
- BYTE ClassicIndicators;
HFONT UserListFonts[CHAT_STATUS_MAX];
COLORREF UserListColors[CHAT_STATUS_MAX];
- BYTE LogClassicIndicators;
- BYTE AlternativeSorting;
- BYTE AnnoyingHighlight;
- BYTE CreateWindowOnHighlight;
-
- BYTE LogSymbols;
- BYTE ClickableNicks;
- BYTE ColorizeNicks;
- BYTE ColorizeNicksInLog;
- BYTE ScaleIcons;
- BYTE UseDividers;
- BYTE DividersUsePopupConfig;
- BYTE MathMod;
COLORREF nickColors[8];
HBRUSH SelectionBGBrush;
- bool DoubleClick4Privat;
- bool ShowContactStatus;
- bool ContactStatusFirst;
+ bool bDoubleClick4Privat, bShowContactStatus, bContactStatusFirst;
+
+ bool bLogClassicIndicators, bAlternativeSorting, bAnnoyingHighlight, bCreateWindowOnHighlight;
+ bool bLogSymbols, bClassicIndicators, bClickableNicks, bColorizeNicks, bColorizeNicksInLog;
+ bool bScaleIcons, bUseDividers, bDividersUsePopupConfig, bMathMod;
+
HANDLE hGroup;
CMUCHighlight* Highlight;
};
diff --git a/plugins/TabSRMM/src/chat/log.cpp b/plugins/TabSRMM/src/chat/log.cpp index 52d938ac10..5674f68623 100644 --- a/plugins/TabSRMM/src/chat/log.cpp +++ b/plugins/TabSRMM/src/chat/log.cpp @@ -118,7 +118,7 @@ static int Log_AppendIEView(LOGSTREAMDATA* streamData, BOOL simpleMode, TCHAR ** case 'c':
case 'f':
- if (!g_Settings.StripFormat && !streamData->bStripFormat) {
+ if (!g_Settings.bStripFormat && !streamData->bStripFormat) {
if ( line[1] != '\0' && line[2] != '\0') {
TCHAR szTemp3[3], c = *line;
int col;
@@ -133,7 +133,7 @@ static int Log_AppendIEView(LOGSTREAMDATA* streamData, BOOL simpleMode, TCHAR ** break;
case 'C':
case 'F':
- if ( !g_Settings.StripFormat && !streamData->bStripFormat) {
+ if ( !g_Settings.bStripFormat && !streamData->bStripFormat) {
mir_sntprintf(szTemp, SIZEOF(szTemp), _T("%%%c"), *line );
}
break;
@@ -324,7 +324,7 @@ static void LogEventIEView(LOGSTREAMDATA *streamData, TCHAR *ptszNick) ied.iType = IEED_GC_EVENT_REMOVESTATUS;
break;
}
- ied.dwData |= g_Settings.ShowTime ? IEEDD_GC_SHOW_TIME : 0;
+ ied.dwData |= g_Settings.bShowTime ? IEEDD_GC_SHOW_TIME : 0;
ied.dwData |= IEEDD_GC_SHOW_ICON;
ied.dwFlags = IEEDF_UNICODE_TEXT | IEEDF_UNICODE_NICK | IEEDF_UNICODE_TEXT2;
ied.next = NULL;
@@ -557,7 +557,7 @@ static int Log_AppendRTF(LOGSTREAMDATA* streamData, BOOL simpleMode, char **buff case 'c':
case 'f':
- if (g_Settings.StripFormat || streamData->bStripFormat)
+ if (g_Settings.bStripFormat || streamData->bStripFormat)
line += 2;
else if (line[1] != '\0' && line[2] != '\0') {
@@ -575,7 +575,7 @@ static int Log_AppendRTF(LOGSTREAMDATA* streamData, BOOL simpleMode, char **buff break;
case 'C':
case 'F':
- if (!g_Settings.StripFormat && !streamData->bStripFormat) {
+ if (!g_Settings.bStripFormat && !streamData->bStripFormat) {
int j = streamData->lin->bIsHighlighted ? 16 : EventToIndex(streamData->lin);
if (*line == 'C')
mir_snprintf(szTemp, SIZEOF(szTemp), "\\cf%u ", j + 1);
@@ -640,12 +640,12 @@ static void AddEventToBuffer(char **buffer, int *bufferEnd, int *bufferAlloced, return;
if (streamData->lin->ptszNick) {
- if (g_Settings.LogLimitNames && lstrlen(streamData->lin->ptszNick) > 20) {
+ if (g_Settings.bLogLimitNames && lstrlen(streamData->lin->ptszNick) > 20) {
lstrcpyn(szTemp, streamData->lin->ptszNick, 20);
lstrcpyn(szTemp + 20, _T("..."), 4);
} else lstrcpyn(szTemp, streamData->lin->ptszNick, 511);
- if (g_Settings.ClickableNicks)
+ if (g_Settings.bClickableNicks)
mir_sntprintf(szTemp2, SIZEOF(szTemp2), _T("~~++#%s#++~~"), szTemp);
else
_tcscpy(szTemp2, szTemp);
@@ -795,7 +795,7 @@ static char* Log_CreateRTF(LOGSTREAMDATA *streamData) Log_Append(&buffer, &bufferEnd, &bufferAlloced, "\\v~-+%d+-~\\v0 ", lin);
// Insert icon
- if (g_Settings.LogSymbols) // use symbols
+ if (g_Settings.bLogSymbols) // use symbols
Log_Append(&buffer, &bufferEnd, &bufferAlloced, "%s %c", Log_SetStyle(17, 17), EventToSymbol(lin));
else if (g_Settings.dwIconFlags) {
int iIndex = lin->bIsHighlighted ? ICON_HIGHLIGHT : EventToIcon(lin);
@@ -807,7 +807,7 @@ static char* Log_CreateRTF(LOGSTREAMDATA *streamData) bufferEnd += logIconBmpSize[iIndex];
}
- if (g_Settings.TimeStampEventColour) {
+ if (g_Settings.bTimeStampEventColour) {
// colored timestamps
static char szStyle[256];
int iii;
@@ -827,12 +827,12 @@ static char* Log_CreateRTF(LOGSTREAMDATA *streamData) Log_Append(&buffer, &bufferEnd, &bufferAlloced, "\\tab ");
//insert timestamp
- if (g_Settings.ShowTime) {
+ if (g_Settings.bShowTime) {
TCHAR szTimeStamp[30], szOldTimeStamp[30];
lstrcpyn(szTimeStamp, MakeTimeStamp(g_Settings.pszTimeStamp, lin->time), 30);
lstrcpyn(szOldTimeStamp, MakeTimeStamp(g_Settings.pszTimeStamp, streamData->si->LastTime), 30);
- if (!g_Settings.ShowTimeIfChanged || streamData->si->LastTime == 0 || lstrcmp(szTimeStamp, szOldTimeStamp)) {
+ if (!g_Settings.bShowTimeIfChanged || streamData->si->LastTime == 0 || lstrcmp(szTimeStamp, szOldTimeStamp)) {
streamData->si->LastTime = lin->time;
Log_AppendRTF(streamData, TRUE, &buffer, &bufferEnd, &bufferAlloced, _T("%s"), szTimeStamp);
}
@@ -846,7 +846,7 @@ static char* Log_CreateRTF(LOGSTREAMDATA *streamData) char pszIndicator[3] = "\0\0";
int crNickIndex = 0;
//mad
- if (g_Settings.LogClassicIndicators/*g_Settings.ClassicIndicators */||g_Settings.ColorizeNicksInLog) {
+ if (g_Settings.bLogClassicIndicators/*g_Settings.bClassicIndicators */||g_Settings.bColorizeNicksInLog) {
USERINFO *ui = streamData->si->pUsers;
while (ui) {
if (!lstrcmp(ui->pszNick, lin->ptszNick)) {
@@ -886,7 +886,7 @@ 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.LogClassicIndicators /*g_Settings.ClassicIndicators*/)
+ if (g_Settings.bLogClassicIndicators /*g_Settings.bClassicIndicators*/)
Log_Append(&buffer, &bufferEnd, &bufferAlloced, "%s", pszIndicator);
lstrcpyn(pszTemp, lin->bIsMe ? g_Settings.pszOutgoingNick : g_Settings.pszIncomingNick, 299);
@@ -895,12 +895,12 @@ static char* Log_CreateRTF(LOGSTREAMDATA *streamData) p1[1] = 's';
if (!lin->bIsMe) {
- if (g_Settings.ClickableNicks) {
+ if (g_Settings.bClickableNicks) {
_tcsnrplc(pszTemp, 300, _T("%s"), _T("~~++#%s#++~~"));
pszTemp[299] = 0;
}
//Log_Append(&buffer, &bufferEnd, &bufferAlloced, "~~++#");
- if (g_Settings.ColorizeNicksInLog && pszIndicator[0])
+ if (g_Settings.bColorizeNicksInLog && pszIndicator[0])
Log_Append(&buffer, &bufferEnd, &bufferAlloced, "\\cf%u ", OPTIONS_FONTCOUNT + streamData->crCount + crNickIndex + 1);
}
@@ -1036,7 +1036,7 @@ void Log_StreamInEvent(HWND hwndDlg, LOGINFO* lin, SESSION_INFO* si, bool bRedr /*
* use mathmod to replace formulas
*/
- if (g_Settings.MathMod && fDoReplace) {
+ if (g_Settings.bMathMod && fDoReplace) {
TMathRicheditInfo mathReplaceInfo;
CHARRANGE mathNewSel;
mathNewSel.cpMin = sel.cpMin;
@@ -1063,7 +1063,7 @@ void Log_StreamInEvent(HWND hwndDlg, LOGINFO* lin, SESSION_INFO* si, bool bRedr * clickable
*/
- if (g_Settings.ClickableNicks) {
+ if (g_Settings.bClickableNicks) {
CHARFORMAT2 cf2;
FINDTEXTEX fi, fi2;
@@ -1212,7 +1212,7 @@ char * Log_CreateRtfHeader(MODULEINFO * mi) {
int iIndent = 0;
- if (g_Settings.LogSymbols) {
+ if (g_Settings.bLogSymbols) {
TCHAR szString[2];
LOGFONT lf;
HFONT hFont;
@@ -1227,10 +1227,10 @@ char * Log_CreateRtfHeader(MODULEINFO * mi) iIndent += (iText * 1440) / logPixelSX;
Log_Append(&buffer, &bufferEnd, &bufferAlloced, "\\tx%u", iIndent);
} else if (g_Settings.dwIconFlags) {
- iIndent += ((g_Settings.ScaleIcons ? 14 : 20) * 1440) / logPixelSX;
+ iIndent += ((g_Settings.bScaleIcons ? 14 : 20) * 1440) / logPixelSX;
Log_Append(&buffer, &bufferEnd, &bufferAlloced, "\\tx%u", iIndent);
}
- if (g_Settings.ShowTime) {
+ if (g_Settings.bShowTime) {
int iSize = (g_Settings.LogTextIndent * 1440) / logPixelSX;
Log_Append(&buffer, &bufferEnd, &bufferAlloced, "\\tx%u", iIndent + iSize);
if (g_Settings.LogIndentEnabled)
@@ -1262,7 +1262,7 @@ void LoadMsgLogBitmaps(void) sizeX = 16;
if (sizeX >= 12)
- iIconSize = g_Settings.ScaleIcons ? 12 : 16;
+ iIconSize = g_Settings.bScaleIcons ? 12 : 16;
else
iIconSize = sizeX;
diff --git a/plugins/TabSRMM/src/chat/manager.cpp b/plugins/TabSRMM/src/chat/manager.cpp index 3b3c58d72f..344f186c50 100644 --- a/plugins/TabSRMM/src/chat/manager.cpp +++ b/plugins/TabSRMM/src/chat/manager.cpp @@ -282,7 +282,7 @@ BOOL SM_AddEventToAllMatchingUID(GCEVENT * gce, BOOL bIsHighLight) if (!(gce->dwFlags & GCEF_NOTNOTIFY))
DoSoundsFlashPopupTrayStuff(pTemp, gce, bIsHighLight, bManyFix);
bManyFix ++;
- if ((gce->dwFlags & GCEF_ADDTOLOG) && g_Settings.LoggingEnabled)
+ if ((gce->dwFlags & GCEF_ADDTOLOG) && g_Settings.bLoggingEnabled)
LogToFile(pTemp, gce);
}
}
@@ -1192,7 +1192,7 @@ static int UM_CompareItem(USERINFO * u1, const TCHAR* pszNick, WORD wStatus) if ((dw1 & 1) && (dw2 & 1))
//
{
- if (g_Settings.AlternativeSorting)
+ if (g_Settings.bAlternativeSorting)
return sttCompareNicknames(u1->pszNick, pszNick);
else
return lstrcmp(u1->pszNick, pszNick);
@@ -1200,7 +1200,7 @@ static int UM_CompareItem(USERINFO * u1, const TCHAR* pszNick, WORD wStatus) dw1 = dw1 >> 1;
dw2 = dw2 >> 1;
}
- if (g_Settings.AlternativeSorting)
+ if (g_Settings.bAlternativeSorting)
//
return sttCompareNicknames(u1->pszNick, pszNick);
else
diff --git a/plugins/TabSRMM/src/chat/options.cpp b/plugins/TabSRMM/src/chat/options.cpp index ffba6630ab..506388355e 100644 --- a/plugins/TabSRMM/src/chat/options.cpp +++ b/plugins/TabSRMM/src/chat/options.cpp @@ -874,13 +874,13 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM SetDlgItemText(hwndDlg, IDC_TIMESTAMP, g_Settings.pszTimeStamp);
SetDlgItemText(hwndDlg, IDC_OUTSTAMP, g_Settings.pszOutgoingNick);
SetDlgItemText(hwndDlg, IDC_INSTAMP, g_Settings.pszIncomingNick);
- CheckDlgButton(hwndDlg, IDC_LOGGING, g_Settings.LoggingEnabled);
+ CheckDlgButton(hwndDlg, IDC_LOGGING, g_Settings.bLoggingEnabled);
SetDlgItemText(hwndDlg, IDC_LOGDIRECTORY, g_Settings.pszLogDir);
- Utils::enableDlgControl(hwndDlg, IDC_LOGDIRECTORY, g_Settings.LoggingEnabled ? TRUE : FALSE);
- Utils::enableDlgControl(hwndDlg, IDC_FONTCHOOSE, g_Settings.LoggingEnabled ? TRUE : FALSE);
+ Utils::enableDlgControl(hwndDlg, IDC_LOGDIRECTORY, g_Settings.bLoggingEnabled ? TRUE : FALSE);
+ Utils::enableDlgControl(hwndDlg, IDC_FONTCHOOSE, g_Settings.bLoggingEnabled ? TRUE : FALSE);
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.LoggingEnabled ? TRUE : FALSE);
+ Utils::enableDlgControl(hwndDlg, IDC_LIMIT, g_Settings.bLoggingEnabled ? TRUE : FALSE);
if (ServiceExists(MS_UTILS_REPLACEVARS)) {
TCHAR tszTooltipText[2048];
@@ -1041,8 +1041,8 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM GetDlgItemText(hwndDlg, IDC_LOGDIRECTORY, pszText1, iLen + 1);
db_set_ts(NULL, "Chat", "LogDirectory", pszText1);
free(pszText1);
- g_Settings.LoggingEnabled = IsDlgButtonChecked(hwndDlg, IDC_LOGGING) == BST_CHECKED ? TRUE : FALSE;
- db_set_b(0, "Chat", "LoggingEnabled", (BYTE)g_Settings.LoggingEnabled);
+ g_Settings.bLoggingEnabled = IsDlgButtonChecked(hwndDlg, IDC_LOGGING) == BST_CHECKED ? TRUE : FALSE;
+ db_set_b(0, "Chat", "LoggingEnabled", (BYTE)g_Settings.bLoggingEnabled);
} else {
db_unset(NULL, "Chat", "LogDirectory");
db_set_b(0, "Chat", "LoggingEnabled", 0);
@@ -1189,7 +1189,7 @@ INT_PTR CALLBACK DlgProcOptions3(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM SendDlgItemMessage(hwndDlg, IDC_LOGICONTYPE, CB_ADDSTRING, -1, (LPARAM)TranslateT("Show as icons"));
SendDlgItemMessage(hwndDlg, IDC_LOGICONTYPE, CB_ADDSTRING, -1, (LPARAM)TranslateT("Show as text symbols"));
- SendDlgItemMessage(hwndDlg, IDC_LOGICONTYPE, CB_SETCURSEL, (g_Settings.LogSymbols ? 2 : (g_Settings.dwIconFlags ? 1 : 0)), 0);
+ SendDlgItemMessage(hwndDlg, IDC_LOGICONTYPE, CB_SETCURSEL, (g_Settings.bLogSymbols ? 2 : (g_Settings.dwIconFlags ? 1 : 0)), 0);
CheckDlgButton(hwndDlg, IDC_NOPOPUPSFORCLOSEDWINDOWS, M.GetByte("Chat", "SkipWhenNoWindow", 0) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_TRAYONLYFORINACTIVE, M.GetByte("Chat", "TrayIconInactiveOnly", 0) ? BST_CHECKED : BST_UNCHECKED);
@@ -1246,50 +1246,50 @@ void LoadGlobalSettings(void) LOGFONT lf;
char szBuf[40];
- g_Settings.LogLimitNames = M.GetByte("Chat", "LogLimitNames", 1) != 0;
- g_Settings.ShowTime = M.GetByte("Chat", "ShowTimeStamp", 1) != 0;
- g_Settings.ShowTimeIfChanged = M.GetByte("Chat", "ShowTimeStampIfChanged", 0) != 0;
- g_Settings.TimeStampEventColour = M.GetByte("Chat", "TimeStampEventColour", 0) != 0;
+ 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.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.LoggingEnabled = M.GetByte("Chat", "LoggingEnabled", 0) != 0;
- g_Settings.OpenInDefault = M.GetByte("Chat", "DefaultContainer", 1) != 0;
- g_Settings.FlashWindow = M.GetByte("Chat", "FlashWindow", 0) != 0;
- g_Settings.FlashWindowHightlight = M.GetByte("Chat", "FlashWindowHighlight", 0) != 0;
- g_Settings.HighlightEnabled = M.GetByte("Chat", "HighlightEnabled", 1) != 0;
+ 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.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.StripFormat = M.GetByte("Chat", "StripFormatting", 0) != 0;
- g_Settings.TrayIconInactiveOnly = M.GetByte("Chat", "TrayIconInactiveOnly", 1) != 0;
- g_Settings.BBCodeInPopups = M.GetByte("Chat", "BBCodeInPopups", 0) != 0;
- g_Settings.AddColonToAutoComplete = M.GetByte("Chat", "AddColonToAutoComplete", 1) != 0;
+ g_Settings.bStripFormat = M.GetByte("Chat", "StripFormatting", 0) != 0;
+ g_Settings.bTrayIconInactiveOnly = M.GetByte("Chat", "TrayIconInactiveOnly", 1) != 0;
+ g_Settings.bBBCodeInPopups = M.GetByte("Chat", "BBCodeInPopups", 0) != 0;
+ g_Settings.bAddColonToAutoComplete = M.GetByte("Chat", "AddColonToAutoComplete", 1) != 0;
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.ClassicIndicators = M.GetByte("Chat", "ClassicIndicators", 0);
+ g_Settings.bClassicIndicators = M.GetByte("Chat", "ClassicIndicators", 0) != 0;
//MAD
- g_Settings.LogClassicIndicators = M.GetByte("Chat", "LogClassicIndicators", 0);
- g_Settings.AlternativeSorting = M.GetByte("Chat", "AlternativeSorting", 1);
- g_Settings.AnnoyingHighlight = M.GetByte("Chat", "AnnoyingHighlight", 0);
- g_Settings.CreateWindowOnHighlight = M.GetByte("Chat", "CreateWindowOnHighlight", 1);
+ 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;
//MAD_
- g_Settings.LogSymbols = M.GetByte("Chat", "LogSymbols", 1);
- g_Settings.ClickableNicks = M.GetByte("Chat", "ClickableNicks", 1);
- g_Settings.ColorizeNicks = M.GetByte("Chat", "ColorizeNicks", 1);
- g_Settings.ColorizeNicksInLog = M.GetByte("Chat", "ColorizeNicksInLog", 1);
- g_Settings.ScaleIcons = M.GetByte("Chat", "ScaleIcons", 1);
- g_Settings.UseDividers = M.GetByte("Chat", "UseDividers", 1);
- g_Settings.DividersUsePopupConfig = M.GetByte("Chat", "DividersUsePopupConfig", 1);
- g_Settings.MathMod = ServiceExists(MATH_RTF_REPLACE_FORMULAE) && M.GetByte("Chat", "MathModSupport", 0);
-
- g_Settings.DoubleClick4Privat = M.GetByte("Chat", "DoubleClick4Privat", 0) != 0;
- g_Settings.ShowContactStatus = M.GetByte("Chat", "ShowContactStatus", 1) != 0;
- g_Settings.ContactStatusFirst = M.GetByte("Chat", "ContactStatusFirst", 0) != 0;
+ 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;
if (hListBkgBrush)
DeleteObject(hListBkgBrush);
diff --git a/plugins/TabSRMM/src/chat/services.cpp b/plugins/TabSRMM/src/chat/services.cpp index 8e4d7182fe..56a63831f1 100644 --- a/plugins/TabSRMM/src/chat/services.cpp +++ b/plugins/TabSRMM/src/chat/services.cpp @@ -82,7 +82,7 @@ int Chat_ModulesLoaded(WPARAM wParam, LPARAM lParam) CList_SetAllOffline(TRUE, NULL);
- g_Settings.MathMod = ServiceExists(MATH_RTF_REPLACE_FORMULAE) && M.GetByte("Chat", "MathModSupport", 0);
+ g_Settings.bMathMod = ServiceExists(MATH_RTF_REPLACE_FORMULAE) && M.GetByte("Chat", "MathModSupport", 0);
return 0;
}
@@ -576,7 +576,7 @@ void ShowRoom(SESSION_INFO* si, WPARAM wp, BOOL bSetForeground) szName[0] = 0;
if (pContainer == NULL) {
GetContainerNameForContact(si->hContact, szName, CONTAINER_NAMELEN);
- if (!g_Settings.OpenInDefault && !_tcscmp(szName, _T("default")))
+ if (!g_Settings.bOpenInDefault && !_tcscmp(szName, _T("default")))
_tcsncpy(szName, _T("Chat Rooms"), CONTAINER_NAMELEN);
szName[CONTAINER_NAMELEN] = 0;
pContainer = FindContainerByName(szName);
@@ -769,7 +769,7 @@ INT_PTR Service_AddEvent(WPARAM wParam, LPARAM lParam) }
if (!(gce->dwFlags & GCEF_NOTNOTIFY))
DoSoundsFlashPopupTrayStuff(si, gce, bIsHighlighted, 0);
- if ((gce->dwFlags & GCEF_ADDTOLOG) && g_Settings.LoggingEnabled)
+ if ((gce->dwFlags & GCEF_ADDTOLOG) && g_Settings.bLoggingEnabled)
LogToFile(si, gce);
}
diff --git a/plugins/TabSRMM/src/chat/tools.cpp b/plugins/TabSRMM/src/chat/tools.cpp index 29ca57c044..f18d52b16b 100644 --- a/plugins/TabSRMM/src/chat/tools.cpp +++ b/plugins/TabSRMM/src/chat/tools.cpp @@ -300,7 +300,7 @@ static BOOL DoPopup(SESSION_INFO* si, GCEVENT* gce, struct TWindowData* dat) char *szProto = dat ? dat->szProto : si->pszModule;
TCHAR *bbStart, *bbEnd;
- if (g_Settings.BBCodeInPopups) {
+ if (g_Settings.bBBCodeInPopups) {
bbStart = _T("[b]");
bbEnd = _T("[/b]");
}
@@ -546,10 +546,10 @@ BOOL DoSoundsFlashPopupTrayStuff(SESSION_INFO* si, GCEVENT * gce, BOOL bHighligh /* TODO fix for 3.0 final !!! */
#if !defined(__DELAYED_FOR_3_1)
- if (g_Settings.CreateWindowOnHighlight && 0 == dat)
+ if (g_Settings.bCreateWindowOnHighlight && 0 == dat)
wParamForHighLight = 1;
- if (dat && g_Settings.AnnoyingHighlight && params->bInactive && dat->pContainer->hwnd != GetForegroundWindow()) {
+ if (dat && g_Settings.bAnnoyingHighlight && params->bInactive && dat->pContainer->hwnd != GetForegroundWindow()) {
wParamForHighLight = 2;
params->hWnd = dat->hwnd;
}
@@ -558,13 +558,13 @@ BOOL DoSoundsFlashPopupTrayStuff(SESSION_INFO* si, GCEVENT * gce, BOOL bHighligh DoPopup(si, gce, dat);
if (params->bInactive && si && si->hWnd)
SendMessage(si->hWnd, GC_SETMESSAGEHIGHLIGHT, 0, (LPARAM)si);
- if (g_Settings.FlashWindowHightlight && params->bInactive)
+ if (g_Settings.bFlashWindowHightlight && params->bInactive)
params->bMustFlash = TRUE;
params->bMustAutoswitch = TRUE;
params->hNotifyIcon = hIcons[ICON_HIGHLIGHT];
} else {
// do blinking icons in tray
- if (params->bInactive || !g_Settings.TrayIconInactiveOnly) {
+ if (params->bInactive || !g_Settings.bTrayIconInactiveOnly) {
DoTrayIcon(si, gce);
if (params->iEvent == GC_EVENT_MESSAGE)
fFlagUnread = true;
@@ -669,7 +669,7 @@ BOOL DoSoundsFlashPopupTrayStuff(SESSION_INFO* si, GCEVENT * gce, BOOL bHighligh if (params->iEvent == GC_EVENT_MESSAGE) {
params->bMustAutoswitch = TRUE;
- if (g_Settings.FlashWindow)
+ if (g_Settings.bFlashWindow)
params->bMustFlash = TRUE;
params->hNotifyIcon = hIcons[ICON_MESSAGE];
}
@@ -780,7 +780,7 @@ BOOL LogToFile(SESSION_INFO* si, GCEVENT * gce) if (bFileJustCreated)
fputws((const wchar_t*)"\377\376", hFile); //UTF-16 LE BOM == FF FE
if (gce->ptszNick) {
- if (g_Settings.LogLimitNames && lstrlen(gce->ptszNick) > 20) {
+ if (g_Settings.bLogLimitNames && lstrlen(gce->ptszNick) > 20) {
lstrcpyn(szTemp2, gce->ptszNick, 20);
lstrcpyn(szTemp2 + 20, _T("..."), 4);
}
diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp index 39ff4da0ea..4d49121ce9 100644 --- a/plugins/TabSRMM/src/chat/window.cpp +++ b/plugins/TabSRMM/src/chat/window.cpp @@ -322,7 +322,7 @@ static void Chat_UpdateWindowState(TWindowData *dat, UINT msg) UpdateTrayMenuState(dat, FALSE);
DM_SetDBButtonStates(hwndDlg, dat);
- if (g_Settings.MathMod) {
+ if (g_Settings.bMathMod) {
CallService(MTH_Set_ToolboxEditHwnd, 0, (LPARAM)GetDlgItem(hwndDlg, IDC_CHAT_MESSAGE));
MTH_updateMathWindow(dat);
}
@@ -607,7 +607,7 @@ LBL_SkipEnd: dat->szSearchResult = mir_tstrdup(pszName);
if (end != start) {
ptrT szReplace;
- if (!isRoom && !isTopic && g_Settings.AddColonToAutoComplete && start == 0) {
+ if (!isRoom && !isTopic && g_Settings.bAddColonToAutoComplete && start == 0) {
szReplace = (TCHAR*)Utils::safeMirAlloc((wcslen(pszName) + 4) * sizeof(TCHAR));
wcscpy(szReplace, pszName);
wcscat(szReplace, L": ");
@@ -1308,7 +1308,7 @@ static LRESULT CALLBACK LogSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR return DM_WMCopyHandler(hwnd, LogSubclassProc, msg, wParam, lParam);
case WM_SETCURSOR:
- if (g_Settings.ClickableNicks && (LOWORD(lParam) == HTCLIENT)) {
+ if (g_Settings.bClickableNicks && (LOWORD(lParam) == HTCLIENT)) {
POINT pt;
GetCursorPos(&pt);
ScreenToClient(hwnd,&pt);
@@ -1321,14 +1321,14 @@ static LRESULT CALLBACK LogSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR case WM_RBUTTONUP:
case WM_RBUTTONDOWN:
case WM_RBUTTONDBLCLK:
- if (g_Settings.ClickableNicks) {
+ if (g_Settings.bClickableNicks) {
POINT pt={LOWORD(lParam), HIWORD(lParam)};
CheckCustomLink(hwnd, &pt, msg, wParam, lParam, TRUE);
}
break;
case WM_LBUTTONUP:
- if (g_Settings.ClickableNicks) {
+ if (g_Settings.bClickableNicks) {
POINT pt={LOWORD(lParam), HIWORD(lParam)};
CheckCustomLink(hwnd, &pt, msg, wParam, lParam, TRUE);
}
@@ -2277,10 +2277,10 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar case GC_ADDLOG: {
BOOL fInactive = (GetForegroundWindow() != dat->pContainer->hwnd || GetActiveWindow() != dat->pContainer->hwnd);
- if (g_Settings.UseDividers && g_Settings.DividersUsePopupConfig) {
+ if (g_Settings.bUseDividers && g_Settings.bDividersUsePopupConfig) {
if (!MessageWindowOpened(0, (LPARAM)hwndDlg))
SendMessage(hwndDlg, DM_ADDDIVIDER, 0, 0);
- } else if (g_Settings.UseDividers) {
+ } else if (g_Settings.bUseDividers) {
if (fInactive)
SendMessage(hwndDlg, DM_ADDDIVIDER, 0, 0);
else {
@@ -2359,7 +2359,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar }
else {
FillRect(dis->hDC, &dis->rcItem, hListBkgBrush);
- if (g_Settings.ColorizeNicks && szIndicator != 0) {
+ if (g_Settings.bColorizeNicks && szIndicator != 0) {
COLORREF clr;
switch (szIndicator) {
case '@':
@@ -2384,14 +2384,14 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar }
x_offset = 2;
- if (g_Settings.ShowContactStatus && g_Settings.ContactStatusFirst && ui->ContactStatus) {
+ if (g_Settings.bShowContactStatus && g_Settings.bContactStatusFirst && ui->ContactStatus) {
HICON hIcon = LoadSkinnedProtoIcon(si->pszModule, ui->ContactStatus);
DrawIconEx(dis->hDC, x_offset, dis->rcItem.top + offset - 8, hIcon, 16, 16, 0, NULL, DI_NORMAL);
Skin_ReleaseIcon(hIcon);
x_offset += 18;
}
- if (g_Settings.ClassicIndicators) {
+ if (g_Settings.bClassicIndicators) {
char szTemp[3];
SIZE szUmode;
@@ -2407,7 +2407,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar x_offset += 12;
}
- if (g_Settings.ShowContactStatus && !g_Settings.ContactStatusFirst && ui->ContactStatus) {
+ if (g_Settings.bShowContactStatus && !g_Settings.bContactStatusFirst && ui->ContactStatus) {
HICON hIcon = LoadSkinnedProtoIcon(si->pszModule, ui->ContactStatus);
DrawIconEx(dis->hDC, x_offset, dis->rcItem.top + offset - 8, hIcon, 16, 16, 0, NULL, DI_NORMAL);
Skin_ReleaseIcon(hIcon);
@@ -2854,7 +2854,7 @@ LABEL_SHOWWINDOW: switch (((ENLINK *) lParam)->msg) {
case WM_SETCURSOR:
- if (g_Settings.ClickableNicks) {
+ if (g_Settings.bClickableNicks) {
if (!hCurHyperlinkHand)
hCurHyperlinkHand = LoadCursor(NULL, IDC_HAND);
if (hCurHyperlinkHand != GetCursor())
@@ -2921,7 +2921,7 @@ LABEL_SHOWWINDOW: mir_free(tr.lpstrText);
return TRUE;
}
- } else if (g_Settings.ClickableNicks) { // clicked a nick name
+ } else if (g_Settings.bClickableNicks) { // clicked a nick name
CHARRANGE chr;
TEXTRANGE tr2;
TCHAR tszAplTmpl[] = _T("%s:"),
@@ -3074,7 +3074,7 @@ LABEL_SHOWWINDOW: ui = UM_FindUserFromIndex(si->pUsers, item);
//ui = SM_GetUserFromIndex(si->pszID, si->pszModule, item);
if (ui) {
- if (g_Settings.DoubleClick4Privat ? GetKeyState(VK_SHIFT) & 0x8000 : !(GetKeyState(VK_SHIFT) & 0x8000)) {
+ if (g_Settings.bDoubleClick4Privat ? GetKeyState(VK_SHIFT) & 0x8000 : !(GetKeyState(VK_SHIFT) & 0x8000)) {
LRESULT lResult = (LRESULT)SendMessage(GetDlgItem(hwndDlg, IDC_CHAT_MESSAGE), EM_GETSEL, 0, 0);
int start = LOWORD(lResult);
TCHAR* pszName = (TCHAR*)alloca(sizeof(TCHAR) * (lstrlen(ui->pszUID) + 3));
@@ -3153,7 +3153,7 @@ LABEL_SHOWWINDOW: break;
case IDC_CHAT_MESSAGE:
- if (g_Settings.MathMod)
+ if (g_Settings.bMathMod)
MTH_updateMathWindow(dat);
if (HIWORD(wParam) == EN_CHANGE) {
@@ -3624,7 +3624,7 @@ LABEL_SHOWWINDOW: }
case DM_ADDDIVIDER:
- if (!(dat->dwFlags & MWF_DIVIDERSET) && g_Settings.UseDividers) {
+ if (!(dat->dwFlags & MWF_DIVIDERSET) && g_Settings.bUseDividers) {
if (GetWindowTextLengthA(GetDlgItem(hwndDlg, IDC_CHAT_LOG)) > 0) {
dat->dwFlags |= MWF_DIVIDERWANTED;
dat->dwFlags |= MWF_DIVIDERSET;
|