summaryrefslogtreecommitdiff
path: root/src/gui/windows/insertcarddialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-08-20 17:18:10 +0300
committerAndrei Karas <akaras@inbox.ru>2015-08-20 17:18:10 +0300
commitd7f5bf6c2ad9fdcf2308b1c9d3a70e0f17b30adf (patch)
tree83f74801c0d950fb2e78ed583b8f71c74f8b1e9a /src/gui/windows/insertcarddialog.cpp
parentb2c6603542af1d5c34a3e252d9454ddf0b21fcc5 (diff)
downloadmanaverse-d7f5bf6c2ad9fdcf2308b1c9d3a70e0f17b30adf.tar.gz
manaverse-d7f5bf6c2ad9fdcf2308b1c9d3a70e0f17b30adf.tar.bz2
manaverse-d7f5bf6c2ad9fdcf2308b1c9d3a70e0f17b30adf.tar.xz
manaverse-d7f5bf6c2ad9fdcf2308b1c9d3a70e0f17b30adf.zip
Show card name in insert card dialog.
Diffstat (limited to 'src/gui/windows/insertcarddialog.cpp')
-rw-r--r--src/gui/windows/insertcarddialog.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/gui/windows/insertcarddialog.cpp b/src/gui/windows/insertcarddialog.cpp
index d34dcc7c6..607a41c6a 100644
--- a/src/gui/windows/insertcarddialog.cpp
+++ b/src/gui/windows/insertcarddialog.cpp
@@ -32,17 +32,30 @@
#include "net/inventoryhandler.h"
#include "utils/gettext.h"
+#include "utils/stringutils.h"
#include "debug.h"
-InsertCardDialog::InsertCardDialog(const int itemIndex) :
+InsertCardDialog::InsertCardDialog(const int itemIndex,
+ const Item *const item) :
SellDialog(false),
+ mItem(item),
mItemIndex(itemIndex)
{
// TRANSLATORS: insert card dialog name
setWindowName(_("Insert card"));
- // TRANSLATORS: insert card dialog name
- setCaption(_("Insert card"));
+ if (item)
+ {
+ // TRANSLATORS: insert card dialog name
+ setCaption(strprintf(_("Insert card %s"),
+ item->getName().c_str()));
+ }
+ else
+ {
+ // TRANSLATORS: insert card dialog name
+ setCaption(strprintf(_("Insert card %s"),
+ ""));
+ }
}
void InsertCardDialog::initButtons()