summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-03-22 21:10:04 +0300
committerAndrei Karas <akaras@inbox.ru>2013-03-22 21:10:04 +0300
commit0fcce97fe86721f4b426250a32f461ad951f6d99 (patch)
tree06180a6d07aa567355b4986d1ffb6cc2102cdb14
parent0384e13f0faf26e4b2716c3a16d2518bb23fba42 (diff)
downloadplus-0fcce97fe86721f4b426250a32f461ad951f6d99.tar.gz
plus-0fcce97fe86721f4b426250a32f461ad951f6d99.tar.bz2
plus-0fcce97fe86721f4b426250a32f461ad951f6d99.tar.xz
plus-0fcce97fe86721f4b426250a32f461ad951f6d99.zip
Add option to enable/disable language chat tab.
-rw-r--r--src/defaults.cpp1
-rw-r--r--src/game.cpp2
-rw-r--r--src/gui/setup_chat.cpp5
3 files changed, 7 insertions, 1 deletions
diff --git a/src/defaults.cpp b/src/defaults.cpp
index 34bb07efb..273b37e61 100644
--- a/src/defaults.cpp
+++ b/src/defaults.cpp
@@ -311,6 +311,7 @@ DefaultsData* getConfigDefaults()
AddDEF("gamecount", 0);
AddDEF("rated", false);
AddDEF("weightMsg", true);
+ AddDEF("enableLangTab", true);
return configData;
}
diff --git a/src/game.cpp b/src/game.cpp
index 5eed2bd38..58cc9343e 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -260,7 +260,7 @@ static void createGuiWindows()
if (config.getBoolValue("showChatHistory"))
localChatTab->loadFromLogFile("#General");
- if (serverVersion >= 8)
+ if (serverVersion >= 8 && serverConfig.getValue("enableLangTab", true))
{
const std::string lang = getLangShort();
if (lang.size() == 2)
diff --git a/src/gui/setup_chat.cpp b/src/gui/setup_chat.cpp
index 63777a9a5..45b9e8748 100644
--- a/src/gui/setup_chat.cpp
+++ b/src/gui/setup_chat.cpp
@@ -41,6 +41,8 @@
#include "debug.h"
+extern int serverVersion;
+
Setup_Chat::Setup_Chat(const Widget2 *const widget) :
SetupTabScroll(widget)
{
@@ -119,6 +121,9 @@ Setup_Chat::Setup_Chat(const Widget2 *const widget) :
new SetupItemCheckBox(_("Enable gm tab"), "",
"enableGmTab", this, "enableGmTabEvent");
+ new SetupItemCheckBox(_("Enable language tab"), "",
+ "enableLangTab", this, "enableLangTabEvent", false);
+
new SetupItemCheckBox(_("Enable battle tab"), "",
"enableBattleTab", this, "enableBattleTabEvent");