From 03faabc4ee5eb6a9bfa5882f155cf3225128ca42 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 19 Jan 2014 15:49:47 +0000 Subject: chat log icons are back git-svn-id: http://svn.miranda-ng.org/main/trunk@7761 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/chat/chat.h | 3 +++ src/modules/chat/chat_opts.cpp | 16 ++++++++-------- src/modules/chat/chat_svc.cpp | 2 +- src/modules/chat/log.cpp | 4 ++-- src/modules/chat/manager.cpp | 3 +++ 5 files changed, 17 insertions(+), 11 deletions(-) (limited to 'src/modules') diff --git a/src/modules/chat/chat.h b/src/modules/chat/chat.h index 57e940de54..d16fa6bcd8 100644 --- a/src/modules/chat/chat.h +++ b/src/modules/chat/chat.h @@ -41,6 +41,9 @@ extern int g_cbSession, g_cbModuleInfo, g_iFontMode, g_iChatLang; extern TCHAR *g_szFontGroup; extern CRITICAL_SECTION cs; +extern PBYTE pLogIconBmpBits[14]; +extern int logIconBmpSize[14]; + // log.c void LoadMsgLogBitmaps(void); void FreeMsgLogBitmaps(void); diff --git a/src/modules/chat/chat_opts.cpp b/src/modules/chat/chat_opts.cpp index 5d4656231d..e95ac3d5e7 100644 --- a/src/modules/chat/chat_opts.cpp +++ b/src/modules/chat/chat_opts.cpp @@ -195,24 +195,24 @@ static void InitSetting(TCHAR** ppPointer, char* pszSetting, TCHAR* pszDefault) void LoadGlobalSettings(void) { - g_Settings->bLogLimitNames = db_get_b(NULL, "Chat", "bLogLimitNames", 1) != 0; + g_Settings->bLogLimitNames = db_get_b(NULL, "Chat", "LogLimitNames", 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->bSoundsFocus = db_get_b(NULL, "Chat", "SoundsFocus", 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->bTimeStampEventColour = (BOOL)db_get_b(NULL, "Chat", "TimeStampEventColour", 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->bLoggingEnabled = (BOOL)db_get_b(NULL, "Chat", "bLoggingEnabled", 0) != 0; + g_Settings->bLoggingEnabled = (BOOL)db_get_b(NULL, "Chat", "LoggingEnabled", 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->bFlashWindowHighlight = (BOOL)db_get_b(NULL, "Chat", "FlashWindowHighlight", false) != 0; + g_Settings->bHighlightEnabled = (BOOL)db_get_b(NULL, "Chat", "HighlightEnabled", 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->bStripFormat = (BOOL)db_get_b(NULL, "Chat", "StripFormatting", 0) != 0; - g_Settings->bTrayIconInactiveOnly = (BOOL)db_get_b(NULL, "Chat", "bTrayIconInactiveOnly", 1) != 0; + g_Settings->bTrayIconInactiveOnly = (BOOL)db_get_b(NULL, "Chat", "TrayIconInactiveOnly", 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); @@ -234,7 +234,7 @@ void LoadGlobalSettings(void) InitSetting(&g_Settings->pszHighlightWords, "HighlightWords", _T("%m")); InitSetting(&g_Settings->pszLogDir, "LogDirectory", _T("%miranda_logpath%\\%proto%\\%userid%.log")); - g_Settings->bLogIndentEnabled = db_get_b(NULL, "Chat", "bLogIndentEnabled", 1) != 0; + g_Settings->bLogIndentEnabled = db_get_b(NULL, "Chat", "LogIndentEnabled", 1) != 0; LOGFONT lf; if (g_Settings->MessageBoxFont) diff --git a/src/modules/chat/chat_svc.cpp b/src/modules/chat/chat_svc.cpp index 215221b394..eae370c191 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->bLogIndentEnabled = (db_get_b(NULL, "Chat", "bLogIndentEnabled", 1) != 0) ? TRUE : FALSE; + g_Settings->bLogIndentEnabled = (db_get_b(NULL, "Chat", "LogIndentEnabled", 1) != 0) ? TRUE : FALSE; ci.MM_FontsChanged(); ci.MM_FixColors(); diff --git a/src/modules/chat/log.cpp b/src/modules/chat/log.cpp index 50aa1d2a2e..115b9fc907 100644 --- a/src/modules/chat/log.cpp +++ b/src/modules/chat/log.cpp @@ -25,8 +25,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // The code for streaming the text is to a large extent copied from // the srmm module and then modified to fit the chat module. -static PBYTE pLogIconBmpBits[14]; -static int logIconBmpSize[ SIZEOF(pLogIconBmpBits) ]; +PBYTE pLogIconBmpBits[14]; +int logIconBmpSize[ SIZEOF(pLogIconBmpBits) ]; static int EventToIndex(LOGINFO * lin) { diff --git a/src/modules/chat/manager.cpp b/src/modules/chat/manager.cpp index a840f1a248..edc6b5fc69 100644 --- a/src/modules/chat/manager.cpp +++ b/src/modules/chat/manager.cpp @@ -1473,6 +1473,9 @@ INT_PTR SvcGetChatManager(WPARAM wParam, LPARAM lParam) ci.RemoveFormatting = RemoveFormatting; ci.ReloadSettings = LoadGlobalSettings; + ci.pLogIconBmpBits = pLogIconBmpBits; + ci.logIconBmpSize = logIconBmpSize; + LoadChatIcons(); RegisterFonts(); OptionsInit(); -- cgit v1.2.3