summaryrefslogtreecommitdiff
path: root/src/gui/popupmenu.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-03-26 20:04:40 +0200
committerAndrei Karas <akaras@inbox.ru>2011-03-26 20:04:40 +0200
commitadfacb195ba653b63fec08200d0535604d45e20e (patch)
tree0222d33fd3e26b9e87cda7fa00119ac44acc94d4 /src/gui/popupmenu.cpp
parentd1be68b99867261dc9298f3441acc09028897d6f (diff)
downloadplus-adfacb195ba653b63fec08200d0535604d45e20e.tar.gz
plus-adfacb195ba653b63fec08200d0535604d45e20e.tar.bz2
plus-adfacb195ba653b63fec08200d0535604d45e20e.tar.xz
plus-adfacb195ba653b63fec08200d0535604d45e20e.zip
Add option to chat context menu to remove nicks.
Usefull for example for tmw guild bot.
Diffstat (limited to 'src/gui/popupmenu.cpp')
-rw-r--r--src/gui/popupmenu.cpp21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp
index 1850fbb68..1cca9daa6 100644
--- a/src/gui/popupmenu.cpp
+++ b/src/gui/popupmenu.cpp
@@ -476,14 +476,23 @@ void PopupMenu::showChatPopup(int x, int y, ChatTab *tab)
{
mBrowserBox->addRow(strprintf("@@disable highlight|%s@@",
_("Disable highlight")));
- mBrowserBox->addRow("##3---");
}
else
{
mBrowserBox->addRow(strprintf("@@enable highlight|%s@@",
_("Enable highlight")));
- mBrowserBox->addRow("##3---");
}
+ if (tab->getRemoveNames())
+ {
+ mBrowserBox->addRow(strprintf("@@dont remove name|%s@@",
+ _("Dont remove name")));
+ }
+ else
+ {
+ mBrowserBox->addRow(strprintf("@@remove name|%s@@",
+ _("Remove name")));
+ }
+ mBrowserBox->addRow("##3---");
if (tab->getType() == ChatTab::TAB_PARTY)
{
@@ -1084,6 +1093,14 @@ void PopupMenu::handleLink(const std::string &link,
{
mTab->setAllowHighlight(false);
}
+ else if (link == "dont remove name" && mTab)
+ {
+ mTab->setRemoveNames(false);
+ }
+ else if (link == "remove name" && mTab)
+ {
+ mTab->setRemoveNames(true);
+ }
else if (link == "guild-pos" && !mNick.empty())
{
showChangePos(getX(), getY());