From 53ff16b147c30de05cd21e3f97b0ae0106dd9566 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 16 Oct 2017 22:47:10 +0300 Subject: the whole idea of customizable colors in chat considered totally useless --- plugins/TabSRMM/src/chat.h | 3 +-- plugins/TabSRMM/src/chat_log.cpp | 11 ++++------- plugins/TabSRMM/src/chat_options.cpp | 1 - plugins/TabSRMM/src/chat_tools.cpp | 13 ------------- plugins/TabSRMM/src/chat_window.cpp | 2 +- 5 files changed, 6 insertions(+), 24 deletions(-) (limited to 'plugins/TabSRMM') diff --git a/plugins/TabSRMM/src/chat.h b/plugins/TabSRMM/src/chat.h index 987f30696d..209f935638 100644 --- a/plugins/TabSRMM/src/chat.h +++ b/plugins/TabSRMM/src/chat.h @@ -97,7 +97,7 @@ extern TMUCSettings g_Settings; ////////////////////////////////////////////////////////////////////////////////// // log.c -char* Log_CreateRtfHeader(MODULEINFO *mi); +char* Log_CreateRtfHeader(void); char* Log_CreateRTF(LOGSTREAMDATA *streamData); // options.c @@ -122,7 +122,6 @@ int UM_CompareItem(USERINFO *u1, const wchar_t* pszNick, WORD wStatus); // tools.c BOOL DoSoundsFlashPopupTrayStuff(SESSION_INFO *si, GCEVENT *gce, BOOL bHighlight, int bManyFix); -int Chat_GetColorIndex(const char* pszModule, COLORREF cr); wchar_t* my_strstri(const wchar_t* s1, const wchar_t* s2); bool IsHighlighted(SESSION_INFO *si, GCEVENT *pszText); char GetIndicator(SESSION_INFO *si, LPCTSTR ptszNick, int *iNickIndex); diff --git a/plugins/TabSRMM/src/chat_log.cpp b/plugins/TabSRMM/src/chat_log.cpp index cda3695494..182c8f2618 100644 --- a/plugins/TabSRMM/src/chat_log.cpp +++ b/plugins/TabSRMM/src/chat_log.cpp @@ -631,7 +631,7 @@ static void AddEventToBuffer(CMStringA &str, LOGSTREAMDATA *streamData) } } -char* Log_CreateRtfHeader(MODULEINFO *mi) +char* Log_CreateRtfHeader(void) { // get the number of pixels per logical inch if (pci->logPixelSY == 0) { @@ -654,9 +654,6 @@ char* Log_CreateRtfHeader(MODULEINFO *mi) for (int i = 0; i < OPTIONS_FONTCOUNT; i++) str.AppendFormat("\\red%u\\green%u\\blue%u;", GetRValue(pci->aFonts[i].color), GetGValue(pci->aFonts[i].color), GetBValue(pci->aFonts[i].color)); - for (int i = 0; i < mi->nColorCount; i++) - str.AppendFormat("\\red%u\\green%u\\blue%u;", GetRValue(mi->crColors[i]), GetGValue(mi->crColors[i]), GetBValue(mi->crColors[i])); - for (int i = 0; i < STATUSICONCOUNT; i++) str.AppendFormat("\\red%u\\green%u\\blue%u;", GetRValue(g_Settings.nickColors[i]), GetGValue(g_Settings.nickColors[i]), GetBValue(g_Settings.nickColors[i])); @@ -702,11 +699,11 @@ char* Log_CreateRTF(LOGSTREAMDATA *streamData) // ### RTF HEADER - if (0 == mi->pszHeader) - mi->pszHeader = Log_CreateRtfHeader(mi); + if (mi->pszHeader == nullptr) + mi->pszHeader = Log_CreateRtfHeader(); char *header = mi->pszHeader; - streamData->crCount = mi->nColorCount; + streamData->crCount = 0; CMStringA str; if (header) diff --git a/plugins/TabSRMM/src/chat_options.cpp b/plugins/TabSRMM/src/chat_options.cpp index 24e66f19cf..8d459906bd 100644 --- a/plugins/TabSRMM/src/chat_options.cpp +++ b/plugins/TabSRMM/src/chat_options.cpp @@ -881,7 +881,6 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM pci->ReloadSettings(); pci->MM_FontsChanged(); - pci->MM_FixColors(); Chat_UpdateOptions(); PluginConfig.reloadSettings(); diff --git a/plugins/TabSRMM/src/chat_tools.cpp b/plugins/TabSRMM/src/chat_tools.cpp index 463b48320f..2377e9a7e4 100644 --- a/plugins/TabSRMM/src/chat_tools.cpp +++ b/plugins/TabSRMM/src/chat_tools.cpp @@ -451,19 +451,6 @@ BOOL DoSoundsFlashPopupTrayStuff(SESSION_INFO *si, GCEVENT *gce, BOOL bHighlight return TRUE; } -int Chat_GetColorIndex(const char* pszModule, COLORREF cr) -{ - MODULEINFO *pMod = pci->MM_FindModule(pszModule); - if (!pMod || pMod->nColorCount == 0) - return -1; - - for (int i = 0; i < pMod->nColorCount; i++) - if (pMod->crColors[i] == cr) - return i; - - return -1; -} - wchar_t* my_strstri(const wchar_t* s1, const wchar_t* s2) { int i, j, k; diff --git a/plugins/TabSRMM/src/chat_window.cpp b/plugins/TabSRMM/src/chat_window.cpp index cb105d1aee..2a9c2a8698 100644 --- a/plugins/TabSRMM/src/chat_window.cpp +++ b/plugins/TabSRMM/src/chat_window.cpp @@ -639,7 +639,7 @@ void CChatRoomDlg::onClick_OK(CCtrlButton*) if (ptszText.IsEmpty()) return; - DoRtfToTags(ptszText, mi->nColorCount, mi->crColors); + DoRtfToTags(ptszText, 0, nullptr); ptszText.Trim(); ptszText.Replace(L"%", L"%%"); -- cgit v1.2.3