From 855c565e2242fa2504fb06f4579abc609de452f5 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 27 Mar 2011 00:38:43 +0200 Subject: Add no away to whisper chat context menu. --- src/gui/popupmenu.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/gui/popupmenu.cpp') diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp index 1cca9daa6..183b006d5 100644 --- a/src/gui/popupmenu.cpp +++ b/src/gui/popupmenu.cpp @@ -492,6 +492,16 @@ void PopupMenu::showChatPopup(int x, int y, ChatTab *tab) mBrowserBox->addRow(strprintf("@@remove name|%s@@", _("Remove name"))); } + if (tab->getNoAway()) + { + mBrowserBox->addRow(strprintf("@@enable away|%s@@", + _("Enable away"))); + } + else + { + mBrowserBox->addRow(strprintf("@@disable away|%s@@", + _("Disable away"))); + } mBrowserBox->addRow("##3---"); if (tab->getType() == ChatTab::TAB_PARTY) @@ -1101,6 +1111,14 @@ void PopupMenu::handleLink(const std::string &link, { mTab->setRemoveNames(true); } + else if (link == "disable away" && mTab) + { + mTab->setNoAway(true); + } + else if (link == "enable away" && mTab) + { + mTab->setNoAway(false); + } else if (link == "guild-pos" && !mNick.empty()) { showChangePos(getX(), getY()); -- cgit v1.2.3-70-g09d2