From 1939f5fa61fe071ff8e1e4ab0301c6f821c0de8a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 11 Jan 2015 23:59:36 +0300 Subject: Remove popup handler "clear drops". --- src/actions/actions.cpp | 6 ++++++ src/actions/actions.h | 1 + src/gui/popups/popupmenu.cpp | 7 +------ src/input/inputaction.h | 1 + src/input/inputactionmap.h | 5 +++++ src/input/pages/windows.cpp | 6 ++++++ 6 files changed, 20 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp index 7596758c8..3c9605fc7 100644 --- a/src/actions/actions.cpp +++ b/src/actions/actions.cpp @@ -1518,4 +1518,10 @@ impHandler(kick) return true; } +impHandler0(clearDrop) +{ + if (dropShortcut) + dropShortcut->clear(); +} + } // namespace Actions diff --git a/src/actions/actions.h b/src/actions/actions.h index 545e92f02..17b4900a0 100644 --- a/src/actions/actions.h +++ b/src/actions/actions.h @@ -102,6 +102,7 @@ namespace Actions decHandler(protectItem); decHandler(unprotectItem); decHandler(kick); + decHandler(clearDrop); } // namespace Actions #undef decHandler diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp index 1ee8e5035..349598f26 100644 --- a/src/gui/popups/popupmenu.cpp +++ b/src/gui/popups/popupmenu.cpp @@ -1018,11 +1018,6 @@ void PopupMenu::handleLink(const std::string &link, mDialog->setActionEventId("ok"); mDialog->addActionListener(&mRenameListener); } - else if (link == "clear drops") - { - if (dropShortcut) - dropShortcut->clear(); - } else if (link == "edit spell" && mSpell) { (new TextCommandEditor(mSpell))->postInit(); @@ -1862,7 +1857,7 @@ void PopupMenu::showDropPopup(const int x, const int y, Item *const item) } mBrowserBox->addRow("##3---"); // TRANSLATORS: popup menu item - mBrowserBox->addRow("clear drops", _("Clear drop window")); + mBrowserBox->addRow("/cleardrops", _("Clear drop window")); mBrowserBox->addRow("##3---"); // TRANSLATORS: popup menu item // TRANSLATORS: close menu diff --git a/src/input/inputaction.h b/src/input/inputaction.h index 694647a93..63f351706 100644 --- a/src/input/inputaction.h +++ b/src/input/inputaction.h @@ -534,6 +534,7 @@ namespace InputAction CHAT_GM_TAB, CHAT_PARTY_TAB, CHAT_GUILD_TAB, + DROP_CLEAR, TOTAL }; } // namespace InputAction diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h index 2235daba4..030600a38 100644 --- a/src/input/inputactionmap.h +++ b/src/input/inputactionmap.h @@ -3964,6 +3964,11 @@ static const InputActionData inputActionData[InputAction::TOTAL] = { InputCondition::INGAME, "guildtab|guildchattab", false}, + {"keyDropClear", + defaultAction(&Actions::clearDrop), + InputCondition::INGAME, + "cleardrops|cleardrop|cleardropwindow|dropclear|dropsclear", + false}, }; #undef defaultAction diff --git a/src/input/pages/windows.cpp b/src/input/pages/windows.cpp index ff646ded0..41a538326 100644 --- a/src/input/pages/windows.cpp +++ b/src/input/pages/windows.cpp @@ -235,6 +235,12 @@ SetupActionData setupActionDataWindows[] = InputAction::NEXT_INV_TAB, "", }, + { + // TRANSLATORS: input action name + N_("Clear drops window"), + InputAction::DROP_CLEAR, + "", + }, { "", InputAction::NO_VALUE, -- cgit v1.2.3-70-g09d2