summaryrefslogtreecommitdiff
path: root/src/gui/chat.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/chat.cpp')
-rw-r--r--src/gui/chat.cpp25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp
index 91e410ce..ac13355c 100644
--- a/src/gui/chat.cpp
+++ b/src/gui/chat.cpp
@@ -1,9 +1,8 @@
/*
- * Aethyra
+ * The Mana World
* Copyright (C) 2004 The Mana World Development Team
*
- * This file is part of Aethyra based on original code
- * from The Mana World.
+ * This file is part of The Mana World.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -52,14 +51,14 @@
ChatWindow::ChatWindow(Network * network):
Window(""), mNetwork(network), mTmpVisible(false)
{
- setWindowName(_("Chat"));
+ setWindowName("Chat");
setResizable(true);
setDefaultSize(0, windowContainer->getHeight() - 123, 600, 123);
setMinWidth(150);
setMinHeight(90);
- mItemLinkHandler = new ItemLinkHandler();
+ mItemLinkHandler = new ItemLinkHandler;
mChatInput = new ChatInput;
mChatInput->setActionEventId("chatinput");
@@ -155,13 +154,15 @@ void ChatWindow::chatLog(std::string line, int own, bool ignoreRecord)
case BY_GM:
if (tmp.nick.empty())
{
- tmp.nick = std::string(_("Global announcement: "));
+ tmp.nick = std::string(_("Global announcement:"));
+ tmp.nick += " ";
lineColor = "##G";
}
else
{
- tmp.nick = strprintf(_("Global announcement from %s: "),
+ tmp.nick = strprintf(_("Global announcement from %s:"),
tmp.nick.c_str());
+ tmp.nick += " ";
lineColor = "##1"; // Equiv. to BrowserBox::RED
}
break;
@@ -184,7 +185,8 @@ void ChatWindow::chatLog(std::string line, int own, bool ignoreRecord)
lineColor = "##P";
break;
case ACT_WHISPER:
- tmp.nick += CAT_WHISPER;
+ tmp.nick = strprintf(_("%s whispers:"), tmp.nick.c_str());
+ tmp.nick += " ";
lineColor = "##W";
break;
case ACT_IS:
@@ -246,7 +248,7 @@ void ChatWindow::chatLog(CHATSKILL act)
chatLog(const_msg(act), BY_SERVER);
}
-void ChatWindow::action(const gcn::ActionEvent & event)
+void ChatWindow::action(const gcn::ActionEvent &event)
{
if (event.getId() == "chatinput")
{
@@ -672,7 +674,7 @@ std::string ChatWindow::const_msg(CHATSKILL act)
msg += _("You cannot do that right now!");
break;
case RFAIL_ZENY:
- msg += _("Seems you need more GP... ;-)");
+ msg += _("Seems you need more money... ;-)");
break;
case RFAIL_WEAPON:
msg += _("You cannot use this skill with that kind of weapon!");
@@ -722,9 +724,8 @@ void ChatWindow::scroll(int amount)
mTextOutput->showPart(scr);
}
-void ChatWindow::keyPressed(gcn::KeyEvent & event)
+void ChatWindow::keyPressed(gcn::KeyEvent &event)
{
-
if (event.getKey().getValue() == Key::DOWN &&
mCurHist != mHistory.end())
{