diff options
author | Chuck Miller <shadowmil@gmail.com> | 2010-11-11 21:55:25 -0500 |
---|---|---|
committer | Chuck Miller <shadowmil@gmail.com> | 2010-11-11 22:45:58 -0500 |
commit | 5727a2d9eeb0688a16e5b7fe32f6d9836c4f7a4e (patch) | |
tree | 994cdeb1187a94996ca38c5e274aabaa5f1fec76 /src/gui/chat.cpp | |
parent | 3dd1baab3fb00a3aa99447430f16a431a205c614 (diff) | |
download | mana-client-5727a2d9eeb0688a16e5b7fe32f6d9836c4f7a4e.tar.gz mana-client-5727a2d9eeb0688a16e5b7fe32f6d9836c4f7a4e.tar.bz2 mana-client-5727a2d9eeb0688a16e5b7fe32f6d9836c4f7a4e.tar.xz mana-client-5727a2d9eeb0688a16e5b7fe32f6d9836c4f7a4e.zip |
Have the event system channels use enums instead of strings
Reviewed-by: Freeyorp
Diffstat (limited to 'src/gui/chat.cpp')
-rw-r--r-- | src/gui/chat.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp index 36125e60..280d4d15 100644 --- a/src/gui/chat.cpp +++ b/src/gui/chat.cpp @@ -90,8 +90,8 @@ ChatWindow::ChatWindow(): mAutoComplete(new ChatAutoComplete), mTmpVisible(false) { - listen("Chat"); - listen("Notices"); + listen(CHANNEL_CHAT); + listen(CHANNEL_NOTICES); setWindowName("Chat"); @@ -375,14 +375,14 @@ void ChatWindow::mouseDragged(gcn::MouseEvent &event) } } -void ChatWindow::event(const std::string &channel, const Mana::Event &event) +void ChatWindow::event(Channels channel, const Mana::Event &event) { - if (channel == "Notices") + if (channel == CHANNEL_NOTICES) { if (event.getName() == "ServerNotice") localChatTab->chatLog(event.getString("message"), BY_SERVER); } - else if (channel == "Chat") + else if (channel == CHANNEL_CHAT) { if (event.getName() == "Whisper") { |