summaryrefslogtreecommitdiff
path: root/src/gui/widgets/tabs/whispertab.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/tabs/whispertab.cpp')
-rw-r--r--src/gui/widgets/tabs/whispertab.cpp51
1 files changed, 3 insertions, 48 deletions
diff --git a/src/gui/widgets/tabs/whispertab.cpp b/src/gui/widgets/tabs/whispertab.cpp
index 659704638..ec02bb70f 100644
--- a/src/gui/widgets/tabs/whispertab.cpp
+++ b/src/gui/widgets/tabs/whispertab.cpp
@@ -32,8 +32,6 @@
#include "gui/widgets/windowcontainer.h"
-#include "utils/gettext.h"
-
#include "debug.h"
WhisperTab::WhisperTab(const Widget2 *const widget, const std::string &nick) :
@@ -52,10 +50,7 @@ WhisperTab::~WhisperTab()
void WhisperTab::handleInput(const std::string &msg)
{
std::string newMsg;
- if (chatWindow)
- newMsg = chatWindow->doReplace(msg);
- else
- newMsg = msg;
+ newMsg = ChatWindow::doReplace(msg);
Net::getChatHandler()->privateMessage(mNick, newMsg);
if (player_node)
@@ -92,50 +87,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)
+ const std::string &restrict args A_UNUSED)
{
- 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);