summaryrefslogtreecommitdiff
path: root/src/gui/windows/chatwindow.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-16 16:15:34 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-16 16:15:34 +0300
commitfe6a120ea38daaad39f6952a886c20269cfedca6 (patch)
tree4595d63a2ab9764873657182fbf2ab2b985474bf /src/gui/windows/chatwindow.h
parent6279b10249efa59b3161b014899465fe4bb08da4 (diff)
downloadplus-fe6a120ea38daaad39f6952a886c20269cfedca6.tar.gz
plus-fe6a120ea38daaad39f6952a886c20269cfedca6.tar.bz2
plus-fe6a120ea38daaad39f6952a886c20269cfedca6.tar.xz
plus-fe6a120ea38daaad39f6952a886c20269cfedca6.zip
Move chatmsgtype into separate file.
Diffstat (limited to 'src/gui/windows/chatwindow.h')
-rw-r--r--src/gui/windows/chatwindow.h22
1 files changed, 6 insertions, 16 deletions
diff --git a/src/gui/windows/chatwindow.h b/src/gui/windows/chatwindow.h
index 98b1eb73e..b90b15b45 100644
--- a/src/gui/windows/chatwindow.h
+++ b/src/gui/windows/chatwindow.h
@@ -23,6 +23,8 @@
#ifndef GUI_WINDOWS_CHATWINDOW_H
#define GUI_WINDOWS_CHATWINDOW_H
+#include "gui/chatmsgtype.h"
+
#include "gui/widgets/window.h"
#include "listeners/actionlistener.h"
@@ -46,19 +48,6 @@ class WhisperTab;
const int DEFAULT_CHAT_WINDOW_SCROLL = 7;
-enum Own
-{
- BY_GM = 0,
- BY_PLAYER,
- BY_OTHER,
- BY_SERVER,
- BY_CHANNEL,
- ACT_WHISPER, // getting whispered at
- ACT_IS, // equivalent to "/me" on IRC
- BY_LOGGER,
- BY_UNKNOWN = -1
-};
-
/**
* The chat window.
*
@@ -202,7 +191,7 @@ class ChatWindow final : public Window,
void addWhisper(const std::string &restrict nick,
const std::string &restrict mes,
- const Own own = BY_OTHER);
+ const ChatMsgType::Type own = ChatMsgType::BY_OTHER);
WhisperTab *addWhisperTab(const std::string &nick,
const bool switchTo = false) A_WARN_UNUSED;
@@ -213,13 +202,14 @@ class ChatWindow final : public Window,
void ignoreAllWhispers();
- bool resortChatLog(std::string line, Own own,
+ bool resortChatLog(std::string line, ChatMsgType::Type own,
const std::string &channel,
const bool ignoreRecord,
const bool tryRemoveColors);
static void battleChatLog(const std::string &line,
- Own own = BY_UNKNOWN,
+ ChatMsgType::Type own
+ = ChatMsgType::BY_UNKNOWN,
const bool ignoreRecord = false,
const bool tryRemoveColors = true);