summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-06-07 02:55:08 +0300
committerAndrei Karas <akaras@inbox.ru>2011-06-07 02:55:08 +0300
commit921f578d285db7cbb8f98e413a3b67555c1f61a7 (patch)
treedacc2918e01e28ab5c6fc302167ab2c0fe5847c1 /src
parent26aea9cab992944ae2db593cb948d51afa12846f (diff)
downloadmv-921f578d285db7cbb8f98e413a3b67555c1f61a7.tar.gz
mv-921f578d285db7cbb8f98e413a3b67555c1f61a7.tar.bz2
mv-921f578d285db7cbb8f98e413a3b67555c1f61a7.tar.xz
mv-921f578d285db7cbb8f98e413a3b67555c1f61a7.zip
Add copy to chat menu item to bars context menus.
Diffstat (limited to 'src')
-rw-r--r--src/gui/popupmenu.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp
index 766e968ad..aaf47f36a 100644
--- a/src/gui/popupmenu.cpp
+++ b/src/gui/popupmenu.cpp
@@ -1397,6 +1397,11 @@ void PopupMenu::handleLink(const std::string &link,
if (player_node)
player_node->resetYellowBar();
}
+ else if (link == "bar to chat" && !mNick.empty())
+ {
+ if (chatWindow)
+ chatWindow->addInputText(mNick);
+ }
else if (link == "items" && being)
{
if (being == player_node)
@@ -1748,6 +1753,8 @@ void PopupMenu::showPopup(int x, int y, ProgressBar *b)
if (!b || !miniStatusWindow)
return;
+ mNick = b->text();
+
mBrowserBox->clearRows();
std::list <ProgressBar*> bars = miniStatusWindow->getBars();
std::list <ProgressBar*>::iterator it, it_end;
@@ -1775,6 +1782,7 @@ void PopupMenu::showPopup(int x, int y, ProgressBar *b)
mBrowserBox->addRow(strprintf("@@reset yellow|%s@@",
_("Reset yellow bar")));
mBrowserBox->addRow("##3---");
+ mBrowserBox->addRow(strprintf("@@bar to chat|%s@@", _("Copy to chat")));
mBrowserBox->addRow(strprintf("@@cancel|%s@@", _("Cancel")));
showPopup(x, y);