From b24d92e3052e0b4a43b0bfe209ef910ddc41878e Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 9 Dec 2013 21:18:35 +0300 Subject: add color for away chat messages. New theme color: AWAYCHAT, AWAYCHAT_OUTLINE. --- src/gui/theme.cpp | 7 ++++++- src/gui/theme.h | 2 ++ src/gui/windows/chatwindow.cpp | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/gui/theme.cpp b/src/gui/theme.cpp index fbde968f4..fb69dce3b 100644 --- a/src/gui/theme.cpp +++ b/src/gui/theme.cpp @@ -199,6 +199,7 @@ Theme::Theme() : mColors[HYPERLINK].ch = '<'; mColors[SELFNICK].ch = 's'; mColors[OLDCHAT].ch = 'o'; + mColors[AWAYCHAT].ch = 'a'; mCharColors['H'] = HIGHLIGHT; mCharColors['C'] = CHAT; mCharColors['G'] = GM; @@ -214,6 +215,7 @@ Theme::Theme() : mCharColors['<'] = HYPERLINK; mCharColors['s'] = SELFNICK; mCharColors['o'] = OLDCHAT; + mCharColors['a'] = AWAYCHAT; // here need use outlined colors mCharColors['H' | 0x80] = HIGHLIGHT_OUTLINE; @@ -231,6 +233,7 @@ Theme::Theme() : mCharColors['<' | 0x80] = HYPERLINK_OUTLINE; mCharColors['s' | 0x80] = SELFNICK_OUTLINE; mCharColors['o' | 0x80] = OLDCHAT_OUTLINE; + mCharColors['a' | 0x80] = AWAYCHAT_OUTLINE; } Theme::~Theme() @@ -975,7 +978,9 @@ static int readColorType(const std::string &type) "JOB_BAR", "JOB_BAR_OUTLINE", "OLDCHAT", - "OLDCHAT_OUTLINE" + "OLDCHAT_OUTLINE", + "AWAYCHAT", + "AWAYCHAT_OUTLINE" }; if (type.empty()) diff --git a/src/gui/theme.h b/src/gui/theme.h index 8ece0488d..0ed889794 100644 --- a/src/gui/theme.h +++ b/src/gui/theme.h @@ -416,6 +416,8 @@ class Theme final : public Palette, public ConfigListener JOB_BAR_OUTLINE, OLDCHAT, OLDCHAT_OUTLINE, + AWAYCHAT, + AWAYCHAT_OUTLINE, THEME_COLORS_END }; diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp index 576ff9fd4..64eeb7669 100644 --- a/src/gui/windows/chatwindow.cpp +++ b/src/gui/windows/chatwindow.cpp @@ -1714,7 +1714,7 @@ void ChatWindow::addToAwayLog(const std::string &line) mAwayLog.pop_front(); if (findI(line, mHighlights) != std::string::npos) - mAwayLog.push_back("##9away:" + line); + mAwayLog.push_back("##aaway:" + line); } void ChatWindow::displayAwayLog() const -- cgit v1.2.3-70-g09d2