summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/windows/chatwindow.cpp8
-rw-r--r--src/gui/windows/chatwindow.h20
-rw-r--r--src/gui/windows/statuswindow.cpp3
-rw-r--r--src/gui/windows/whoisonline.cpp5
4 files changed, 19 insertions, 17 deletions
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp
index 2afbe7caf..9eb01a3ad 100644
--- a/src/gui/windows/chatwindow.cpp
+++ b/src/gui/windows/chatwindow.cpp
@@ -1062,7 +1062,8 @@ void ChatWindow::attributeChanged(const AttributesT id,
PRAGMA45(GCC diagnostic pop)
}
-void ChatWindow::addInputText(const std::string &text, const bool space)
+void ChatWindow::addInputText(const std::string &text,
+ const bool space)
{
const int caretPos = mChatInput->getCaretPosition();
const std::string &inputText = mChatInput->getText();
@@ -1083,7 +1084,8 @@ void ChatWindow::addItemText(const std::string &item)
{
std::ostringstream text;
text << "[" << item << "]";
- addInputText(text.str());
+ addInputText(text.str(),
+ true);
}
void ChatWindow::setVisible(Visible visible)
@@ -1122,7 +1124,7 @@ void ChatWindow::addWhisper(const std::string &restrict nick,
}
else if (config.getBoolValue("whispertab"))
{
- tab = addWhisperTab(nick, nick);
+ tab = addWhisperTab(nick, nick, false);
if (tab != nullptr)
saveState();
}
diff --git a/src/gui/windows/chatwindow.h b/src/gui/windows/chatwindow.h
index 7d02e0fd3..051d89288 100644
--- a/src/gui/windows/chatwindow.h
+++ b/src/gui/windows/chatwindow.h
@@ -145,7 +145,8 @@ class ChatWindow final : public Window,
void setInputText(const std::string &text);
/** Add the given text to the chat input. */
- void addInputText(const std::string &text, const bool space = true);
+ void addInputText(const std::string &text,
+ const bool space);
/** Called to add item to chat */
void addItemText(const std::string &item);
@@ -189,19 +190,19 @@ class ChatWindow final : public Window,
void addWhisper(const std::string &restrict nick,
const std::string &restrict mes,
- const ChatMsgTypeT own = ChatMsgType::BY_OTHER);
+ const ChatMsgTypeT own);
WhisperTab *addWhisperTab(const std::string &caption,
const std::string &nick,
- const bool switchTo = false) A_WARN_UNUSED;
+ const bool switchTo) A_WARN_UNUSED;
WhisperTab *getWhisperTab(const std::string &nick) const A_WARN_UNUSED;
ChatTab *addChannelTab(const std::string &name,
- const bool switchTo = false);
+ const bool switchTo);
ChatTab *addSpecialChannelTab(const std::string &name,
- const bool switchTo = false);
+ const bool switchTo);
ChatTab *addChatTab(const std::string &name,
const bool switchTo,
@@ -221,12 +222,9 @@ class ChatWindow final : public Window,
const TryRemoveColors tryRemoveColors);
static void battleChatLog(const std::string &line,
- ChatMsgTypeT own
- = ChatMsgType::BY_UNKNOWN,
- const IgnoreRecord ignoreRecord
- = IgnoreRecord_false,
- const TryRemoveColors tryRemoveColors
- = TryRemoveColors_true);
+ ChatMsgTypeT own,
+ const IgnoreRecord ignoreRecord,
+ const TryRemoveColors tryRemoveColors);
void channelChatLog(const std::string &channel,
const std::string &line,
diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp
index c144fdc57..deddf397e 100644
--- a/src/gui/windows/statuswindow.cpp
+++ b/src/gui/windows/statuswindow.cpp
@@ -650,6 +650,7 @@ void StatusWindow::action(const ActionEvent &event)
if (event.getId() == "copy")
{
- chatWindow->addInputText(mBasicStatsPage->getStatsStr());
+ chatWindow->addInputText(mBasicStatsPage->getStatsStr(),
+ true);
}
}
diff --git a/src/gui/windows/whoisonline.cpp b/src/gui/windows/whoisonline.cpp
index 5be4fa590..41738180a 100644
--- a/src/gui/windows/whoisonline.cpp
+++ b/src/gui/windows/whoisonline.cpp
@@ -202,8 +202,9 @@ void WhoIsOnline::handleLink(const std::string& link, MouseEvent *event)
}
else
{
- chatWindow->addInputText(std::string("/w \"").append(
- text).append("\" "));
+ chatWindow->addInputText(
+ std::string("/w \"").append(text).append("\" "),
+ true);
}
}
}