summaryrefslogtreecommitdiff
path: root/src/gui/popupmenu.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-03-27 00:38:43 +0200
committerAndrei Karas <akaras@inbox.ru>2011-03-27 00:38:43 +0200
commit855c565e2242fa2504fb06f4579abc609de452f5 (patch)
treea07f2f2e99f56f80fbec31090dfea6fc06f57060 /src/gui/popupmenu.cpp
parentb26e72ed5e62e9079319e14ed82734f0659db3c4 (diff)
downloadmanaverse-855c565e2242fa2504fb06f4579abc609de452f5.tar.gz
manaverse-855c565e2242fa2504fb06f4579abc609de452f5.tar.bz2
manaverse-855c565e2242fa2504fb06f4579abc609de452f5.tar.xz
manaverse-855c565e2242fa2504fb06f4579abc609de452f5.zip
Add no away to whisper chat context menu.
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());