summaryrefslogtreecommitdiff
path: root/src/gui/popupmenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/popupmenu.cpp')
-rw-r--r--src/gui/popupmenu.cpp18
1 files changed, 18 insertions, 0 deletions
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());