diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-03-26 20:04:40 +0200 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-03-26 20:04:40 +0200 |
commit | adfacb195ba653b63fec08200d0535604d45e20e (patch) | |
tree | 0222d33fd3e26b9e87cda7fa00119ac44acc94d4 /src/gui/popupmenu.cpp | |
parent | d1be68b99867261dc9298f3441acc09028897d6f (diff) | |
download | manaverse-adfacb195ba653b63fec08200d0535604d45e20e.tar.gz manaverse-adfacb195ba653b63fec08200d0535604d45e20e.tar.bz2 manaverse-adfacb195ba653b63fec08200d0535604d45e20e.tar.xz manaverse-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.cpp | 21 |
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()); |