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.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp
index 86e5865a..b7a57da5 100644
--- a/src/gui/chat.cpp
+++ b/src/gui/chat.cpp
@@ -365,7 +365,7 @@ void ChatWindow::keyPressed(gcn::KeyEvent &event)
}
}
-void ChatWindow::setInputText(std::string input_str)
+void ChatWindow::addInputText(std::string input_str)
{
mChatInput->setText(mChatInput->getText() + input_str + " ");
requestChatFocus();
@@ -375,8 +375,7 @@ void ChatWindow::addItemText(const std::string &item)
{
std::ostringstream text;
text << "[" << item << "] ";
- mChatInput->setText(mChatInput->getText() + text.str());
- requestChatFocus();
+ addInputText(text.str());
}
void ChatWindow::setVisible(bool isVisible)