From 13c2533f4a2d27f1c9156df2a8ad2851be2016fd Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 28 Nov 2012 00:42:01 +0300 Subject: Fix option "Show chat history" for all tabs. --- src/game.cpp | 3 ++- src/gui/widgets/battletab.cpp | 4 +++- src/guildmanager.cpp | 3 ++- src/net/ea/guildhandler.cpp | 4 +++- src/net/ea/partyhandler.cpp | 4 +++- 5 files changed, 13 insertions(+), 5 deletions(-) (limited to 'src') 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 -- cgit v1.2.3-70-g09d2