summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-01-19 12:02:16 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-01-19 12:02:16 +0000
commit085b45f2920353f055b036c00ebb27fb1b8148e9 (patch)
tree9b172d62bdbc8ac065368dd99d843899d9f10580 /plugins/TabSRMM/src
parentbd79fceb18897a5cf49ac5175882dcbf03673847 (diff)
boolean field names normalization
git-svn-id: http://svn.miranda-ng.org/main/trunk@7753 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM/src')
-rw-r--r--plugins/TabSRMM/src/chat/chat.h2
-rw-r--r--plugins/TabSRMM/src/chat/log.cpp16
-rw-r--r--plugins/TabSRMM/src/chat/main.cpp1
-rw-r--r--plugins/TabSRMM/src/chat/muchighlight.cpp6
-rw-r--r--plugins/TabSRMM/src/chat/options.cpp26
-rw-r--r--plugins/TabSRMM/src/chat/tools.cpp8
-rw-r--r--plugins/TabSRMM/src/chat/window.cpp2
7 files changed, 30 insertions, 31 deletions
diff --git a/plugins/TabSRMM/src/chat/chat.h b/plugins/TabSRMM/src/chat/chat.h
index 84004e5fb3..8c52c06a2e 100644
--- a/plugins/TabSRMM/src/chat/chat.h
+++ b/plugins/TabSRMM/src/chat/chat.h
@@ -89,7 +89,7 @@ struct TMUCSettings : public GlobalLogSettingsBase
COLORREF nickColors[8];
HBRUSH SelectionBGBrush;
- bool bOpenInDefault, bFlashWindowHightlight, bBBCodeInPopups;
+ bool bOpenInDefault, bBBCodeInPopups;
bool bDoubleClick4Privat, bShowContactStatus, bContactStatusFirst;
bool bLogClassicIndicators, bAlternativeSorting, bAnnoyingHighlight, bCreateWindowOnHighlight;
diff --git a/plugins/TabSRMM/src/chat/log.cpp b/plugins/TabSRMM/src/chat/log.cpp
index 94b76334b9..8c32c07e32 100644
--- a/plugins/TabSRMM/src/chat/log.cpp
+++ b/plugins/TabSRMM/src/chat/log.cpp
@@ -556,7 +556,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') {
TCHAR szTemp3[3], c = *line;
@@ -573,7 +573,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);
@@ -638,7 +638,7 @@ 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);
}
@@ -801,10 +801,10 @@ char* Log_CreateRtfHeader(MODULEINFO *mi)
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)
+ if (g_Settings.bLogIndentEnabled)
iIndent += iSize;
}
Log_Append(&buffer, &bufferEnd, &bufferAlloced, "\\fi-%u\\li%u", iIndent, iIndent);
@@ -871,7 +871,7 @@ static char* Log_CreateRTF(LOGSTREAMDATA *streamData)
bufferEnd += logIconBmpSize[iIndex];
}
- if (g_Settings.TimeStampEventColour) {
+ if (g_Settings.bTimeStampEventColour) {
// colored timestamps
static char szStyle[256];
LOGFONT &F = pci->aFonts[0].lf;
@@ -894,12 +894,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, pci->MakeTimeStamp(g_Settings.pszTimeStamp, lin->time), 30);
lstrcpyn(szOldTimeStamp, pci->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);
}
diff --git a/plugins/TabSRMM/src/chat/main.cpp b/plugins/TabSRMM/src/chat/main.cpp
index 57db8abc38..4163b17bb1 100644
--- a/plugins/TabSRMM/src/chat/main.cpp
+++ b/plugins/TabSRMM/src/chat/main.cpp
@@ -137,7 +137,6 @@ static void OnLoadSettings()
g_Settings.iEventLimitThreshold = db_get_w(NULL, "Chat", "LogLimitThreshold", 20);
g_Settings.dwIconFlags = M.GetDword("Chat", "IconFlags", 0x0000);
g_Settings.bOpenInDefault = M.GetBool("Chat", "DefaultContainer", true);
- g_Settings.bFlashWindowHightlight = M.GetBool("Chat", "FlashWindowHighlight", false);
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));
diff --git a/plugins/TabSRMM/src/chat/muchighlight.cpp b/plugins/TabSRMM/src/chat/muchighlight.cpp
index f2161f769d..f4690a4645 100644
--- a/plugins/TabSRMM/src/chat/muchighlight.cpp
+++ b/plugins/TabSRMM/src/chat/muchighlight.cpp
@@ -62,7 +62,7 @@ void CMUCHighlight::init()
if (0 == db_get_ts(0, "Chat", "HighlightNames", &dbv))
m_NickPatternString = dbv.ptszVal;
- m_dwFlags = M.GetByte("Chat", "HighlightEnabled", MATCH_TEXT);
+ m_dwFlags = M.GetByte("Chat", "bHighlightEnabled", MATCH_TEXT);
m_fHighlightMe = (M.GetByte("Chat", "HighlightMe", 1) ? true : false);
__try {
@@ -270,7 +270,7 @@ INT_PTR CALLBACK CMUCHighlight::dlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L
::db_free(&dbv);
}
- DWORD dwFlags = M.GetByte("Chat", "HighlightEnabled", MATCH_TEXT);
+ DWORD dwFlags = M.GetByte("Chat", "bHighlightEnabled", MATCH_TEXT);
::CheckDlgButton(hwndDlg, IDC_HIGHLIGHTNICKENABLE, dwFlags & MATCH_NICKNAME ? BST_CHECKED : BST_UNCHECKED);
::CheckDlgButton(hwndDlg, IDC_HIGHLIGHTNICKUID, dwFlags & MATCH_UIN ? BST_CHECKED : BST_UNCHECKED);
@@ -335,7 +335,7 @@ INT_PTR CALLBACK CMUCHighlight::dlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L
if (dwFlags & MATCH_NICKNAME)
dwFlags |= (::IsDlgButtonChecked(hwndDlg, IDC_HIGHLIGHTNICKUID) ? MATCH_UIN : 0);
- db_set_b(0, "Chat", "HighlightEnabled", dwFlags);
+ db_set_b(0, "Chat", "bHighlightEnabled", dwFlags);
db_set_b(0, "Chat", "HighlightMe", ::IsDlgButtonChecked(hwndDlg, IDC_HIGHLIGHTME) ? 1 : 0);
g_Settings.Highlight->init();
}
diff --git a/plugins/TabSRMM/src/chat/options.cpp b/plugins/TabSRMM/src/chat/options.cpp
index 1bdab48f4e..87d2f24f73 100644
--- a/plugins/TabSRMM/src/chat/options.cpp
+++ b/plugins/TabSRMM/src/chat/options.cpp
@@ -143,7 +143,7 @@ struct branch_t {
static branch_t branch1[] = {
{ LPGENT("Open new chat rooms in the default container"), "DefaultContainer", 0, 1, NULL },
{ LPGENT("Flash window when someone speaks"), "FlashWindow", 0, 0, NULL },
- { LPGENT("Flash window when a word is highlighted"), "FlashWindowHighlight", 0, 1, NULL },
+ { LPGENT("Flash window when a word is highlighted"), "bFlashWindowHighlight", 0, 1, NULL },
{ LPGENT("Create tabs or windows for highlight events"), "CreateWindowOnHighlight", 0, 0, NULL },
{ LPGENT("Activate chat window on highlight"), "AnnoyingHighlight", 0, 0, NULL },
{ LPGENT("Show list of users in the chat room"), "ShowNicklist", 0, 1, NULL },
@@ -162,9 +162,9 @@ static branch_t branch1[] = {
static branch_t branch2[] = {
{ LPGENT("Prefix all events with a timestamp"), "ShowTimeStamp", 0, 1, NULL },
{ LPGENT("Timestamp only when event time differs"), "ShowTimeStampIfChanged", 0, 0, NULL },
- { LPGENT("Timestamp has same color as the event"), "TimeStampEventColour", 0, 0, NULL },
- { LPGENT("Indent the second line of a message"), "LogIndentEnabled", 0, 1, NULL },
- { LPGENT("Limit user names in the message log to 20 characters"), "LogLimitNames", 0, 1, NULL },
+ { LPGENT("Timestamp has same color as the event"), "bTimeStampEventColour", 0, 0, NULL },
+ { LPGENT("Indent the second line of a message"), "bLogIndentEnabled", 0, 1, NULL },
+ { LPGENT("Limit user names in the message log to 20 characters"), "bLogLimitNames", 0, 1, NULL },
{ LPGENT("Add a colon (:) to auto-completed user names"), "AddColonToAutoComplete", 0, 1, NULL },
{ LPGENT("Start private conversation on doubleclick in nick list (insert nick if unchecked)"), "DoubleClick4Privat", 0, 0, NULL },
{ LPGENT("Strip colors from messages in the log"), "StripFormatting", 0, 0, NULL },
@@ -768,13 +768,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);
- Utils::enableDlgControl(hwndDlg, IDC_FONTCHOOSE, g_Settings.LoggingEnabled);
+ 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.LoggingEnabled);
+ Utils::enableDlgControl(hwndDlg, IDC_LIMIT, g_Settings.bLoggingEnabled);
if (ServiceExists(MS_UTILS_REPLACEVARS)) {
TCHAR tszTooltipText[2048];
@@ -925,12 +925,12 @@ 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);
mir_free(pszText1);
- g_Settings.LoggingEnabled = IsDlgButtonChecked(hwndDlg, IDC_LOGGING) == BST_CHECKED;
- db_set_b(0, "Chat", "LoggingEnabled", g_Settings.LoggingEnabled);
+ g_Settings.bLoggingEnabled = IsDlgButtonChecked(hwndDlg, IDC_LOGGING) == BST_CHECKED;
+ db_set_b(0, "Chat", "bLoggingEnabled", g_Settings.bLoggingEnabled);
}
else {
db_unset(NULL, "Chat", "LogDirectory");
- db_set_b(0, "Chat", "LoggingEnabled", 0);
+ db_set_b(0, "Chat", "bLoggingEnabled", 0);
}
pci->SM_InvalidateLogDirectories();
@@ -1063,7 +1063,7 @@ INT_PTR CALLBACK DlgProcOptions3(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
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);
+ CheckDlgButton(hwndDlg, IDC_TRAYONLYFORINACTIVE, M.GetByte("Chat", "bTrayIconInactiveOnly", 0) ? BST_CHECKED : BST_UNCHECKED);
break;
case WM_COMMAND:
@@ -1098,7 +1098,7 @@ INT_PTR CALLBACK DlgProcOptions3(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
db_set_b(0, "Chat", "LogSymbols", lr == 2 ? 1 : 0);
db_set_b(0, "Chat", "SkipWhenNoWindow", IsDlgButtonChecked(hwndDlg, IDC_NOPOPUPSFORCLOSEDWINDOWS) ? 1 : 0);
- db_set_b(0, "Chat", "TrayIconInactiveOnly", IsDlgButtonChecked(hwndDlg, IDC_TRAYONLYFORINACTIVE) ? 1 : 0);
+ db_set_b(0, "Chat", "bTrayIconInactiveOnly", IsDlgButtonChecked(hwndDlg, IDC_TRAYONLYFORINACTIVE) ? 1 : 0);
pci->ReloadSettings();
pci->MM_FontsChanged();
diff --git a/plugins/TabSRMM/src/chat/tools.cpp b/plugins/TabSRMM/src/chat/tools.cpp
index be3f0d826b..13e2ebe8e3 100644
--- a/plugins/TabSRMM/src/chat/tools.cpp
+++ b/plugins/TabSRMM/src/chat/tools.cpp
@@ -352,14 +352,14 @@ BOOL DoSoundsFlashPopupTrayStuff(SESSION_INFO *si, GCEVENT *gce, BOOL bHighlight
DoPopup(si, gce);
if (params->bInactive && si && si->hWnd)
SendMessage(si->hWnd, GC_SETMESSAGEHIGHLIGHT, 0, (LPARAM)si);
- if (g_Settings.bFlashWindowHightlight && params->bInactive)
+ if (g_Settings.bFlashWindowHighlight && params->bInactive)
params->bMustFlash = TRUE;
params->bMustAutoswitch = TRUE;
params->hNotifyIcon = pci->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)
bFlagUnread = true;
@@ -464,7 +464,7 @@ BOOL DoSoundsFlashPopupTrayStuff(SESSION_INFO *si, GCEVENT *gce, BOOL bHighlight
if (params->iEvent == GC_EVENT_MESSAGE) {
params->bMustAutoswitch = TRUE;
- if (g_Settings.FlashWindow)
+ if (g_Settings.bFlashWindow)
params->bMustFlash = TRUE;
params->hNotifyIcon = pci->hIcons[ICON_MESSAGE];
}
@@ -668,7 +668,7 @@ void Chat_SetFilters(SESSION_INFO *si)
BOOL IsHighlighted(SESSION_INFO *si, GCEVENT *gce)
{
- if (!g_Settings.HighlightEnabled || !g_Settings.pszHighlightWords || !gce)
+ if (!g_Settings.bHighlightEnabled || !g_Settings.pszHighlightWords || !gce)
return FALSE;
int dwMask = 0;
diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp
index f9e1a0265f..b73d01a13b 100644
--- a/plugins/TabSRMM/src/chat/window.cpp
+++ b/plugins/TabSRMM/src/chat/window.cpp
@@ -576,7 +576,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": ");