summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/tabs/chattab.h7
-rw-r--r--src/gui/widgets/tabs/guildchattab.cpp48
-rw-r--r--src/gui/widgets/tabs/guildchattab.h2
-rw-r--r--src/gui/widgets/tabs/whispertab.cpp42
-rw-r--r--src/gui/widgets/tabs/whispertab.h2
5 files changed, 2 insertions, 99 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;