summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-11-28 00:42:01 +0300
committerAndrei Karas <akaras@inbox.ru>2012-11-28 00:42:01 +0300
commit13c2533f4a2d27f1c9156df2a8ad2851be2016fd (patch)
tree0813ea503e928877f099c474fdf8a7d8c0d1ab12 /src
parent1fd495484bb43a1e0b0d088874d7bc588d8d38c9 (diff)
downloadmanaverse-13c2533f4a2d27f1c9156df2a8ad2851be2016fd.tar.gz
manaverse-13c2533f4a2d27f1c9156df2a8ad2851be2016fd.tar.bz2
manaverse-13c2533f4a2d27f1c9156df2a8ad2851be2016fd.tar.xz
manaverse-13c2533f4a2d27f1c9156df2a8ad2851be2016fd.zip
Fix option "Show chat history" for all tabs.
Diffstat (limited to 'src')
-rw-r--r--src/game.cpp3
-rw-r--r--src/gui/widgets/battletab.cpp4
-rw-r--r--src/guildmanager.cpp3
-rw-r--r--src/net/ea/guildhandler.cpp4
-rw-r--r--src/net/ea/partyhandler.cpp4
5 files changed, 13 insertions, 5 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 3ed71efcb..8716ba0e4 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -257,7 +257,8 @@ static void createGuiWindows()
localChatTab = new ChatTab(chatWindow, _("General"));
localChatTab->setAllowHighlight(false);
- localChatTab->loadFromLogFile("#General");
+ if (config.getBoolValue("showChatHistory"))
+ localChatTab->loadFromLogFile("#General");
debugChatTab = new ChatTab(chatWindow, _("Debug"));
debugChatTab->setAllowHighlight(false);
diff --git a/src/gui/widgets/battletab.cpp b/src/gui/widgets/battletab.cpp
index f02a86134..9cfd60d64 100644
--- a/src/gui/widgets/battletab.cpp
+++ b/src/gui/widgets/battletab.cpp
@@ -23,6 +23,7 @@
#include "gui/widgets/battletab.h"
#include "chatlogger.h"
+#include "configuration.h"
#include "localplayer.h"
#include "main.h"
@@ -39,7 +40,8 @@
BattleTab::BattleTab(const Widget2 *const widget) :
ChatTab(widget, _("Battle"))
{
- loadFromLogFile("#Battle");
+ if (config.getBoolValue("showChatHistory"))
+ loadFromLogFile("#Battle");
}
BattleTab::~BattleTab()
diff --git a/src/guildmanager.cpp b/src/guildmanager.cpp
index 27b10681b..35ac7f1f0 100644
--- a/src/guildmanager.cpp
+++ b/src/guildmanager.cpp
@@ -200,7 +200,8 @@ void GuildManager::createTab(Guild *const guild)
if (!mTab)
{
mTab = new GuildChatTab(chatWindow);
- mTab->loadFromLogFile("#Guild");
+ if (config.getBoolValue("showChatHistory"))
+ mTab->loadFromLogFile("#Guild");
if (player_node)
player_node->addGuild(guild);
}
diff --git a/src/net/ea/guildhandler.cpp b/src/net/ea/guildhandler.cpp
index 4af230773..5c9b94529 100644
--- a/src/net/ea/guildhandler.cpp
+++ b/src/net/ea/guildhandler.cpp
@@ -22,6 +22,7 @@
#include "net/ea/guildhandler.h"
#include "actorspritemanager.h"
+#include "configuration.h"
#include "localplayer.h"
#include "gui/socialwindow.h"
@@ -122,7 +123,8 @@ void GuildHandler::processGuildPositionInfo(Net::MessageIn &msg)
if (!guildTab && chatWindow)
{
guildTab = new GuildTab(chatWindow);
- guildTab->loadFromLogFile("#Guild");
+ if (config.getBoolValue("showChatHistory"))
+ guildTab->loadFromLogFile("#Guild");
if (player_node)
player_node->addGuild(taGuild);
memberList(guildId);
diff --git a/src/net/ea/partyhandler.cpp b/src/net/ea/partyhandler.cpp
index 7702bfcee..0b3576e21 100644
--- a/src/net/ea/partyhandler.cpp
+++ b/src/net/ea/partyhandler.cpp
@@ -22,6 +22,7 @@
#include "net/ea/partyhandler.h"
#include "actorspritemanager.h"
+#include "configuration.h"
#include "localplayer.h"
#include "gui/socialwindow.h"
@@ -220,7 +221,8 @@ void PartyHandler::processPartySettings(Net::MessageIn &msg)
return;
Ea::partyTab = new PartyTab(chatWindow);
- Ea::partyTab->loadFromLogFile("#Party");
+ if (config.getBoolValue("showChatHistory"))
+ Ea::partyTab->loadFromLogFile("#Party");
}
// These seem to indicate the sharing mode for exp and items