From 25907c03212110f10c910b0ef90a416dff450ca7 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 18 Feb 2013 21:33:21 +0300 Subject: Add option to show/hide guild online messages. Disabled by default. --- src/gui/widgets/chattab.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/gui/widgets/chattab.cpp') diff --git a/src/gui/widgets/chattab.cpp b/src/gui/widgets/chattab.cpp index 0742e0ae2..fd336e116 100644 --- a/src/gui/widgets/chattab.cpp +++ b/src/gui/widgets/chattab.cpp @@ -55,7 +55,8 @@ ChatTab::ChatTab(const Widget2 *const widget, const std::string &name) : mScrollArea(new ScrollArea(mTextOutput, false)), mAllowHightlight(true), mRemoveNames(false), - mNoAway(false) + mNoAway(false), + mShowOnline(false) { setCaption(name); @@ -506,3 +507,15 @@ void ChatTab::playNewMessageSound() { sound.playGuiSound(SOUND_WHISPER); } + +void ChatTab::showOnline(const std::string &nick, + const bool isOnline) +{ + if (!mShowOnline) + return; + + if (isOnline) + chatLog(strprintf(_("%s is now Online."), nick.c_str())); + else + chatLog(strprintf(_("%s is now Offline."), nick.c_str())); +} -- cgit v1.2.3-60-g2f50