From 6b92425b46de741d4cda35027083fd988ac4e942 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 22 Mar 2013 22:22:15 +0300 Subject: Add option to accept language messages in any languge. This messages will be showed in language or general tab. --- src/gui/chatwindow.cpp | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'src/gui/chatwindow.cpp') diff --git a/src/gui/chatwindow.cpp b/src/gui/chatwindow.cpp index 074ce2b81..f6035c5dc 100644 --- a/src/gui/chatwindow.cpp +++ b/src/gui/chatwindow.cpp @@ -267,6 +267,7 @@ ChatWindow::ChatWindow(): mAutoHide = config.getBoolValue("autohideChat"); mShowBattleEvents = config.getBoolValue("showBattleEvents"); + mShowAllLang = serverConfig.getValue("showAllLang", 0); enableVisibleSound(true); } @@ -1479,10 +1480,25 @@ void ChatWindow::resortChatLog(std::string line, Own own, } } - if (langChatTab && !channel.empty() - && langChatTab->getChannelName() == channel) + if (langChatTab && !channel.empty()) { - langChatTab->chatLog(line, own, ignoreRecord, tryRemoveColors); + if (langChatTab->getChannelName() == channel) + { + langChatTab->chatLog(line, own, ignoreRecord, tryRemoveColors); + } + else if (mShowAllLang) + { + if (langChatTab) + { + langChatTab->chatLog(prefix + line, own, + ignoreRecord, tryRemoveColors); + } + else if (localChatTab) + { + localChatTab->chatLog(prefix + line, own, + ignoreRecord, tryRemoveColors); + } + } } else if (localChatTab && channel.empty()) { -- cgit v1.2.3-60-g2f50