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.cpp25
1 files changed, 10 insertions, 15 deletions
diff --git a/src/gui/popupmenu.cpp b/src/gui/popupmenu.cpp
index 8cb22c55..be5252f7 100644
--- a/src/gui/popupmenu.cpp
+++ b/src/gui/popupmenu.cpp
@@ -20,9 +20,6 @@
*/
#include <cassert>
-#include <iostream>
-
-#include <guichan/focushandler.hpp>
#include "browserbox.h"
#include "chat.h"
@@ -43,7 +40,6 @@
#include "../net/protocol.h"
#include "../resources/itemdb.h"
-#include "../resources/iteminfo.h"
#include "../utils/gettext.h"
#include "../utils/strprintf.h"
@@ -80,27 +76,27 @@ void PopupMenu::showPopup(int x, int y, Being *being)
// Players can be traded with. Later also attack, follow and
// add as buddy will be options in this menu.
const std::string &name = being->getName();
- mBrowserBox->addRow(_("@@trade|Trade With ") + name + "@@");
- mBrowserBox->addRow(_("@@attack|Attack ") + name + "@@");
+ mBrowserBox->addRow(strprintf(_("@@trade|Trade With %s@@"), name.c_str()));
+ mBrowserBox->addRow(strprintf(_("@@attack|Attack %s@@"), name.c_str()));
mBrowserBox->addRow("##3---");
switch (player_relations.getRelation(name)) {
case PlayerRelation::NEUTRAL:
- mBrowserBox->addRow(_("@@friend|Befriend ") + name + "@@");
+ mBrowserBox->addRow(strprintf(_("@@friend|Befriend %s@@"), name.c_str()));
case PlayerRelation::FRIEND:
- mBrowserBox->addRow(_("@@disregard|Disregard ") + name + "@@");
- mBrowserBox->addRow(_("@@ignore|Ignore ") + name + "@@");
+ mBrowserBox->addRow(strprintf(_("@@disregard|Disregard %s@@"), name.c_str()));
+ mBrowserBox->addRow(strprintf(_("@@ignore|Ignore %s@@"), name.c_str()));
break;
case PlayerRelation::DISREGARDED:
- mBrowserBox->addRow(_("@@unignore|Un-Ignore ") + name + "@@");
- mBrowserBox->addRow(_("@@ignore|Completely ignore ") + name + "@@");
+ mBrowserBox->addRow(strprintf(_("@@unignore|Un-Ignore %s@@"), name.c_str()));
+ mBrowserBox->addRow(strprintf(_("@@ignore|Completely ignore %s@@"), name.c_str()));
break;
case PlayerRelation::IGNORED:
- mBrowserBox->addRow(_("@@unignore|Un-Ignore ") + name + "@@");
+ mBrowserBox->addRow(strprintf(_("@@unignore|Un-Ignore %s@@"), name.c_str()));
break;
}
@@ -108,8 +104,7 @@ void PopupMenu::showPopup(int x, int y, Being *being)
//mBrowserBox->addRow(_("@@buddy|Add ") + name + " to Buddy List@@");
mBrowserBox->addRow("##3---");
- mBrowserBox->addRow(_("@@party-invite|Invite ") + name +
- " to party@@");
+ mBrowserBox->addRow(strprintf(_("@@party-invite|Invite %s to party@@"), name.c_str()));
}
break;
@@ -254,7 +249,7 @@ void PopupMenu::handleLink(const std::string& link)
else if (link == "chat")
{
- chatWindow->addItemText(mItem->getId(), mItem->getInfo().getName());
+ chatWindow->addItemText(mItem->getInfo().getName());
}
else if (link == "drop")