From d1c4cb3675600137d0239ac7bdfc91062592804a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 8 Mar 2015 12:29:10 +0300 Subject: Move guild-kick from popup manager into actions. --- src/gui/popups/popupmenu.cpp | 35 ++++++++++------------------------- 1 file changed, 10 insertions(+), 25 deletions(-) (limited to 'src/gui') diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp index bedc93259..1420d5714 100644 --- a/src/gui/popups/popupmenu.cpp +++ b/src/gui/popups/popupmenu.cpp @@ -183,7 +183,7 @@ void PopupMenu::showPopup(const int x, const int y, const Being *const being) { if (guild1->getId() == guild2->getId()) { - mBrowserBox->addRow("guild-kick", + mBrowserBox->addRow("/kickguild 'NAME'", // TRANSLATORS: popup menu item // TRANSLATORS: kick player from guild _("Kick from guild")); @@ -199,7 +199,7 @@ void PopupMenu::showPopup(const int x, const int y, const Being *const being) } else if (guild2->getMember(mNick)) { - mBrowserBox->addRow("guild-kick", + mBrowserBox->addRow("/kickguild 'NAME'", // TRANSLATORS: popup menu item // TRANSLATORS: kick player from guild _("Kick from guild")); @@ -506,9 +506,10 @@ void PopupMenu::showPlayerPopup(const std::string &nick) && guildManager->havePower())) #endif { - // TRANSLATORS: popup menu item - // TRANSLATORS: kick player from guild - mBrowserBox->addRow("guild-kick", _("Kick from guild")); + mBrowserBox->addRow("/kickguild 'NAME'", + // TRANSLATORS: popup menu item + // TRANSLATORS: kick player from guild + _("Kick from guild")); } if (guild2->getServerGuild()) { @@ -829,10 +830,10 @@ void PopupMenu::showChatPopup(const int x, const int y, ChatTab *const tab) && guildManager->havePower())) #endif { - // TRANSLATORS: popup menu item - // TRANSLATORS: kick player from guild - mBrowserBox->addRow(strprintf( - "@@guild-kick|%s@@", _("Kick from guild"))); + mBrowserBox->addRow("/kickguild 'NAME'", + // TRANSLATORS: popup menu item + // TRANSLATORS: kick player from guild + _("Kick from guild")); } if (guild2->getServerGuild()) { @@ -1067,22 +1068,6 @@ void PopupMenu::handleLink(const std::string &link, dialog->setActionEventId("ok"); dialog->addActionListener(&mPlayerListener); } - else if (link == "guild-kick" && !mNick.empty()) - { - if (localPlayer) - { - const Guild *const guild = localPlayer->getGuild(); - if (guild) - { - if (guild->getServerGuild()) - guildHandler->kick(guild->getMember(mNick), ""); -#ifdef TMWA_SUPPORT - else if (guildManager) - guildManager->kick(mNick); -#endif - } - } - } else if (link == "enable highlight" && mTab) { inputManager.executeChatCommand(InputAction::ENABLE_HIGHLIGHT, -- cgit v1.2.3-70-g09d2