summaryrefslogtreecommitdiff
path: root/src/gui/widgets/guildchattab.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-02-18 21:33:21 +0300
committerAndrei Karas <akaras@inbox.ru>2013-02-18 21:33:21 +0300
commit25907c03212110f10c910b0ef90a416dff450ca7 (patch)
treefa409f004887619041e19f06f289d5ecb1c89e59 /src/gui/widgets/guildchattab.cpp
parent772daf48072915d598014c25a33ff3dc96e43bce (diff)
downloadmv-25907c03212110f10c910b0ef90a416dff450ca7.tar.gz
mv-25907c03212110f10c910b0ef90a416dff450ca7.tar.bz2
mv-25907c03212110f10c910b0ef90a416dff450ca7.tar.xz
mv-25907c03212110f10c910b0ef90a416dff450ca7.zip
Add option to show/hide guild online messages.
Disabled by default.
Diffstat (limited to 'src/gui/widgets/guildchattab.cpp')
-rw-r--r--src/gui/widgets/guildchattab.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/widgets/guildchattab.cpp b/src/gui/widgets/guildchattab.cpp
index 79907b4c3..c960b4798 100644
--- a/src/gui/widgets/guildchattab.cpp
+++ b/src/gui/widgets/guildchattab.cpp
@@ -23,6 +23,7 @@
#include "gui/widgets/guildchattab.h"
#include "chatlogger.h"
+#include "configuration.h"
#include "guild.h"
#include "guildmanager.h"
#include "localplayer.h"
@@ -44,10 +45,13 @@ GuildChatTab::GuildChatTab(const Widget2 *const widget) :
&getThemeColor(Theme::GUILD_CHAT_TAB_HIGHLIGHTED_OUTLINE));
setSelectedTabColor(&getThemeColor(Theme::GUILD_CHAT_TAB_SELECTED),
&getThemeColor(Theme::GUILD_CHAT_TAB_SELECTED_OUTLINE));
+ mShowOnline = config.getBoolValue("showGuildOnline");
+ config.addListener("showGuildOnline", this);
}
GuildChatTab::~GuildChatTab()
{
+ config.removeListeners(this);
}
bool GuildChatTab::handleCommand(const std::string &type,
@@ -132,3 +136,9 @@ void GuildChatTab::playNewMessageSound()
{
sound.playGuiSound(SOUND_GUILD);
}
+
+void GuildChatTab::optionChanged(const std::string &value)
+{
+ if (value == "showGuildOnline")
+ mShowOnline = config.getBoolValue("showGuildOnline");
+}