diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-03-27 13:12:24 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-03-27 13:13:03 -0600 |
commit | 74f23fd3d0e1fb3be8e5419193d57d91746c887a (patch) | |
tree | 2715ae060ccd76f1b472dee3b9086e169d0e6926 /src/gui/widgets/whispertab.cpp | |
parent | 795cec6e276e7f5df8a25bd8306e6fd87c826502 (diff) | |
download | mana-74f23fd3d0e1fb3be8e5419193d57d91746c887a.tar.gz mana-74f23fd3d0e1fb3be8e5419193d57d91746c887a.tar.bz2 mana-74f23fd3d0e1fb3be8e5419193d57d91746c887a.tar.xz mana-74f23fd3d0e1fb3be8e5419193d57d91746c887a.zip |
Clean up chat and chat tabs some more
Diffstat (limited to 'src/gui/widgets/whispertab.cpp')
-rw-r--r-- | src/gui/widgets/whispertab.cpp | 34 |
1 files changed, 12 insertions, 22 deletions
diff --git a/src/gui/widgets/whispertab.cpp b/src/gui/widgets/whispertab.cpp index 1c63d1c9..0ae042df 100644 --- a/src/gui/widgets/whispertab.cpp +++ b/src/gui/widgets/whispertab.cpp @@ -19,38 +19,28 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include <guichan/widgets/label.hpp> - #include "whispertab.h" -#include "../../beingmanager.h" -#include "../../commandhandler.h" -#include "../../channel.h" -#include "../../configuration.h" -#include "../../game.h" -#include "../../localplayer.h" +#include "localplayer.h" + +#include "gui/palette.h" #ifdef TMWSERV_SUPPORT -#include "../../net/tmwserv/chatserver/chatserver.h" -#include "../../net/tmwserv/gameserver/player.h" +#include "net/tmwserv/chatserver/chatserver.h" #else -#include "../../party.h" -#include "../../net/messageout.h" -#include "../../net/ea/protocol.h" +#include "party.h" +#include "net/messageout.h" +#include "net/ea/protocol.h" #endif -#include "../../resources/iteminfo.h" -#include "../../resources/itemdb.h" - -#include "../../utils/dtor.h" -#include "../../utils/gettext.h" -#include "../../utils/strprintf.h" -#include "../../utils/stringutils.h" +#include "utils/gettext.h" +#include "utils/strprintf.h" WhisperTab::WhisperTab(const std::string &nick) : ChatTab(nick), mNick(nick) { + setForegroundColor(guiPalette->getColor(Palette::WHISPER)); } WhisperTab::~WhisperTab() @@ -58,7 +48,7 @@ WhisperTab::~WhisperTab() chatWindow->removeWhisper(mNick); } -void WhisperTab::sendChat(const std::string &msg) { +void WhisperTab::handleInput(const std::string &msg) { if (msg.length() == 0) { chatLog(_("Cannot send empty chat!"), BY_SERVER, false); return; @@ -78,7 +68,7 @@ void WhisperTab::sendChat(const std::string &msg) { msg.c_str()), BY_PLAYER, false); } -void WhisperTab::handleCommand(const std::string msg) +void WhisperTab::handleCommand(std::string msg) { if (msg == "close") delete this; |