diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/popups/popupmenu.cpp | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp index 5d0f32f19..687aa38cf 100644 --- a/src/gui/popups/popupmenu.cpp +++ b/src/gui/popups/popupmenu.cpp @@ -2797,29 +2797,19 @@ void PopupMenu::addProtection() void PopupMenu::addUseDrop(const Item *const item, const bool isProtected) { - if (item->isEquipment()) + const ItemInfo &info = item->getInfo(); + const std::string &str = (item->isEquipment() && item->isEquipped()) + ? info.getUseButton2() : info.getUseButton(); + + if (str.empty()) { - if (item->isEquipped()) - { - // TRANSLATORS: popup menu item - // TRANSLATORS: unequip item - mBrowserBox->addRow("use", _("Unequip")); - } - else - { - // TRANSLATORS: popup menu item - // TRANSLATORS: use item - mBrowserBox->addRow("use", _("Equip")); - } + // TRANSLATORS: popup menu item + mBrowserBox->addRow("use", _("Use")); } else { - if (!isProtected) - { - // TRANSLATORS: popup menu item - // TRANSLATORS: use item - mBrowserBox->addRow("use", _("Use")); - } + // TRANSLATORS: popup menu item + mBrowserBox->addRow("use", str.c_str()); } if (!isProtected) |