diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-02-13 11:55:03 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-02-13 11:55:03 +0300 |
commit | cf017ab50652d6d9aa7043cd18262a7f43040d45 (patch) | |
tree | 733efb377b72e73580dbf143df3f8d1797f9d1f8 | |
parent | 06bce926370519fbd47bf554562e6da217def498 (diff) | |
download | manaverse-cf017ab50652d6d9aa7043cd18262a7f43040d45.tar.gz manaverse-cf017ab50652d6d9aa7043cd18262a7f43040d45.tar.bz2 manaverse-cf017ab50652d6d9aa7043cd18262a7f43040d45.tar.xz manaverse-cf017ab50652d6d9aa7043cd18262a7f43040d45.zip |
Remove unused chat help from code.
-rw-r--r-- | src/gui/widgets/tabs/chattab.h | 7 | ||||
-rw-r--r-- | src/gui/widgets/tabs/guildchattab.cpp | 48 | ||||
-rw-r--r-- | src/gui/widgets/tabs/guildchattab.h | 2 | ||||
-rw-r--r-- | src/gui/widgets/tabs/whispertab.cpp | 42 | ||||
-rw-r--r-- | src/gui/widgets/tabs/whispertab.h | 2 | ||||
-rw-r--r-- | src/net/ea/gui/guildtab.cpp | 36 | ||||
-rw-r--r-- | src/net/ea/gui/guildtab.h | 2 | ||||
-rw-r--r-- | src/net/ea/gui/partytab.cpp | 76 | ||||
-rw-r--r-- | src/net/ea/gui/partytab.h | 2 |
9 files changed, 4 insertions, 213 deletions
diff --git a/src/gui/widgets/tabs/chattab.h b/src/gui/widgets/tabs/chattab.h index 404d59b91..651e69d6b 100644 --- a/src/gui/widgets/tabs/chattab.h +++ b/src/gui/widgets/tabs/chattab.h @@ -109,13 +109,6 @@ class ChatTab : public Tab void clearText(); /** - * Add any extra help text to the output. Allows tabs to define help - * for commands defined by the tab itself. - */ - virtual void showHelp() - { } - - /** * Handle special commands. Allows a tab to handle commands it * defines itself. * diff --git a/src/gui/widgets/tabs/guildchattab.cpp b/src/gui/widgets/tabs/guildchattab.cpp index 13386d18f..da1a651e1 100644 --- a/src/gui/widgets/tabs/guildchattab.cpp +++ b/src/gui/widgets/tabs/guildchattab.cpp @@ -55,50 +55,16 @@ GuildChatTab::~GuildChatTab() bool GuildChatTab::handleCommand(const std::string &restrict type, const std::string &restrict args) { - if (type == "help") - { - if (args == "invite") - { - // TRANSLATORS: guild chat tab help - chatLog(_("Command: /invite <nick>")); - // TRANSLATORS: guild chat tab help - chatLog(_("This command invites <nick> to the guild you're in.")); - // TRANSLATORS: guild chat tab help - chatLog(_("If the <nick> has spaces in it, enclose it in " - "double quotes (\").")); - } - else if (args == "leave") - { - // TRANSLATORS: guild chat tab help - chatLog(_("Command: /leave")); - // TRANSLATORS: guild chat tab help - chatLog(_("This command causes the player to leave the guild.")); - } - else - { - return false; - } - } - else if (type == "invite" && guildManager) - { + if (type == "invite" && guildManager) guildManager->invite(args); - } else if (type == "leave" && guildManager) - { guildManager->leave(); - } else if (type == "kick" && guildManager) - { guildManager->kick(args); - } else if (type == "notice" && guildManager) - { guildManager->notice(args); - } else - { return false; - } return true; } @@ -110,18 +76,6 @@ void GuildChatTab::handleInput(const std::string &msg) guildManager->chat(ChatWindow::doReplace(msg)); } -void GuildChatTab::showHelp() -{ - // TRANSLATORS: guild chat tab help - chatLog(_("/help > Display this help.")); - // TRANSLATORS: guild chat tab help - chatLog(_("/invite > Invite a player to your guild")); - // TRANSLATORS: guild chat tab help - chatLog(_("/leave > Leave the guild you are in")); - // TRANSLATORS: guild chat tab help - chatLog(_("/kick > Kick someone from the guild you are in")); -} - void GuildChatTab::getAutoCompleteList(StringVect &names) const { if (!guildManager) diff --git a/src/gui/widgets/tabs/guildchattab.h b/src/gui/widgets/tabs/guildchattab.h index d0d70778d..fbfd3a032 100644 --- a/src/gui/widgets/tabs/guildchattab.h +++ b/src/gui/widgets/tabs/guildchattab.h @@ -40,8 +40,6 @@ class GuildChatTab final : public ChatTab, public ConfigListener bool handleCommand(const std::string &restrict type, const std::string &restrict args) override final; - void showHelp() override; - void saveToLogFile(const std::string &msg) const override final; int getType() const override A_WARN_UNUSED diff --git a/src/gui/widgets/tabs/whispertab.cpp b/src/gui/widgets/tabs/whispertab.cpp index 2d1e2969a..908c9ae66 100644 --- a/src/gui/widgets/tabs/whispertab.cpp +++ b/src/gui/widgets/tabs/whispertab.cpp @@ -89,50 +89,10 @@ void WhisperTab::handleCommand(const std::string &msg) } } -void WhisperTab::showHelp() -{ - // TRANSLATORS: whisper tab help - chatLog(_("/ignore > Ignore the other player")); - // TRANSLATORS: whisper tab help - chatLog(_("/unignore > Stop ignoring the other player")); - // TRANSLATORS: whisper tab help - chatLog(_("/close > Close the whisper tab")); -} - bool WhisperTab::handleCommand(const std::string &restrict type, const std::string &restrict args) { - if (type == "help") - { - if (args == "close") - { - // TRANSLATORS: whisper tab help - chatLog(_("Command: /close")); - // TRANSLATORS: whisper tab help - chatLog(_("This command closes the current whisper tab.")); - } - else if (args == "ignore") - { - // TRANSLATORS: whisper tab help - chatLog(_("Command: /ignore")); - // TRANSLATORS: whisper tab help - chatLog(_("This command ignores the other player regardless of " - "current relations.")); - } - else if (args == "unignore") - { - // TRANSLATORS: whisper tab help - chatLog(_("Command: /unignore <player>")); - // TRANSLATORS: whisper tab help - chatLog(_("This command stops ignoring the other player if they " - "are being ignored.")); - } - else - { - return false; - } - } - else if (type == "close") + if (type == "close") { if (windowContainer) windowContainer->scheduleDelete(this); diff --git a/src/gui/widgets/tabs/whispertab.h b/src/gui/widgets/tabs/whispertab.h index b3936ab01..5dbb05a4e 100644 --- a/src/gui/widgets/tabs/whispertab.h +++ b/src/gui/widgets/tabs/whispertab.h @@ -36,8 +36,6 @@ class WhisperTab final : public ChatTab const std::string &getNick() const A_WARN_UNUSED { return mNick; } - void showHelp() override final; - bool handleCommand(const std::string &restrict type, const std::string &restrict args) override final; diff --git a/src/net/ea/gui/guildtab.cpp b/src/net/ea/gui/guildtab.cpp index 889b9624b..46b1f1649 100644 --- a/src/net/ea/gui/guildtab.cpp +++ b/src/net/ea/gui/guildtab.cpp @@ -63,28 +63,6 @@ GuildTab::~GuildTab() bool GuildTab::handleCommand(const std::string &restrict type, const std::string &restrict args) { - if (type == "help") - { - if (args == "invite") - { - // TRANSLATORS: guild chat help - chatLog(_("Command: /invite <nick>")); - // TRANSLATORS: guild chat help - chatLog(_("This command invites <nick> to the guild you're in.")); - // TRANSLATORS: guild chat help - chatLog(_("If the <nick> has spaces in it, enclose it in " - "double quotes (\").")); - } - else if (args == "leave") - { - // TRANSLATORS: guild chat help - chatLog(_("Command: /leave")); - // TRANSLATORS: guild chat help - chatLog(_("This command causes the player to leave the guild.")); - } - else - return false; - } /* else if (type == "create" || type == "new") { @@ -94,7 +72,7 @@ bool GuildTab::handleCommand(const std::string &restrict type, Net::getGuildHandler()->create(args); } */ - else if (type == "invite" && taGuild) + if (type == "invite" && taGuild) { Net::getGuildHandler()->invite(taGuild->getId(), args); } @@ -131,18 +109,6 @@ void GuildTab::handleInput(const std::string &msg) ChatWindow::doReplace(msg)); } -void GuildTab::showHelp() -{ - // TRANSLATORS: guild chat help - chatLog(_("/help > Display this help.")); - // TRANSLATORS: guild chat help - chatLog(_("/invite > Invite a player to your guild")); - // TRANSLATORS: guild chat help - chatLog(_("/leave > Leave the guild you are in")); - // TRANSLATORS: guild chat help - chatLog(_("/kick > Kick someone from the guild you are in")); -} - void GuildTab::getAutoCompleteList(StringVect &names) const { if (taGuild) diff --git a/src/net/ea/gui/guildtab.h b/src/net/ea/gui/guildtab.h index 8ee4f62e4..2b6a4bd1a 100644 --- a/src/net/ea/gui/guildtab.h +++ b/src/net/ea/gui/guildtab.h @@ -43,8 +43,6 @@ class GuildTab : public ChatTab, public ConfigListener bool handleCommand(const std::string &restrict type, const std::string &restrict args) override final; - void showHelp() override; - void saveToLogFile(const std::string &msg) const override final; int getType() const override final A_WARN_UNUSED diff --git a/src/net/ea/gui/partytab.cpp b/src/net/ea/gui/partytab.cpp index 1307e2882..79a9a8897 100644 --- a/src/net/ea/gui/partytab.cpp +++ b/src/net/ea/gui/partytab.cpp @@ -67,84 +67,10 @@ void PartyTab::handleInput(const std::string &msg) Net::getPartyHandler()->chat(ChatWindow::doReplace(msg)); } -void PartyTab::showHelp() -{ - // TRANSLATORS: party help message - chatLog(_("/help > Display this help.")); - // TRANSLATORS: party help message - chatLog(_("/invite > Invite a player to your party")); - // TRANSLATORS: party help message - chatLog(_("/leave > Leave the party you are in")); - // TRANSLATORS: party help message - chatLog(_("/kick > Kick someone from the party you are in")); - // TRANSLATORS: party help message - chatLog(_("/item > Show/change party item sharing options")); - // TRANSLATORS: party help message - chatLog(_("/exp > Show/change party experience sharing options")); -} - bool PartyTab::handleCommand(const std::string &restrict type, const std::string &restrict args) { - if (type == "help") - { - if (args == "invite") - { - // TRANSLATORS: party help message - chatLog(_("Command: /invite <nick>")); - // TRANSLATORS: party help message - chatLog(_("This command invites <nick> to party with you.")); - // TRANSLATORS: party help message - chatLog(_("If the <nick> has spaces in it, enclose it in " - "double quotes (\").")); - } - else if (args == "leave") - { - // TRANSLATORS: party help message - chatLog(_("Command: /leave")); - // TRANSLATORS: party help message - chatLog(_("This command causes the player to leave the party.")); - } - else if (args == "item") - { - // TRANSLATORS: party help message - chatLog(_("Command: /item <policy>")); - // TRANSLATORS: party help message - chatLog( - _("This command changes the party's item sharing policy.")); - // TRANSLATORS: party help message - chatLog(_("<policy> can be one of \"1\", \"yes\", \"true\" to " - "enable item sharing, or \"0\", \"no\", \"false\" to " - "disable item sharing.")); - // TRANSLATORS: party help message - chatLog(_("Command: /item")); - // TRANSLATORS: party help message - chatLog(_("This command displays the party's" - " current item sharing policy.")); - } - else if (args == "exp") - { - // TRANSLATORS: party help message - chatLog(_("Command: /exp <policy>")); - // TRANSLATORS: party help message - chatLog(_("This command changes the party's " - "experience sharing policy.")); - // TRANSLATORS: party help message - chatLog(_("<policy> can be one of \"1\", \"yes\", \"true\" to " - "enable experience sharing, or \"0\"," - " \"no\", \"false\" to disable experience sharing.")); - // TRANSLATORS: party help message - chatLog(_("Command: /exp")); - // TRANSLATORS: party help message - chatLog(_("This command displays the party's current " - "experience sharing policy.")); - } - else - { - return false; - } - } - else if (type == "create" || type == "new") + if (type == "create" || type == "new") { if (args.empty()) { diff --git a/src/net/ea/gui/partytab.h b/src/net/ea/gui/partytab.h index 6662b3ae1..d141452d0 100644 --- a/src/net/ea/gui/partytab.h +++ b/src/net/ea/gui/partytab.h @@ -40,8 +40,6 @@ class PartyTab : public ChatTab, public ConfigListener virtual ~PartyTab(); - void showHelp() override final; - bool handleCommand(const std::string &restrict type, const std::string &restrict args) override final; |