From 3c7d4f339c20bc665efa6f6666171f0ca610203b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 18 Sep 2013 13:20:13 +0300 Subject: show online messages in party tab. by default disabled. --- src/net/ea/gui/partytab.cpp | 11 +++++++++++ src/net/ea/gui/partytab.h | 4 +++- 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'src/net/ea/gui') diff --git a/src/net/ea/gui/partytab.cpp b/src/net/ea/gui/partytab.cpp index eb4801cbf..5cca1d54a 100644 --- a/src/net/ea/gui/partytab.cpp +++ b/src/net/ea/gui/partytab.cpp @@ -24,6 +24,7 @@ #include "chatlogger.h" #include "commands.h" +#include "configuration.h" #include "party.h" #include "soundconsts.h" #include "soundmanager.h" @@ -50,6 +51,9 @@ PartyTab::PartyTab(const Widget2 *const widget) : &getThemeColor(Theme::PARTY_CHAT_TAB_HIGHLIGHTED_OUTLINE)); setSelectedTabColor(&getThemeColor(Theme::PARTY_CHAT_TAB_SELECTED), &getThemeColor(Theme::PARTY_CHAT_TAB_SELECTED_OUTLINE)); + + mShowOnline = config.getBoolValue("showPartyOnline"); + config.addListener("showPartyOnline", this); } PartyTab::~PartyTab() @@ -281,4 +285,11 @@ void PartyTab::playNewMessageSound() const { soundManager.playGuiSound(SOUND_GUILD); } + +void PartyTab::optionChanged(const std::string &value) +{ + if (value == "showPartyOnline") + mShowOnline = config.getBoolValue("showPartyOnline"); +} + } // namespace Ea diff --git a/src/net/ea/gui/partytab.h b/src/net/ea/gui/partytab.h index 16c9e8a3f..1988df4e8 100644 --- a/src/net/ea/gui/partytab.h +++ b/src/net/ea/gui/partytab.h @@ -31,7 +31,7 @@ namespace Ea /** * A tab for a party chat channel. */ -class PartyTab : public ChatTab +class PartyTab : public ChatTab, public ConfigListener { public: explicit PartyTab(const Widget2 *const widget); @@ -52,6 +52,8 @@ class PartyTab : public ChatTab void playNewMessageSound() const override; + void optionChanged(const std::string &value); + protected: void handleInput(const std::string &msg) override; -- cgit v1.2.3-70-g09d2