summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/m_chat_int.h30
-rw-r--r--plugins/Scriver/src/chat/chat.h6
-rw-r--r--plugins/Scriver/src/chat/main.cpp2
-rw-r--r--plugins/Scriver/src/chat/options.cpp41
-rw-r--r--plugins/Scriver/src/chat/window.cpp10
-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
-rw-r--r--protocols/Gadu-Gadu/src/image.cpp7
-rw-r--r--src/core/stdchat/src/chat.h2
-rw-r--r--src/core/stdchat/src/main.cpp20
-rw-r--r--src/core/stdchat/src/options.cpp40
-rw-r--r--src/core/stdchat/src/services.cpp2
-rw-r--r--src/core/stdchat/src/window.cpp42
-rw-r--r--src/modules/chat/chat_opts.cpp33
-rw-r--r--src/modules/chat/chat_svc.cpp4
-rw-r--r--src/modules/chat/log.cpp16
-rw-r--r--src/modules/chat/manager.cpp2
-rw-r--r--src/modules/chat/tools.cpp32
23 files changed, 173 insertions, 177 deletions
diff --git a/include/m_chat_int.h b/include/m_chat_int.h
index df67bb2909..f7179aa2f8 100644
--- a/include/m_chat_int.h
+++ b/include/m_chat_int.h
@@ -238,19 +238,21 @@ struct GCLogStreamDataBase
struct GlobalLogSettingsBase
{
- BOOL ShowTime;
- BOOL ShowTimeIfChanged;
- BOOL LoggingEnabled;
- BOOL FlashWindow;
- BOOL HighlightEnabled;
- BOOL LogIndentEnabled;
- BOOL StripFormat;
- BOOL SoundsFocus;
- BOOL PopupInactiveOnly;
- BOOL TrayIconInactiveOnly;
- BOOL AddColonToAutoComplete;
- BOOL LogLimitNames;
- BOOL TimeStampEventColour;
+ bool bShowTime;
+ bool bShowTimeIfChanged;
+ bool bLoggingEnabled;
+ bool bFlashWindow, bFlashWindowHighlight;
+ bool bHighlightEnabled;
+ bool bLogIndentEnabled;
+ bool bStripFormat;
+ bool bSoundsFocus;
+ bool bPopupInactiveOnly;
+ bool bTrayIconInactiveOnly;
+ bool bAddColonToAutoComplete;
+ bool bLogLimitNames;
+ bool bTimeStampEventColour;
+ bool bShowContactStatus;
+ bool bContactStatusFirst;
DWORD dwIconFlags;
DWORD dwTrayIconFlags;
DWORD dwPopupFlags;
@@ -280,8 +282,6 @@ struct GlobalLogSettingsBase
COLORREF crUserListHeadingsColor;
COLORREF crPUTextColour;
COLORREF crPUBkgColour;
- BOOL ShowContactStatus;
- BOOL ContactStatusFirst;
};
/////////////////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/Scriver/src/chat/chat.h b/plugins/Scriver/src/chat/chat.h
index 44623a8f68..a36cb817f9 100644
--- a/plugins/Scriver/src/chat/chat.h
+++ b/plugins/Scriver/src/chat/chat.h
@@ -27,9 +27,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define EM_ACTIVATE (WM_USER+202)
-#define TIMERID_MSGSEND 1
-#define TIMERID_TYPE 2
-#define TIMERID_UNREAD 3
+#define TIMERID_MSGSEND 201
+#define TIMERID_TYPE 202
+#define TIMERID_UNREAD 203
#define TIMEOUT_TYPEOFF 10000 // send type off after 10 seconds of inactivity
#define TIMEOUT_UNREAD 800 // multiple-send bombproofing: send max 3 messages every 4 seconds
diff --git a/plugins/Scriver/src/chat/main.cpp b/plugins/Scriver/src/chat/main.cpp
index c5a3c2d8cb..b4a3de264b 100644
--- a/plugins/Scriver/src/chat/main.cpp
+++ b/plugins/Scriver/src/chat/main.cpp
@@ -108,7 +108,7 @@ static void OnSetStatus(SESSION_INFO *si, int wStatus)
static void OnFlashWindow(SESSION_INFO *si, int bInactive)
{
- if (bInactive && si->hWnd && db_get_b(NULL, "Chat", "FlashWindowHighlight", 0) != 0)
+ if (bInactive && si->hWnd && g_Settings.bFlashWindowHighlight)
SendMessage(GetParent(si->hWnd), CM_STARTFLASHING, 0, 0);
if (bInactive && si->hWnd)
SendMessage(si->hWnd, GC_SETMESSAGEHIGHLIGHT, 0, 0);
diff --git a/plugins/Scriver/src/chat/options.cpp b/plugins/Scriver/src/chat/options.cpp
index 0ba390c71b..565449481e 100644
--- a/plugins/Scriver/src/chat/options.cpp
+++ b/plugins/Scriver/src/chat/options.cpp
@@ -36,7 +36,7 @@ struct branch_t
static struct branch_t branch1[] = {
{ LPGENT("Flash when someone speaks"), "FlashWindow", 0, 0, NULL },
- { LPGENT("Flash when a word is highlighted"), "FlashWindowHighlight", 0, 1, NULL },
+ { LPGENT("Flash when a word is highlighted"), "bFlashWindowHighlight", 0, 1, NULL },
{ LPGENT("Show chat user list"), "ShowNicklist", 0, 1, NULL },
{ LPGENT("Enable button context menus"), "RightClickFilter", 0, 0, NULL },
{ LPGENT("Show topic on your contact list (if supported)"), "TopicOnClist", 0, 0, NULL },
@@ -54,9 +54,9 @@ static struct branch_t branch2[] = {
GC_EVENT_KICK | GC_EVENT_NOTICE | GC_EVENT_NICK | GC_EVENT_INFORMATION | GC_EVENT_ADDSTATUS, 0, NULL },
{ LPGENT("Prefix all events with a timestamp"), "ShowTimeStamp", 0, 1, NULL },
{ LPGENT("Only prefix with timestamp if it has changed"), "ShowTimeStampIfChanged", 0, 0, NULL },
- { LPGENT("Timestamp has same color as event"), "TimeStampEventColour", 0, 0, NULL },
- { LPGENT("Indent the second line of a message"), "LogIndentEnabled", 0, 1, NULL },
- { LPGENT("Limit user names to 20 characters"), "LogLimitNames", 0, 1, NULL },
+ { LPGENT("Timestamp has same color as event"), "bTimeStampEventColour", 0, 0, NULL },
+ { LPGENT("Indent the second line of a message"), "bLogIndentEnabled", 0, 1, NULL },
+ { LPGENT("Limit user names to 20 characters"), "bLogLimitNames", 0, 1, NULL },
{ LPGENT("Strip colors from messages"), "StripFormatting", 0, 0, NULL },
{ LPGENT("Enable \'event filter\' for new rooms"), "FilterEnabled", 0, 0, NULL }
};
@@ -76,7 +76,7 @@ static struct branch_t branch3[] = {
};
static struct branch_t branch4[] = {
- { LPGENT("Show icons in tray only when the chat room is not active"), "TrayIconInactiveOnly", 0, 1, NULL },
+ { LPGENT("Show icons in tray only when the chat room is not active"), "bTrayIconInactiveOnly", 0, 1, NULL },
{ LPGENT("Show icon in tray for topic changes"), "TrayIconFlags", GC_EVENT_TOPIC, 0, NULL },
{ LPGENT("Show icon in tray for users joining"), "TrayIconFlags", GC_EVENT_JOIN, 0, NULL },
{ LPGENT("Show icon in tray for users disconnecting"), "TrayIconFlags", GC_EVENT_QUIT, 0, NULL },
@@ -326,6 +326,7 @@ INT_PTR CALLBACK DlgProcOptions1(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lPa
SaveBranch(GetDlgItem(hwndDlg, IDC_CHAT_CHECKBOXES), branch1, SIZEOF(branch1));
SaveBranch(GetDlgItem(hwndDlg, IDC_CHAT_CHECKBOXES), branch4, SIZEOF(branch4));
+ pci->ReloadSettings();
pci->SM_BroadcastMessage(NULL, GC_SETWNDPROPS, 0, 0, TRUE);
}
return TRUE;
@@ -405,13 +406,13 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lPa
SetDlgItemText(hwndDlg, IDC_CHAT_TIMESTAMP, g_Settings.pszTimeStamp);
SetDlgItemText(hwndDlg, IDC_CHAT_OUTSTAMP, g_Settings.pszOutgoingNick);
SetDlgItemText(hwndDlg, IDC_CHAT_INSTAMP, g_Settings.pszIncomingNick);
- CheckDlgButton(hwndDlg, IDC_CHAT_HIGHLIGHT, g_Settings.HighlightEnabled);
- EnableWindow(GetDlgItem(hwndDlg, IDC_CHAT_HIGHLIGHTWORDS), g_Settings.HighlightEnabled ? TRUE : FALSE);
- CheckDlgButton(hwndDlg, IDC_CHAT_LOGGING, g_Settings.LoggingEnabled);
- EnableWindow(GetDlgItem(hwndDlg, IDC_CHAT_LOGDIRECTORY), g_Settings.LoggingEnabled ? TRUE : FALSE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_CHAT_LOGDIRCHOOSE), g_Settings.LoggingEnabled ? TRUE : FALSE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_CHAT_LIMIT), g_Settings.LoggingEnabled ? TRUE : FALSE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_CHAT_LIMITTEXT2), g_Settings.LoggingEnabled ? TRUE : FALSE);
+ CheckDlgButton(hwndDlg, IDC_CHAT_HIGHLIGHT, g_Settings.bHighlightEnabled);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CHAT_HIGHLIGHTWORDS), g_Settings.bHighlightEnabled ? TRUE : FALSE);
+ CheckDlgButton(hwndDlg, IDC_CHAT_LOGGING, g_Settings.bLoggingEnabled);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CHAT_LOGDIRECTORY), g_Settings.bLoggingEnabled ? TRUE : FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CHAT_LOGDIRCHOOSE), g_Settings.bLoggingEnabled ? TRUE : FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CHAT_LIMIT), g_Settings.bLoggingEnabled ? TRUE : FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_CHAT_LIMITTEXT2), g_Settings.bLoggingEnabled ? TRUE : FALSE);
hListHeading2 = InsertBranch(GetDlgItem(hwndDlg, IDC_CHAT_CHECKBOXES), TranslateT("Appearance"), db_get_b(NULL, "Chat", "Branch2Exp", 0) ? TRUE : FALSE);
hListHeading3 = InsertBranch(GetDlgItem(hwndDlg, IDC_CHAT_CHECKBOXES), TranslateT("Default events to show in new chat rooms if the \'event filter\' is enabled"), db_get_b(NULL, "Chat", "Branch3Exp", 0) ? TRUE : FALSE);
@@ -579,11 +580,11 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lPa
}
else db_unset(NULL, "Chat", "HeaderOutgoing");
- g_Settings.HighlightEnabled = IsDlgButtonChecked(hwndDlg, IDC_CHAT_HIGHLIGHT) == BST_CHECKED ? TRUE : FALSE;
- db_set_b(NULL, "Chat", "HighlightEnabled", (BYTE)g_Settings.HighlightEnabled);
+ g_Settings.bHighlightEnabled = IsDlgButtonChecked(hwndDlg, IDC_CHAT_HIGHLIGHT) == BST_CHECKED ? TRUE : FALSE;
+ db_set_b(NULL, "Chat", "bHighlightEnabled", (BYTE)g_Settings.bHighlightEnabled);
- g_Settings.LoggingEnabled = IsDlgButtonChecked(hwndDlg, IDC_CHAT_LOGGING) == BST_CHECKED ? TRUE : FALSE;
- db_set_b(NULL, "Chat", "LoggingEnabled", (BYTE)g_Settings.LoggingEnabled);
+ g_Settings.bLoggingEnabled = IsDlgButtonChecked(hwndDlg, IDC_CHAT_LOGGING) == BST_CHECKED ? TRUE : FALSE;
+ db_set_b(NULL, "Chat", "bLoggingEnabled", (BYTE)g_Settings.bLoggingEnabled);
iLen = SendDlgItemMessage(hwndDlg, IDC_CHAT_SPIN2, UDM_GETPOS, 0, 0);
db_set_w(NULL, "Chat", "LogLimit", (WORD)iLen);
@@ -598,11 +599,11 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lPa
g_Settings.dwIconFlags = db_get_dw(NULL, "Chat", "IconFlags", 0x0000);
g_Settings.dwTrayIconFlags = db_get_dw(NULL, "Chat", "TrayIconFlags", 0x1000);
g_Settings.dwPopupFlags = db_get_dw(NULL, "Chat", "PopupFlags", 0x0000);
- g_Settings.StripFormat = (BOOL)db_get_b(NULL, "Chat", "TrimFormatting", 0);
- g_Settings.TrayIconInactiveOnly = (BOOL)db_get_b(NULL, "Chat", "TrayIconInactiveOnly", 1);
- g_Settings.PopupInactiveOnly = (BOOL)db_get_b(NULL, "Chat", "PopUpInactiveOnly", 1);
+ g_Settings.bStripFormat = db_get_b(NULL, "Chat", "TrimFormatting", 0) != 0;
+ g_Settings.bTrayIconInactiveOnly = db_get_b(NULL, "Chat", "bTrayIconInactiveOnly", 1) != 0;
+ g_Settings.bPopupInactiveOnly = db_get_b(NULL, "Chat", "PopUpInactiveOnly", 1) != 0;
+ g_Settings.bLogIndentEnabled = (db_get_b(NULL, "Chat", "bLogIndentEnabled", 1) != 0) ? TRUE : FALSE;
- g_Settings.LogIndentEnabled = (db_get_b(NULL, "Chat", "LogIndentEnabled", 1) != 0) ? TRUE : FALSE;
pci->MM_FontsChanged();
pci->SM_BroadcastMessage(NULL, GC_SETWNDPROPS, 0, 0, TRUE);
return TRUE;
diff --git a/plugins/Scriver/src/chat/window.cpp b/plugins/Scriver/src/chat/window.cpp
index e32ff87438..6058e281c8 100644
--- a/plugins/Scriver/src/chat/window.cpp
+++ b/plugins/Scriver/src/chat/window.cpp
@@ -284,7 +284,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 *)mir_alloc((_tcslen(pszName) + 4) * sizeof(TCHAR));
_tcscpy(szReplace, pszName);
_tcscat(szReplace, _T(": "));
@@ -1341,14 +1341,14 @@ static INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR
si->wState |= GC_EVENT_HIGHLIGHT;
SendMessage(si->hWnd, GC_FIXTABICONS, 0, 0);
SendMessage(hwndDlg, DM_UPDATETITLEBAR, 0, 0);
- if (db_get_b(NULL, "Chat", "FlashWindowHighlight", 0) != 0 && GetActiveWindow() != hwndDlg && GetForegroundWindow() != GetParent(hwndDlg))
+ if (g_Settings.bFlashWindowHighlight && GetActiveWindow() != hwndDlg && GetForegroundWindow() != GetParent(hwndDlg))
SendMessage(GetParent(si->hWnd), CM_STARTFLASHING, 0, 0);
break;
case GC_SETTABHIGHLIGHT:
SendMessage(si->hWnd, GC_FIXTABICONS, 0, 0);
SendMessage(hwndDlg, DM_UPDATETITLEBAR, 0, 0);
- if (g_Settings.FlashWindow && GetActiveWindow() != GetParent(hwndDlg) && GetForegroundWindow() != GetParent(hwndDlg))
+ if (g_Settings.bFlashWindow && GetActiveWindow() != GetParent(hwndDlg) && GetForegroundWindow() != GetParent(hwndDlg))
SendMessage(GetParent(si->hWnd), CM_STARTFLASHING, 0, 0);
break;
@@ -1425,7 +1425,7 @@ static INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR
else //if (dis->itemState & ODS_INACTIVE)
FillRect(dis->hDC, &dis->rcItem, pci->hListBkgBrush);
- 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 - 3, hIcon, 16, 16, 0, NULL, DI_NORMAL);
Skin_ReleaseIcon(hIcon);
@@ -1433,7 +1433,7 @@ static INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR
}
DrawIconEx(dis->hDC, x_offset, dis->rcItem.top + offset, hIcon, 10, 10, 0, NULL, DI_NORMAL);
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 - 3, hIcon, 16, 16, 0, NULL, DI_NORMAL);
Skin_ReleaseIcon(hIcon);
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": ");
diff --git a/protocols/Gadu-Gadu/src/image.cpp b/protocols/Gadu-Gadu/src/image.cpp
index abcd765e88..15006095aa 100644
--- a/protocols/Gadu-Gadu/src/image.cpp
+++ b/protocols/Gadu-Gadu/src/image.cpp
@@ -929,15 +929,10 @@ int GGPROTO::img_display(HANDLE hContact, void *img)
gg_LeaveCriticalSection(&img_mutex, "img_display", 60, 1, "img_mutex", 1);
SendMessage(dat->hWnd, WM_ADDIMAGE, 0, (LPARAM)img);
- if (/*db_get_b(NULL, "Chat", "FlashWindowHighlight", 0) != 0 && */
+ if (/*db_get_b(NULL, "Chat", "bFlashWindowHighlight", 0) != 0 && */
GetActiveWindow() != dat->hWnd && GetForegroundWindow() != dat->hWnd)
SetTimer(dat->hWnd, TIMERID_FLASHWND, 900, NULL);
- /* DEPRECATED: No more grabbing the focus... just flashing
- SetForegroundWindow(dat->hWnd);
- SetFocus(dat->hWnd);
- */
-
return TRUE;
}
diff --git a/src/core/stdchat/src/chat.h b/src/core/stdchat/src/chat.h
index c5e3472401..cf157efb7d 100644
--- a/src/core/stdchat/src/chat.h
+++ b/src/core/stdchat/src/chat.h
@@ -97,7 +97,7 @@ struct LOGSTREAMDATA : public GCLogStreamDataBase {};
struct GlobalLogSettings : public GlobalLogSettingsBase
{
int iX, iY;
- bool TabsEnable, TabsAtBottom, TabCloseOnDblClick, TabRestore;
+ bool bTabsEnable, TabsAtBottom, TabCloseOnDblClick, TabRestore;
};
extern GlobalLogSettings g_Settings;
diff --git a/src/core/stdchat/src/main.cpp b/src/core/stdchat/src/main.cpp
index d1fc7f764d..1bda6ebd07 100644
--- a/src/core/stdchat/src/main.cpp
+++ b/src/core/stdchat/src/main.cpp
@@ -114,7 +114,7 @@ static void OnClearLog(SESSION_INFO *si)
static void OnSessionDblClick(SESSION_INFO *si)
{
- if (g_Settings.TabsEnable)
+ if (g_Settings.bTabsEnable)
SendMessage(si->hWnd, GC_REMOVETAB, 1, (LPARAM)si);
else
PostMessage(si->hWnd, GC_CLOSEWINDOW, 0, 0);
@@ -122,7 +122,7 @@ static void OnSessionDblClick(SESSION_INFO *si)
static void OnSessionRemove(SESSION_INFO *si)
{
- if (!g_Settings.TabsEnable) {
+ if (!g_Settings.bTabsEnable) {
if (si->hWnd)
SendMessage(si->hWnd, GC_EVENT_CONTROL + WM_USER + 500, SESSION_TERMINATE, 0);
}
@@ -135,7 +135,7 @@ static void OnSessionRemove(SESSION_INFO *si)
static void OnSessionRename(SESSION_INFO *si)
{
- if (g_TabSession.hWnd && g_Settings.TabsEnable) {
+ if (g_TabSession.hWnd && g_Settings.bTabsEnable) {
g_TabSession.ptszName = si->ptszName;
SendMessage(g_TabSession.hWnd, GC_SESSIONNAMECHANGE, 0, (LPARAM)si);
}
@@ -146,7 +146,7 @@ static void OnSessionReplace(SESSION_INFO *si)
if (si->hWnd)
g_TabSession.nUsersInNicklist = 0;
- if (!g_Settings.TabsEnable) {
+ if (!g_Settings.bTabsEnable) {
if (si->hWnd)
RedrawWindow(GetDlgItem(si->hWnd, IDC_LIST), NULL, NULL, RDW_INVALIDATE);
}
@@ -158,7 +158,7 @@ static void OnSessionOffline(SESSION_INFO *si)
{
if (si->hWnd) {
g_TabSession.nUsersInNicklist = 0;
- if (g_Settings.TabsEnable)
+ if (g_Settings.bTabsEnable)
g_TabSession.pUsers = 0;
}
}
@@ -209,13 +209,13 @@ static void OnRemoveUser(SESSION_INFO *si, USERINFO*)
static void OnAddStatus(SESSION_INFO *si, STATUSINFO*)
{
- if (g_Settings.TabsEnable && si->hWnd)
+ if (g_Settings.bTabsEnable && si->hWnd)
g_TabSession.pStatuses = si->pStatuses;
}
static void OnSetStatus(SESSION_INFO *si, int wStatus)
{
- if (g_Settings.TabsEnable) {
+ if (g_Settings.bTabsEnable) {
if (si->hWnd)
g_TabSession.wStatus = wStatus;
if (g_TabSession.hWnd)
@@ -234,9 +234,9 @@ static void OnFlashWindow(SESSION_INFO *si, int bInactive)
if (!bInactive)
return;
- if (!g_Settings.TabsEnable && si->hWnd && db_get_b(NULL, "Chat", "FlashWindowHighlight", 0) != 0)
+ if (!g_Settings.bTabsEnable && si->hWnd && g_Settings.bFlashWindowHighlight)
SetTimer(si->hWnd, TIMERID_FLASHWND, 900, NULL);
- if (g_Settings.TabsEnable && g_TabSession.hWnd)
+ if (g_Settings.bTabsEnable && g_TabSession.hWnd)
SendMessage(g_TabSession.hWnd, GC_SETMESSAGEHIGHLIGHT, 0, (LPARAM)si);
}
@@ -259,7 +259,7 @@ static void OnLoadSettings()
g_Settings.iX = db_get_dw(NULL, "Chat", "roomx", -1);
g_Settings.iY = db_get_dw(NULL, "Chat", "roomy", -1);
- g_Settings.TabsEnable = db_get_b(NULL, "Chat", "Tabs", 1) != 0;
+ g_Settings.bTabsEnable = db_get_b(NULL, "Chat", "Tabs", 1) != 0;
g_Settings.TabRestore = db_get_b(NULL, "Chat", "TabRestore", 0) != 0;
g_Settings.TabsAtBottom = db_get_b(NULL, "Chat", "TabBottom", 0) != 0;
g_Settings.TabCloseOnDblClick = db_get_b(NULL, "Chat", "TabCloseOnDblClick", 0) != 0;
diff --git a/src/core/stdchat/src/options.cpp b/src/core/stdchat/src/options.cpp
index f643253b81..326d253369 100644
--- a/src/core/stdchat/src/options.cpp
+++ b/src/core/stdchat/src/options.cpp
@@ -40,7 +40,7 @@ static const struct branch_t branch1[] = {
{ LPGENT("Send message by pressing the 'Enter' key"), "SendOnEnter", 0, 1},
{ LPGENT("Send message by pressing the 'Enter' key twice"), "SendOnDblEnter", 0,0},
{ LPGENT("Flash window when someone speaks"), "FlashWindow", 0,0},
- { LPGENT("Flash window when a word is highlighted"), "FlashWindowHighlight", 0,1},
+ { LPGENT("Flash window when a word is highlighted"), "bFlashWindowHighlight", 0,1},
{ LPGENT("Show list of users in the chat room"), "ShowNicklist", 0,1},
{ LPGENT("Show button for sending messages"), "ShowSend", 0, 0},
{ LPGENT("Show buttons for controlling the chat room"), "ShowTopButtons", 0,1},
@@ -59,9 +59,9 @@ static const struct branch_t branch1[] = {
static const struct branch_t branch2[] = {
{ LPGENT("Prefix all events with a timestamp"), "ShowTimeStamp", 0,1},
{ LPGENT("Only prefix with timestamp if it has changed"), "ShowTimeStampIfChanged", 0,0},
- { LPGENT("Timestamp has same color as the event"), "TimeStampEventColour", 0,0},
- { LPGENT("Indent the second line of a message"), "LogIndentEnabled", 0,1},
- { LPGENT("Limit user names in the message log to 20 characters"), "LogLimitNames", 0,1},
+ { LPGENT("Timestamp has same color as the event"), "bTimeStampEventColour", 0,0},
+ { LPGENT("Indent the second line of a message"), "bLogIndentEnabled", 0,1},
+ { LPGENT("Limit user names in the message log to 20 characters"), "bLogLimitNames", 0,1},
{ LPGENT("Add \':\' to auto-completed user names"), "AddColonToAutoComplete", 0, 1},
{ LPGENT("Strip colors from messages in the log"), "StripFormatting", 0, 0},
{ LPGENT("Enable the \'event filter\' for new rooms"), "FilterEnabled", 0,0}
@@ -97,7 +97,7 @@ static const struct branch_t branch4[] = {
};
static const struct branch_t branch5[] = {
- { LPGENT("Show icons in tray only when the chat room is not active"), "TrayIconInactiveOnly", 0, 1},
+ { LPGENT("Show icons in tray only when the chat room is not active"), "bTrayIconInactiveOnly", 0, 1},
{ LPGENT("Show icon in tray for topic changes"), "TrayIconFlags", GC_EVENT_TOPIC, 0},
{ LPGENT("Show icon in tray for users joining"), "TrayIconFlags", GC_EVENT_JOIN, 0},
{ LPGENT("Show icon in tray for users disconnecting"), "TrayIconFlags", GC_EVENT_QUIT, 0},
@@ -423,14 +423,14 @@ static INT_PTR CALLBACK DlgProcOptions1(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPA
g_Settings.dwIconFlags = db_get_dw(NULL, "Chat", "IconFlags", 0x0000);
g_Settings.dwTrayIconFlags = db_get_dw(NULL, "Chat", "TrayIconFlags", 0x1000);
g_Settings.dwPopupFlags = db_get_dw(NULL, "Chat", "PopupFlags", 0x0000);
- g_Settings.StripFormat = (BOOL)db_get_b(NULL, "Chat", "TrimFormatting", 0);
- g_Settings.TrayIconInactiveOnly = (BOOL)db_get_b(NULL, "Chat", "TrayIconInactiveOnly", 1);
- g_Settings.PopupInactiveOnly = (BOOL)db_get_b(NULL, "Chat", "PopupInactiveOnly", 1);
- g_Settings.LogIndentEnabled = (db_get_b(NULL, "Chat", "LogIndentEnabled", 1) != 0) ? TRUE : FALSE;
+ g_Settings.bStripFormat = db_get_b(NULL, "Chat", "TrimFormatting", 0) != 0;
+ g_Settings.bTrayIconInactiveOnly = db_get_b(NULL, "Chat", "bTrayIconInactiveOnly", 1) != 0;
+ g_Settings.bPopupInactiveOnly = db_get_b(NULL, "Chat", "PopupInactiveOnly", 1) != 0;
+ g_Settings.bLogIndentEnabled = db_get_b(NULL, "Chat", "bLogIndentEnabled", 1) != 0;
if (b != db_get_b(NULL, "Chat", "Tabs", 1)) {
pci->SM_BroadcastMessage(NULL, GC_CLOSEWINDOW, 0, 1, FALSE);
- g_Settings.TabsEnable = db_get_b(NULL, "Chat", "Tabs", 1) != 0;
+ g_Settings.bTabsEnable = db_get_b(NULL, "Chat", "Tabs", 1) != 0;
}
else pci->SM_BroadcastMessage(NULL, GC_SETWNDPROPS, 0, 0, TRUE);
@@ -491,12 +491,12 @@ static INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPA
SetDlgItemText(hwndDlg, IDC_TIMESTAMP, g_Settings.pszTimeStamp);
SetDlgItemText(hwndDlg, IDC_OUTSTAMP, g_Settings.pszOutgoingNick);
SetDlgItemText(hwndDlg, IDC_INSTAMP, g_Settings.pszIncomingNick);
- CheckDlgButton(hwndDlg, IDC_HIGHLIGHT, g_Settings.HighlightEnabled);
- EnableWindow(GetDlgItem(hwndDlg, IDC_HIGHLIGHTWORDS), g_Settings.HighlightEnabled ? TRUE : FALSE);
- CheckDlgButton(hwndDlg, IDC_LOGGING, g_Settings.LoggingEnabled);
- EnableWindow(GetDlgItem(hwndDlg, IDC_LOGDIRECTORY), g_Settings.LoggingEnabled ? TRUE : FALSE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_FONTCHOOSE), g_Settings.LoggingEnabled ? TRUE : FALSE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_LIMIT), g_Settings.LoggingEnabled ? TRUE : FALSE);
+ CheckDlgButton(hwndDlg, IDC_HIGHLIGHT, g_Settings.bHighlightEnabled);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_HIGHLIGHTWORDS), g_Settings.bHighlightEnabled ? TRUE : FALSE);
+ CheckDlgButton(hwndDlg, IDC_LOGGING, g_Settings.bLoggingEnabled);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_LOGDIRECTORY), g_Settings.bLoggingEnabled ? TRUE : FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_FONTCHOOSE), g_Settings.bLoggingEnabled ? TRUE : FALSE);
+ EnableWindow(GetDlgItem(hwndDlg, IDC_LIMIT), g_Settings.bLoggingEnabled ? TRUE : FALSE);
break;
case WM_COMMAND:
@@ -613,11 +613,11 @@ static INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPA
}
else db_unset(NULL, "Chat", "HeaderOutgoing");
- g_Settings.HighlightEnabled = IsDlgButtonChecked(hwndDlg, IDC_HIGHLIGHT) == BST_CHECKED ? TRUE : FALSE;
- db_set_b(NULL, "Chat", "HighlightEnabled", (BYTE)g_Settings.HighlightEnabled);
+ g_Settings.bHighlightEnabled = IsDlgButtonChecked(hwndDlg, IDC_HIGHLIGHT) == BST_CHECKED;
+ db_set_b(NULL, "Chat", "bHighlightEnabled", g_Settings.bHighlightEnabled);
- g_Settings.LoggingEnabled = IsDlgButtonChecked(hwndDlg, IDC_LOGGING) == BST_CHECKED ? TRUE : FALSE;
- db_set_b(NULL, "Chat", "LoggingEnabled", (BYTE)g_Settings.LoggingEnabled);
+ g_Settings.bLoggingEnabled = IsDlgButtonChecked(hwndDlg, IDC_LOGGING) == BST_CHECKED;
+ db_set_b(NULL, "Chat", "bLoggingEnabled", g_Settings.bLoggingEnabled);
iLen = SendDlgItemMessage(hwndDlg, IDC_SPIN2, UDM_GETPOS, 0, 0);
db_set_w(NULL, "Chat", "LogLimit", (WORD)iLen);
diff --git a/src/core/stdchat/src/services.cpp b/src/core/stdchat/src/services.cpp
index 02b129554c..d921faaecd 100644
--- a/src/core/stdchat/src/services.cpp
+++ b/src/core/stdchat/src/services.cpp
@@ -27,7 +27,7 @@ void ShowRoom(SESSION_INFO *si, WPARAM wp, BOOL bSetForeground)
if (!si)
return;
- if (g_Settings.TabsEnable) {
+ if (g_Settings.bTabsEnable) {
// the session is not the current tab, so we copy the necessary
// details into the SESSION_INFO for the tabbed window
if (!si->hWnd) {
diff --git a/src/core/stdchat/src/window.cpp b/src/core/stdchat/src/window.cpp
index d3298ec559..b720302bbc 100644
--- a/src/core/stdchat/src/window.cpp
+++ b/src/core/stdchat/src/window.cpp
@@ -128,7 +128,7 @@ static int RoomWndResize(HWND hwndDlg, LPARAM lParam, UTILRESIZECONTROL *urc)
BOOL bToolbar = bFormat || bControl;
BOOL bSend = (BOOL)db_get_b(NULL, "Chat", "ShowSend", 0);
BOOL bNick = si->iType != GCW_SERVER && si->bNicklistEnabled;
- BOOL bTabs = g_Settings.TabsEnable;
+ BOOL bTabs = g_Settings.bTabsEnable;
BOOL bTabBottom = g_Settings.TabsAtBottom;
RECT rc, rcTabs;
@@ -148,8 +148,8 @@ static int RoomWndResize(HWND hwndDlg, LPARAM lParam, UTILRESIZECONTROL *urc)
ShowWindow(GetDlgItem(hwndDlg, IDC_CHANMGR), bControl ? SW_SHOW : SW_HIDE);
ShowWindow(GetDlgItem(hwndDlg, IDOK), bSend ? SW_SHOW : SW_HIDE);
ShowWindow(GetDlgItem(hwndDlg, IDC_SPLITTERX), bNick ? SW_SHOW : SW_HIDE);
- ShowWindow(GetDlgItem(hwndDlg, IDC_CLOSE), g_Settings.TabsEnable ? SW_SHOW : SW_HIDE);
- ShowWindow(GetDlgItem(hwndDlg, IDC_TAB), g_Settings.TabsEnable ? SW_SHOW : SW_HIDE);
+ ShowWindow(GetDlgItem(hwndDlg, IDC_CLOSE), g_Settings.bTabsEnable ? SW_SHOW : SW_HIDE);
+ ShowWindow(GetDlgItem(hwndDlg, IDC_TAB), g_Settings.bTabsEnable ? SW_SHOW : SW_HIDE);
if (si->iType != GCW_SERVER)
ShowWindow(GetDlgItem(hwndDlg, IDC_LIST), si->bNicklistEnabled ? SW_SHOW : SW_HIDE);
else
@@ -340,7 +340,7 @@ static LRESULT CALLBACK MessageSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
}
if (wParam == VK_TAB && isCtrl && !isShift) { // CTRL-TAB (switch tab/window)
- if (g_Settings.TabsEnable)
+ if (g_Settings.bTabsEnable)
SendMessage(GetParent(hwnd), GC_SWITCHNEXTTAB, 0, 0);
else
pci->ShowRoom(SM_GetNextWindow(Parentsi), WINDOW_VISIBLE, TRUE);
@@ -348,7 +348,7 @@ static LRESULT CALLBACK MessageSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
}
if (wParam == VK_TAB && isCtrl && isShift) { // CTRL_SHIFT-TAB (switch tab/window)
- if (g_Settings.TabsEnable)
+ if (g_Settings.bTabsEnable)
SendMessage(GetParent(hwnd), GC_SWITCHPREVTAB, 0, 0);
else
pci->ShowRoom(SM_GetPrevWindow(Parentsi), WINDOW_VISIBLE, TRUE);
@@ -356,11 +356,11 @@ static LRESULT CALLBACK MessageSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
}
if (wParam <= '9' && wParam >= '1' && isCtrl && !isAlt) // CTRL + 1 -> 9 (switch tab)
- if (g_Settings.TabsEnable)
+ if (g_Settings.bTabsEnable)
SendMessage(GetParent(hwnd), GC_SWITCHTAB, 0, (LPARAM)((int)wParam - (int)'1'));
if (wParam <= VK_NUMPAD9 && wParam >= VK_NUMPAD1 && isCtrl && !isAlt) // CTRL + 1 -> 9 (switch tab)
- if (g_Settings.TabsEnable)
+ if (g_Settings.bTabsEnable)
SendMessage(GetParent(hwnd), GC_SWITCHTAB, 0, (LPARAM)((int)wParam - (int)VK_NUMPAD1));
if (wParam == VK_TAB && !isCtrl && !isShift) { //tab-autocomplete
@@ -422,7 +422,7 @@ static LRESULT CALLBACK MessageSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
if (dat->szTabSave[0] != '\0' && wParam != VK_RIGHT && wParam != VK_LEFT &&
wParam != VK_SPACE && wParam != VK_RETURN && wParam != VK_BACK && wParam != VK_DELETE)
{
- if (g_Settings.AddColonToAutoComplete && start == 0)
+ if (g_Settings.bAddColonToAutoComplete && start == 0)
SendMessageA(hwnd, EM_REPLACESEL, FALSE, (LPARAM) ": ");
dat->szTabSave[0] = '\0';
@@ -1177,7 +1177,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam)
}
// restore previous tabs
- if (g_Settings.TabsEnable && g_Settings.TabRestore) {
+ if (g_Settings.bTabsEnable && g_Settings.TabRestore) {
TABLIST *node = g_TabList;
while (node) {
SESSION_INFO *s = pci->SM_FindSession(node->pszID, node->pszModule);
@@ -1221,7 +1221,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam)
SendMessage(GetDlgItem(hwndDlg, IDC_LOG), EM_SETBKGNDCOLOR , 0, g_Settings.crLogBackground);
- if (g_Settings.TabsEnable) {
+ if (g_Settings.bTabsEnable) {
int mask = (int)GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_TAB), GWL_STYLE);
if (g_Settings.TabsAtBottom)
mask |= TCS_BOTTOM;
@@ -1251,7 +1251,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam)
int font = ih > ih2 ? ih : ih2;
// make sure we have space for icon!
- if (g_Settings.ShowContactStatus)
+ if (g_Settings.bShowContactStatus)
font = font > 16 ? font : 16;
SendMessage(GetDlgItem(hwndDlg, IDC_LIST), LB_SETITEMHEIGHT, 0, (LPARAM)height > font ? height : font);
@@ -1332,13 +1332,13 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam)
break;
}
if (savePerContact) {
- if (RestoreWindowPosition(hwndDlg, g_Settings.TabsEnable?NULL:si->hContact, "Chat", "room", SW_HIDE))
+ if (RestoreWindowPosition(hwndDlg, g_Settings.bTabsEnable?NULL:si->hContact, "Chat", "room", SW_HIDE))
break;
SetWindowPos(hwndDlg, 0, (screen.right-screen.left)/2- (550)/2,(screen.bottom-screen.top)/2- (400)/2, (550), (400), SWP_NOZORDER |SWP_HIDEWINDOW|SWP_NOACTIVATE);
}
else SetWindowPos(hwndDlg, 0, (screen.right-screen.left)/2- (550)/2,(screen.bottom-screen.top)/2- (400)/2, (550), (400), SWP_NOZORDER |SWP_HIDEWINDOW|SWP_NOACTIVATE);
- if (!g_Settings.TabsEnable && pActive && pActive->hWnd && db_get_b(NULL, "Chat", "CascadeWindows", 1)) {
+ if (!g_Settings.bTabsEnable && pActive && pActive->hWnd && db_get_b(NULL, "Chat", "CascadeWindows", 1)) {
RECT rcThis, rcNew;
int dwFlag = SWP_NOZORDER | SWP_NOACTIVATE;
if (!IsWindowVisible((HWND)wParam))
@@ -1624,7 +1624,7 @@ END_REMOVETAB:
if (pci->SM_FindSession(si->ptszID, si->pszModule) == s2)
si->wState = s2->wState;
SendMessage(hwndDlg, GC_FIXTABICONS, 0, (LPARAM)s2);
- if (db_get_b(NULL, "Chat", "FlashWindowHighlight", 0) != 0 && GetActiveWindow() != hwndDlg && GetForegroundWindow() != hwndDlg)
+ if (g_Settings.bFlashWindowHighlight && GetActiveWindow() != hwndDlg && GetForegroundWindow() != hwndDlg)
SetTimer(hwndDlg, TIMERID_FLASHWND, 900, NULL);
break;
} }
@@ -1645,7 +1645,7 @@ END_REMOVETAB:
SESSION_INFO *s2 = (SESSION_INFO*)tci.lParam;
if (s2 && s == s2) { // highlight
SendMessage(hwndDlg, GC_FIXTABICONS, 0, (LPARAM)s2);
- if (g_Settings.FlashWindow && GetActiveWindow() != hwndDlg && GetForegroundWindow() != hwndDlg)
+ if (g_Settings.bFlashWindow && GetActiveWindow() != hwndDlg && GetForegroundWindow() != hwndDlg)
SetTimer(hwndDlg, TIMERID_FLASHWND, 900, NULL);
break;
}
@@ -1752,7 +1752,7 @@ END_REMOVETAB:
int height = db_get_b(NULL, "Chat", "NicklistRowDist", 12);
// make sure we have space for icon!
- if (g_Settings.ShowContactStatus)
+ if (g_Settings.bShowContactStatus)
font = font > 16 ? font : 16;
mis->itemHeight = height > font?height:font;
@@ -1786,14 +1786,14 @@ END_REMOVETAB:
else //if (dis->itemState & ODS_INACTIVE)
FillRect(dis->hDC, &dis->rcItem, pci->hListBkgBrush);
- 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-3,hIcon,16,16,0,NULL, DI_NORMAL);
x_offset += 18;
}
DrawIconEx(dis->hDC,x_offset, dis->rcItem.top + offset,hIcon,10,10,0,NULL, DI_NORMAL);
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-3,hIcon,16,16,0,NULL, DI_NORMAL);
x_offset += 18;
@@ -2013,7 +2013,7 @@ LABEL_SHOWWINDOW:
g_Settings.iWidth = wp.rcNormalPosition.right - wp.rcNormalPosition.left;
g_Settings.iHeight = wp.rcNormalPosition.bottom - wp.rcNormalPosition.top;
- if (g_Settings.TabsEnable) {
+ if (g_Settings.bTabsEnable) {
int i = TabCtrl_GetCurSel(GetDlgItem(hwndDlg, IDC_TAB));
if (i != -1) {
TCITEM tci;
@@ -2530,7 +2530,7 @@ LABEL_SHOWWINDOW:
break;
case WM_CLOSE:
- if (g_Settings.TabsEnable && g_Settings.TabRestore && lParam != 1) {
+ if (g_Settings.bTabsEnable && g_Settings.TabRestore && lParam != 1) {
TCITEM id = { 0 };
int j = TabCtrl_GetItemCount(GetDlgItem(hwndDlg, IDC_TAB)) - 1;
id.mask = TCIF_PARAM;
@@ -2546,7 +2546,7 @@ LABEL_SHOWWINDOW:
break;
case GC_CLOSEWINDOW:
- if (g_Settings.TabsEnable)
+ if (g_Settings.bTabsEnable)
pci->SM_SetTabbedWindowHwnd(0, 0);
DestroyWindow(hwndDlg);
break;
diff --git a/src/modules/chat/chat_opts.cpp b/src/modules/chat/chat_opts.cpp
index 68f4710827..5396d94f5b 100644
--- a/src/modules/chat/chat_opts.cpp
+++ b/src/modules/chat/chat_opts.cpp
@@ -189,31 +189,32 @@ static void InitSetting(TCHAR** ppPointer, char* pszSetting, TCHAR* pszDefault)
void LoadGlobalSettings(void)
{
- g_Settings->LogLimitNames = db_get_b(NULL, "Chat", "LogLimitNames", 1);
- g_Settings->ShowTime = db_get_b(NULL, "Chat", "ShowTimeStamp", 1);
- g_Settings->SoundsFocus = db_get_b(NULL, "Chat", "SoundsFocus", 0);
- g_Settings->ShowTimeIfChanged = (BOOL)db_get_b(NULL, "Chat", "ShowTimeStampIfChanged", 0);
- g_Settings->TimeStampEventColour = (BOOL)db_get_b(NULL, "Chat", "TimeStampEventColour", 0);
+ g_Settings->bLogLimitNames = db_get_b(NULL, "Chat", "bLogLimitNames", 1) != 0;
+ g_Settings->bShowTime = db_get_b(NULL, "Chat", "ShowTimeStamp", 1) != 0;
+ g_Settings->bSoundsFocus = db_get_b(NULL, "Chat", "bSoundsFocus", 0) != 0;
+ g_Settings->bShowTimeIfChanged = (BOOL)db_get_b(NULL, "Chat", "ShowTimeStampIfChanged", 0) != 0;
+ g_Settings->bTimeStampEventColour = (BOOL)db_get_b(NULL, "Chat", "bTimeStampEventColour", 0) != 0;
g_Settings->iEventLimit = db_get_w(NULL, "Chat", "LogLimit", 100);
g_Settings->dwIconFlags = db_get_dw(NULL, "Chat", "IconFlags", 0x0000);
g_Settings->dwTrayIconFlags = db_get_dw(NULL, "Chat", "TrayIconFlags", 0x1000);
g_Settings->dwPopupFlags = db_get_dw(NULL, "Chat", "PopupFlags", 0x0000);
g_Settings->LoggingLimit = db_get_w(NULL, "Chat", "LoggingLimit", 100);
- g_Settings->LoggingEnabled = (BOOL)db_get_b(NULL, "Chat", "LoggingEnabled", 0);
- g_Settings->FlashWindow = (BOOL)db_get_b(NULL, "Chat", "FlashWindow", 0);
- g_Settings->HighlightEnabled = (BOOL)db_get_b(NULL, "Chat", "HighlightEnabled", 1);
+ g_Settings->bLoggingEnabled = (BOOL)db_get_b(NULL, "Chat", "bLoggingEnabled", 0) != 0;
+ g_Settings->bFlashWindow = (BOOL)db_get_b(NULL, "Chat", "FlashWindow", 0) != 0;
+ g_Settings->bFlashWindowHighlight = (BOOL)db_get_b(NULL, "Chat", "bFlashWindowHighlight", false) != 0;
+ g_Settings->bHighlightEnabled = (BOOL)db_get_b(NULL, "Chat", "bHighlightEnabled", 1) != 0;
g_Settings->crUserListColor = db_get_dw(NULL, "ChatFonts", "Font18Col", RGB(0, 0, 0));
g_Settings->crUserListHeadingsColor = db_get_dw(NULL, "ChatFonts", "Font19Col", RGB(170, 170, 170));
- g_Settings->StripFormat = (BOOL)db_get_b(NULL, "Chat", "StripFormatting", 0);
- g_Settings->TrayIconInactiveOnly = (BOOL)db_get_b(NULL, "Chat", "TrayIconInactiveOnly", 1);
- g_Settings->PopupInactiveOnly = (BOOL)db_get_b(NULL, "Chat", "PopupInactiveOnly", 1);
- g_Settings->AddColonToAutoComplete = (BOOL)db_get_b(NULL, "Chat", "AddColonToAutoComplete", 1);
+ g_Settings->bStripFormat = (BOOL)db_get_b(NULL, "Chat", "StripFormatting", 0) != 0;
+ g_Settings->bTrayIconInactiveOnly = (BOOL)db_get_b(NULL, "Chat", "bTrayIconInactiveOnly", 1) != 0;
+ g_Settings->bPopupInactiveOnly = (BOOL)db_get_b(NULL, "Chat", "PopupInactiveOnly", 1) != 0;
+ g_Settings->bAddColonToAutoComplete = (BOOL)db_get_b(NULL, "Chat", "AddColonToAutoComplete", 1) != 0;
g_Settings->iPopupStyle = db_get_b(NULL, "Chat", "PopupStyle", 1);
g_Settings->iPopupTimeout = db_get_w(NULL, "Chat", "PopupTimeout", 3);
g_Settings->crPUBkgColour = db_get_dw(NULL, "Chat", "PopupColorBG", GetSysColor(COLOR_WINDOW));
g_Settings->crPUTextColour = db_get_dw(NULL, "Chat", "PopupColorText", 0);
- g_Settings->ShowContactStatus = db_get_b(NULL, "Chat", "ShowContactStatus", 0);
- g_Settings->ContactStatusFirst = db_get_b(NULL, "Chat", "ContactStatusFirst", 0);
+ g_Settings->bShowContactStatus = db_get_b(NULL, "Chat", "ShowContactStatus", 0) != 0;
+ g_Settings->bContactStatusFirst = db_get_b(NULL, "Chat", "ContactStatusFirst", 0) != 0;
LoadColors();
@@ -227,7 +228,7 @@ void LoadGlobalSettings(void)
InitSetting(&g_Settings->pszHighlightWords, "HighlightWords", _T("%m"));
InitSetting(&g_Settings->pszLogDir, "LogDirectory", _T("%miranda_logpath%\\%proto%\\%userid%.log"));
- g_Settings->LogIndentEnabled = (db_get_b(NULL, "Chat", "LogIndentEnabled", 1) != 0) ? TRUE : FALSE;
+ g_Settings->bLogIndentEnabled = db_get_b(NULL, "Chat", "bLogIndentEnabled", 1) != 0;
LOGFONT lf;
if (g_Settings->MessageBoxFont)
@@ -266,7 +267,7 @@ static void FreeGlobalSettings(void)
void SetIndentSize()
{
- if (g_Settings->ShowTime) {
+ if (g_Settings->bShowTime) {
LOGFONT lf;
LoadMsgDlgFont(0, &lf, NULL);
HFONT hFont = CreateFontIndirect(&lf);
diff --git a/src/modules/chat/chat_svc.cpp b/src/modules/chat/chat_svc.cpp
index 49fa9cebc8..215221b394 100644
--- a/src/modules/chat/chat_svc.cpp
+++ b/src/modules/chat/chat_svc.cpp
@@ -76,7 +76,7 @@ static int FontsChanged(WPARAM wParam, LPARAM lParam)
LoadLogFonts();
SetIndentSize();
- g_Settings->LogIndentEnabled = (db_get_b(NULL, "Chat", "LogIndentEnabled", 1) != 0) ? TRUE : FALSE;
+ g_Settings->bLogIndentEnabled = (db_get_b(NULL, "Chat", "bLogIndentEnabled", 1) != 0) ? TRUE : FALSE;
ci.MM_FontsChanged();
ci.MM_FixColors();
@@ -518,7 +518,7 @@ static INT_PTR Service_AddEvent(WPARAM wParam, LPARAM lParam)
ci.OnAddLog(si, isOk);
if (!(gce->dwFlags & GCEF_NOTNOTIFY))
ci.DoSoundsFlashPopupTrayStuff(si, gce, bIsHighlighted, 0);
- if ((gce->dwFlags & GCEF_ADDTOLOG) && g_Settings->LoggingEnabled)
+ if ((gce->dwFlags & GCEF_ADDTOLOG) && g_Settings->bLoggingEnabled)
ci.LogToFile(si, gce);
}
diff --git a/src/modules/chat/log.cpp b/src/modules/chat/log.cpp
index 01e2c2c1ef..50aa1d2a2e 100644
--- a/src/modules/chat/log.cpp
+++ b/src/modules/chat/log.cpp
@@ -146,7 +146,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') {
@@ -164,7 +164,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);
@@ -225,7 +225,7 @@ static void AddEventToBuffer(char **buffer, int *bufferEnd, int *bufferAlloced,
TCHAR szTemp[512], szTemp2[512];
TCHAR* pszNick = NULL;
if (streamData->lin->ptszNick) {
- if (g_Settings->LogLimitNames && lstrlen(streamData->lin->ptszNick) > 20) {
+ if (g_Settings->bLogLimitNames && lstrlen(streamData->lin->ptszNick) > 20) {
lstrcpyn(szTemp2, streamData->lin->ptszNick, 20);
lstrcpyn(szTemp2 + 20, _T("..."), 4);
}
@@ -356,7 +356,7 @@ char* Log_CreateRTF(LOGSTREAMDATA *streamData)
bufferEnd += logIconBmpSize[iIndex];
}
- if (g_Settings->TimeStampEventColour) {
+ if (g_Settings->bTimeStampEventColour) {
LOGFONT &lf = ci.aFonts[0].lf;
// colored timestamps
@@ -380,12 +380,12 @@ 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);
}
@@ -462,10 +462,10 @@ char* Log_CreateRtfHeader(MODULEINFO *mi)
iIndent += (14 * 1440) / ci.logPixelSX;
Log_Append(&buffer, &bufferEnd, &bufferAlloced, "\\tx%u", iIndent);
}
- if (g_Settings->ShowTime) {
+ if (g_Settings->bShowTime) {
int iSize = (g_Settings->LogTextIndent * 1440) / ci.logPixelSX;
Log_Append(&buffer, &bufferEnd, &bufferAlloced, "\\tx%u", iIndent + iSize);
- if (g_Settings->LogIndentEnabled)
+ if (g_Settings->bLogIndentEnabled)
iIndent += iSize;
}
diff --git a/src/modules/chat/manager.cpp b/src/modules/chat/manager.cpp
index 1888a097e7..d12f27036b 100644
--- a/src/modules/chat/manager.cpp
+++ b/src/modules/chat/manager.cpp
@@ -250,7 +250,7 @@ static BOOL SM_AddEventToAllMatchingUID(GCEVENT *gce)
ci.DoSoundsFlashPopupTrayStuff(pTemp, gce, FALSE, bManyFix);
bManyFix++;
- if ((gce->dwFlags & GCEF_ADDTOLOG) && g_Settings->LoggingEnabled)
+ if ((gce->dwFlags & GCEF_ADDTOLOG) && g_Settings->bLoggingEnabled)
ci.LogToFile(pTemp, gce);
}
}
diff --git a/src/modules/chat/tools.cpp b/src/modules/chat/tools.cpp
index e3c43e483d..36e25f3e29 100644
--- a/src/modules/chat/tools.cpp
+++ b/src/modules/chat/tools.cpp
@@ -285,13 +285,13 @@ BOOL DoSoundsFlashPopupTrayStuff(SESSION_INFO *si, GCEVENT *gce, BOOL bHighlight
if (bHighlight) {
gce->pDest->iType |= GC_EVENT_HIGHLIGHT;
- if (bInactive || !g_Settings->SoundsFocus)
+ if (bInactive || !g_Settings->bSoundsFocus)
SkinPlaySound("ChatHighlight");
if (db_get_b(si->hContact, "CList", "Hidden", 0) != 0)
db_unset(si->hContact, "CList", "Hidden");
if (bInactive)
ci.DoTrayIcon(si, gce);
- if (bInactive || !g_Settings->PopupInactiveOnly)
+ if (bInactive || !g_Settings->bPopupInactiveOnly)
ci.DoPopup(si, gce);
if (ci.OnFlashWindow)
ci.OnFlashWindow(si, bInactive);
@@ -299,40 +299,40 @@ BOOL DoSoundsFlashPopupTrayStuff(SESSION_INFO *si, GCEVENT *gce, BOOL bHighlight
}
// do blinking icons in tray
- if (bInactive || !g_Settings->TrayIconInactiveOnly)
+ if (bInactive || !g_Settings->bTrayIconInactiveOnly)
ci.DoTrayIcon(si, gce);
// stupid thing to not create multiple popups for a QUIT event for instance
if (bManyFix == 0) {
// do popups
- if (bInactive || !g_Settings->PopupInactiveOnly)
+ if (bInactive || !g_Settings->bPopupInactiveOnly)
ci.DoPopup(si, gce);
// do sounds and flashing
switch (iEvent) {
case GC_EVENT_JOIN:
- if (bInactive || !g_Settings->SoundsFocus)
+ if (bInactive || !g_Settings->bSoundsFocus)
SkinPlaySound("ChatJoin");
break;
case GC_EVENT_PART:
- if (bInactive || !g_Settings->SoundsFocus)
+ if (bInactive || !g_Settings->bSoundsFocus)
SkinPlaySound("ChatPart");
break;
case GC_EVENT_QUIT:
- if (bInactive || !g_Settings->SoundsFocus)
+ if (bInactive || !g_Settings->bSoundsFocus)
SkinPlaySound("ChatQuit");
break;
case GC_EVENT_ADDSTATUS:
case GC_EVENT_REMOVESTATUS:
- if (bInactive || !g_Settings->SoundsFocus)
+ if (bInactive || !g_Settings->bSoundsFocus)
SkinPlaySound("ChatMode");
break;
case GC_EVENT_KICK:
- if (bInactive || !g_Settings->SoundsFocus)
+ if (bInactive || !g_Settings->bSoundsFocus)
SkinPlaySound("ChatKick");
break;
case GC_EVENT_MESSAGE:
- if (bInactive || !g_Settings->SoundsFocus)
+ if (bInactive || !g_Settings->bSoundsFocus)
SkinPlaySound("ChatMessage");
if (bInactive && !(si->wState & STATE_TALK)) {
@@ -343,19 +343,19 @@ BOOL DoSoundsFlashPopupTrayStuff(SESSION_INFO *si, GCEVENT *gce, BOOL bHighlight
ci.OnFlashWindow(si, bInactive);
break;
case GC_EVENT_ACTION:
- if (bInactive || !g_Settings->SoundsFocus)
+ if (bInactive || !g_Settings->bSoundsFocus)
SkinPlaySound("ChatAction");
break;
case GC_EVENT_NICK:
- if (bInactive || !g_Settings->SoundsFocus)
+ if (bInactive || !g_Settings->bSoundsFocus)
SkinPlaySound("ChatNick");
break;
case GC_EVENT_NOTICE:
- if (bInactive || !g_Settings->SoundsFocus)
+ if (bInactive || !g_Settings->bSoundsFocus)
SkinPlaySound("ChatNotice");
break;
case GC_EVENT_TOPIC:
- if (bInactive || !g_Settings->SoundsFocus)
+ if (bInactive || !g_Settings->bSoundsFocus)
SkinPlaySound("ChatTopic");
break;
}
@@ -419,7 +419,7 @@ const TCHAR* my_strstri(const TCHAR* s1, const TCHAR* s2)
BOOL IsHighlighted(SESSION_INFO *si, GCEVENT *gce)
{
- if (!g_Settings->HighlightEnabled || !g_Settings->pszHighlightWords || !gce || !si || !si->pMe)
+ if (!g_Settings->bHighlightEnabled || !g_Settings->pszHighlightWords || !gce || !si || !si->pMe)
return FALSE;
TCHAR *p1 = g_Settings->pszHighlightWords;
@@ -523,7 +523,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);
}