summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/commandhandler.cpp12
-rw-r--r--src/gui/chat.cpp12
-rw-r--r--src/gui/chat.h17
-rw-r--r--src/gui/guildwindow.cpp40
-rw-r--r--src/gui/npcpostdialog.cpp18
-rw-r--r--src/gui/partywindow.cpp11
-rw-r--r--src/gui/skill.h5
-rw-r--r--src/gui/trade.cpp2
-rw-r--r--src/gui/widgets/channeltab.cpp34
-rw-r--r--src/gui/widgets/channeltab.h2
-rw-r--r--src/gui/widgets/chattab.cpp64
-rw-r--r--src/gui/widgets/chattab.h21
-rw-r--r--src/gui/widgets/whispertab.cpp34
-rw-r--r--src/gui/widgets/whispertab.h4
-rw-r--r--src/log.cpp2
-rw-r--r--src/net/ea/buysellhandler.cpp5
-rw-r--r--src/net/ea/chathandler.cpp2
-rw-r--r--src/net/ea/equipmenthandler.cpp2
-rw-r--r--src/net/ea/inventoryhandler.cpp3
-rw-r--r--src/net/ea/playerhandler.cpp3
-rw-r--r--src/net/ea/skillhandler.cpp3
-rw-r--r--src/net/ea/tradehandler.cpp3
-rw-r--r--src/net/tmwserv/partyhandler.cpp3
-rw-r--r--src/net/tmwserv/tradehandler.cpp3
-rw-r--r--src/statuseffect.cpp4
25 files changed, 135 insertions, 174 deletions
diff --git a/src/commandhandler.cpp b/src/commandhandler.cpp
index 7ccd7d80..14c5434a 100644
--- a/src/commandhandler.cpp
+++ b/src/commandhandler.cpp
@@ -339,12 +339,6 @@ void CommandHandler::handleWho()
void CommandHandler::handleMsg(const std::string &args)
{
-#ifdef TMWSERV_SUPPORT
- std::string::size_type pos = args.find(' ');
- std::string recipient(args, 0, pos);
- std::string text(args, pos+1);
- Net::ChatServer::privMsg(recipient, text);
-#else
std::string recvnick = "";
std::string msg = "";
@@ -391,7 +385,6 @@ void CommandHandler::handleMsg(const std::string &args)
}
else
localChatTab->chatLog("Cannont send empty whispers!");
-#endif
}
void CommandHandler::handleClear()
@@ -547,10 +540,7 @@ void CommandHandler::handleParty(const std::string &args)
void CommandHandler::handleMe(const std::string &args)
{
std::string action = strprintf("*%s*", args.c_str());
- chatWindow->chatSend(action);
- //std::stringstream actionStr;
- //actionStr << "*" << args << "*";
- //chatWindow->chatSend(actionStr.str());
+ chatWindow->chatInput(action);
}
void CommandHandler::handleRecord(const std::string &args)
diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp
index b0b15dbc..48858bf6 100644
--- a/src/gui/chat.cpp
+++ b/src/gui/chat.cpp
@@ -27,6 +27,7 @@
#include "gui/scrollarea.h"
#include "gui/sdlinput.h"
+#include "gui/widgets/chattab.h"
#include "gui/widgets/tabbedarea.h"
#include "gui/widgets/whispertab.h"
@@ -82,7 +83,7 @@ ChatWindow::ChatWindow(Network * network):
// run the @assert command for the player again. Convenience for GMs.
if (config.getValue(player_node->getName() + "GMassert", 0)) {
std::string cmd = "@assert";
- chatSend(cmd);
+ chatInput(cmd);
}
#endif
mRecorder = new Recorder(this);
@@ -180,7 +181,7 @@ void ChatWindow::action(const gcn::ActionEvent &event)
mCurHist = mHistory.end();
// Send the message to the server
- chatSend(message);
+ chatInput(message);
// Clear the text from the chat input
mChatInput->setText("");
@@ -258,10 +259,10 @@ void ChatWindow::removeWhisper(std::string nick)
mWhispers.erase(nick);
}
-void ChatWindow::chatSend(std::string &msg)
+void ChatWindow::chatInput(std::string &msg)
{
ChatTab *tab = getFocused();
- tab->chatSend(msg);
+ tab->chatInput(msg);
}
void ChatWindow::doPresent()
@@ -377,6 +378,7 @@ void ChatWindow::setRecordingFile(const std::string &msg)
void ChatWindow::whisper(std::string nick, std::string mes, bool own)
{
if (mes.length() == 0) return;
+
std::string playerName = player_node->getName();
std::string tempNick = nick;
@@ -395,7 +397,7 @@ void ChatWindow::whisper(std::string nick, std::string mes, bool own)
}
if (own)
- tab->chatSend(mes);
+ tab->chatInput(mes);
else
tab->chatLog(nick, mes);
}
diff --git a/src/gui/chat.h b/src/gui/chat.h
index 177aa38f..ac4e491e 100644
--- a/src/gui/chat.h
+++ b/src/gui/chat.h
@@ -22,6 +22,8 @@
#ifndef CHAT_H
#define CHAT_H
+#include "window.h"
+
#include <list>
#include <string>
#include <map>
@@ -31,10 +33,6 @@
#include <guichan/widget.hpp>
#include <guichan/widgetlistener.hpp>
-#include "widgets/chattab.h"
-
-#include "window.h"
-
class BrowserBox;
class Channel;
class ChatTab;
@@ -45,16 +43,9 @@ class ItemLinkHandler;
#ifdef EATHENA_SUPPORT
class Network;
#endif
+class Tab;
class WhisperTab;
-/**
- * gets in between usernick and message text depending on
- * message type
- */
-#define CAT_NORMAL ": "
-#define CAT_IS ""
-#define CAT_WHISPER " whispers: "
-
#define DEFAULT_CHAT_WINDOW_SCROLL 7 // 1 means `1/8th of the window size'.
/** One item in the chat log */
@@ -142,7 +133,7 @@ class ChatWindow : public Window,
* @param msg The message text which is to be sent.
*
*/
- void chatSend(std::string &msg);
+ void chatInput(std::string &msg);
/** Called when key is pressed */
void keyPressed(gcn::KeyEvent &event);
diff --git a/src/gui/guildwindow.cpp b/src/gui/guildwindow.cpp
index c8a1872f..fb14235b 100644
--- a/src/gui/guildwindow.cpp
+++ b/src/gui/guildwindow.cpp
@@ -20,26 +20,26 @@
* $$
*/
-#include "guildwindow.h"
-
-#include "button.h"
-#include "chat.h"
-#include "confirm_dialog.h"
-#include "guildlistbox.h"
-#include "scrollarea.h"
-#include "textdialog.h"
-#include "windowcontainer.h"
-
-#include "widgets/layout.h"
-#include "widgets/tabbedarea.h"
-
-#include "../guild.h"
-#include "../log.h"
-#include "../localplayer.h"
-
-#include "../net/tmwserv/chatserver/guild.h"
-#include "../utils/dtor.h"
-#include "../utils/gettext.h"
+#include "gui/guildwindow.h"
+
+#include "gui/button.h"
+#include "gui/confirm_dialog.h"
+#include "gui/guildlistbox.h"
+#include "gui/scrollarea.h"
+#include "gui/textdialog.h"
+#include "gui/windowcontainer.h"
+
+#include "gui/widgets/chattab.h"
+#include "gui/widgets/layout.h"
+#include "gui/widgets/tabbedarea.h"
+
+#include "guild.h"
+#include "log.h"
+#include "localplayer.h"
+
+#include "net/tmwserv/chatserver/guild.h"
+#include "utils/dtor.h"
+#include "utils/gettext.h"
#include <algorithm>
diff --git a/src/gui/npcpostdialog.cpp b/src/gui/npcpostdialog.cpp
index 278bc397..e0133473 100644
--- a/src/gui/npcpostdialog.cpp
+++ b/src/gui/npcpostdialog.cpp
@@ -19,15 +19,17 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "npcpostdialog.h"
-#include "textbox.h"
-#include "textfield.h"
-#include "button.h"
-#include "scrollarea.h"
-#include "chat.h"
+#include "gui/npcpostdialog.h"
-#include "../net/tmwserv/gameserver/player.h"
-#include "../utils/gettext.h"
+#include "gui/textbox.h"
+#include "gui/textfield.h"
+#include "gui/button.h"
+#include "gui/scrollarea.h"
+
+#include "gui/widgets/chattab.h"
+
+#include "net/tmwserv/gameserver/player.h"
+#include "utils/gettext.h"
#include <guichan/widgets/label.hpp>
diff --git a/src/gui/partywindow.cpp b/src/gui/partywindow.cpp
index 3f857b5c..1f87b26f 100644
--- a/src/gui/partywindow.cpp
+++ b/src/gui/partywindow.cpp
@@ -19,13 +19,14 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "partywindow.h"
-#include "chat.h"
+#include "gui/partywindow.h"
-#include "widgets/avatar.h"
+#include "gui/widgets/avatar.h"
+#include "gui/widgets/chattab.h"
-#include "../utils/gettext.h"
-#include "../net/tmwserv/chatserver/party.h"
+#include "net/tmwserv/chatserver/party.h"
+
+#include "utils/gettext.h"
PartyWindow::PartyWindow() : Window(_("Party"))
{
diff --git a/src/gui/skill.h b/src/gui/skill.h
index 0600d106..0d6336f3 100644
--- a/src/gui/skill.h
+++ b/src/gui/skill.h
@@ -22,18 +22,19 @@
#ifndef SKILL_H
#define SKILL_H
+#include "gui/window.h"
+
#include <vector>
#include <guichan/actionlistener.hpp>
-#include "window.h"
-
struct SKILL {
short id; /**< Index into "skill_db" array */
short lv, sp;
};
class GuiTable;
+class ScrollArea;
class SkillGuiTableModel;
/**
diff --git a/src/gui/trade.cpp b/src/gui/trade.cpp
index 8aa3c3ea..4ecdede8 100644
--- a/src/gui/trade.cpp
+++ b/src/gui/trade.cpp
@@ -24,7 +24,7 @@
#include <guichan/font.hpp>
#include "button.h"
-#include "chat.h"
+#include "widgets/chattab.h"
#include "inventorywindow.h"
#include "item_amount.h"
#include "itemcontainer.h"
diff --git a/src/gui/widgets/channeltab.cpp b/src/gui/widgets/channeltab.cpp
index c17aec0a..375ead26 100644
--- a/src/gui/widgets/channeltab.cpp
+++ b/src/gui/widgets/channeltab.cpp
@@ -19,40 +19,18 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <guichan/widgets/label.hpp>
-
#include "channeltab.h"
-#include "../browserbox.h"
-#include "../chatinput.h"
-#include "../itemlinkhandler.h"
-#include "../recorder.h"
-#include "../scrollarea.h"
-
-#include "../../beingmanager.h"
-#include "../../commandhandler.h"
-#include "../../channel.h"
-#include "../../configuration.h"
-#include "../../game.h"
-#include "../../localplayer.h"
+#include "channel.h"
#ifdef TMWSERV_SUPPORT
-#include "../../net/tmwserv/chatserver/chatserver.h"
-#include "../../net/tmwserv/gameserver/player.h"
+#include "net/tmwserv/chatserver/chatserver.h"
+#include "net/tmwserv/gameserver/player.h"
#else
-#include "../../party.h"
-#include "../../net/messageout.h"
-#include "../../net/ea/protocol.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"
-
ChannelTab::ChannelTab(Channel *channel) : ChatTab(channel->getName()),
mChannel(channel)
{
@@ -63,7 +41,7 @@ ChannelTab::~ChannelTab()
{
}
-void ChannelTab::sendChat(const std::string &msg) {
+void ChannelTab::handleInput(const std::string &msg) {
#ifdef TMSERV_SUPPORT
Net::ChatServer::chat(getId(), msg);
#endif
diff --git a/src/gui/widgets/channeltab.h b/src/gui/widgets/channeltab.h
index 04a11e29..8c98189b 100644
--- a/src/gui/widgets/channeltab.h
+++ b/src/gui/widgets/channeltab.h
@@ -48,7 +48,7 @@ class ChannelTab : public ChatTab
*/
~ChannelTab();
- void sendChat(const std::string &msg);
+ void handleInput(const std::string &msg);
private:
Channel *mChannel;
diff --git a/src/gui/widgets/chattab.cpp b/src/gui/widgets/chattab.cpp
index 0594761d..715aaf20 100644
--- a/src/gui/widgets/chattab.cpp
+++ b/src/gui/widgets/chattab.cpp
@@ -19,34 +19,31 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include <guichan/widgets/label.hpp>
-
#include "chattab.h"
-#include "layouthelper.h"
-#include "../browserbox.h"
-#include "../chatinput.h"
-#include "../itemlinkhandler.h"
-#include "../recorder.h"
-#include "../scrollarea.h"
+#include "commandhandler.h"
+#include "configuration.h"
+#include "localplayer.h"
-#include "../../commandhandler.h"
-#include "../../configuration.h"
-#include "../../localplayer.h"
+#include "gui/browserbox.h"
+#include "gui/itemlinkhandler.h"
+#include "gui/recorder.h"
+#include "gui/scrollarea.h"
#ifdef TMWSERV_SUPPORT
-#include "../../net/tmwserv/chatserver/chatserver.h"
-#include "../../net/tmwserv/gameserver/player.h"
+#include "net/tmwserv/chatserver/chatserver.h"
+#include "net/tmwserv/gameserver/player.h"
#else
-#include "../../net/messageout.h"
-#include "../../net/ea/protocol.h"
+#include "net/messageout.h"
+#include "net/ea/protocol.h"
#endif
-#include "../../resources/iteminfo.h"
-#include "../../resources/itemdb.h"
+#include "resources/iteminfo.h"
+#include "resources/itemdb.h"
-#include "../../utils/strprintf.h"
-#include "../../utils/stringutils.h"
+#include "utils/gettext.h"
+#include "utils/strprintf.h"
+#include "utils/stringutils.h"
ChatTab::ChatTab(const std::string &name) : Tab()
{
@@ -160,10 +157,9 @@ void ChatTab::chatLog(std::string line, int own, bool ignoreRecord)
break;
#endif
case ACT_WHISPER:
- tmp.nick = strprintf(_("%s whispers:"), tmp.nick.c_str());
- tmp.nick += " ";
- lineColor = "##W";
- break;
+ // Resend whisper through normal mechanism
+ chatWindow->whisper(tmp.nick, tmp.text);
+ return;
case ACT_IS:
tmp.nick += CAT_IS;
lineColor = "##I";
@@ -221,10 +217,11 @@ void ChatTab::chatLog(std::string line, int own, bool ignoreRecord)
void ChatTab::chatLog(std::string &nick, std::string &msg)
{
- chatLog(nick + ": " + msg, nick == player_node->getName() ? BY_PLAYER : BY_OTHER, false);
+ chatLog(nick + CAT_NORMAL + msg, nick == player_node->getName() ?
+ BY_PLAYER : BY_OTHER, false);
}
-void ChatTab::chatSend(std::string &msg)
+void ChatTab::chatInput(std::string &msg)
{
trim(msg);
@@ -282,16 +279,11 @@ void ChatTab::chatSend(std::string &msg)
start = msg.find('[', start + 1);
}
-
// Prepare ordinary message
if (msg[0] != '/')
- {
- sendChat(msg);
- }
+ handleInput(msg);
else
- {
handleCommand(std::string(msg, 1));
- }
}
void ChatTab::scroll(int amount)
@@ -308,22 +300,22 @@ void ChatTab::clearText()
mTextOutput->clearRows();
}
-void ChatTab::sendChat(std::string &msg) {
+void ChatTab::handleInput(const std::string &msg) {
#ifdef TMWSERV_SUPPORT
Net::GameServer::Player::say(msg);
#else
- msg = player_node->getName() + " : " + msg;
+ std::string mes = player_node->getName() + " : " + msg;
MessageOut outMsg(chatWindow->mNetwork);
outMsg.writeInt16(CMSG_CHAT_MESSAGE);
// Added + 1 in order to let eAthena parse admin commands correctly
- outMsg.writeInt16(msg.length() + 4 + 1);
- outMsg.writeString(msg, msg.length() + 1);
+ outMsg.writeInt16(mes.length() + 4 + 1);
+ outMsg.writeString(mes, mes.length() + 1);
return;
#endif
}
-void ChatTab::handleCommand(const std::string msg)
+void ChatTab::handleCommand(std::string msg)
{
commandHandler->handleCommand(msg);
}
diff --git a/src/gui/widgets/chattab.h b/src/gui/widgets/chattab.h
index 3e64242c..52449f6f 100644
--- a/src/gui/widgets/chattab.h
+++ b/src/gui/widgets/chattab.h
@@ -22,11 +22,10 @@
#ifndef CHATTAB_H
#define CHATTAB_H
-#include <guichan/widgets/container.hpp>
-
-#include "tab.h"
+#include "gui/widgets/tab.h"
+#include "gui/chat.h"
-#include "../chat.h"
+#include <guichan/widgets/container.hpp>
class BrowserBox;
class Recorder;
@@ -48,6 +47,13 @@ enum
};
/**
+ * gets in between usernick and message text depending on
+ * message type
+ */
+#define CAT_NORMAL ": "
+#define CAT_IS ""
+
+/**
* A tab for the chat window. This is special to ease chat handling.
*/
class ChatTab : public Tab
@@ -90,7 +96,7 @@ class ChatTab : public Tab
* @param msg The message text which is to be sent.
*
*/
- void chatSend(std::string &msg);
+ void chatInput(std::string &msg);
/**
* Scrolls the chat window
@@ -105,10 +111,11 @@ class ChatTab : public Tab
protected:
friend class ChatWindow;
+ friend class WhisperWindow;
- virtual void sendChat(std::string &msg);
+ virtual void handleInput(const std::string &msg);
- virtual void handleCommand(const std::string msg);
+ virtual void handleCommand(std::string msg);
ScrollArea *mScrollArea;
BrowserBox *mTextOutput;
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;
diff --git a/src/gui/widgets/whispertab.h b/src/gui/widgets/whispertab.h
index 1d2f968d..739ae159 100644
--- a/src/gui/widgets/whispertab.h
+++ b/src/gui/widgets/whispertab.h
@@ -46,9 +46,9 @@ class WhisperTab : public ChatTab
~WhisperTab();
- void sendChat(const std::string &msg);
+ void handleInput(const std::string &msg);
- void handleCommand(const std::string msg);
+ void handleCommand(std::string msg);
private:
std::string mNick;
diff --git a/src/log.cpp b/src/log.cpp
index 75b015da..322fcdae 100644
--- a/src/log.cpp
+++ b/src/log.cpp
@@ -32,7 +32,7 @@
#include "log.h"
-#include "gui/chat.h"
+#include "gui/widgets/chattab.h"
Logger::Logger():
mLogToStandardOut(false),
diff --git a/src/net/ea/buysellhandler.cpp b/src/net/ea/buysellhandler.cpp
index b99db6a4..56d6a986 100644
--- a/src/net/ea/buysellhandler.cpp
+++ b/src/net/ea/buysellhandler.cpp
@@ -33,12 +33,11 @@
#include "gui/buy.h"
#include "gui/buysell.h"
-#include "gui/chat.h"
#include "gui/sell.h"
-#include "utils/gettext.h"
+#include "gui/widgets/chattab.h"
-#include <SDL_types.h>
+#include "utils/gettext.h"
BuySellHandler::BuySellHandler()
{
diff --git a/src/net/ea/chathandler.cpp b/src/net/ea/chathandler.cpp
index 14432b28..6aca58a3 100644
--- a/src/net/ea/chathandler.cpp
+++ b/src/net/ea/chathandler.cpp
@@ -30,7 +30,7 @@
#include "game.h"
#include "player_relations.h"
-#include "gui/chat.h"
+#include "gui/widgets/chattab.h"
#include "utils/gettext.h"
#include "utils/stringutils.h"
diff --git a/src/net/ea/equipmenthandler.cpp b/src/net/ea/equipmenthandler.cpp
index 7a287bea..f81bf7ed 100644
--- a/src/net/ea/equipmenthandler.cpp
+++ b/src/net/ea/equipmenthandler.cpp
@@ -31,7 +31,7 @@
#include "localplayer.h"
#include "log.h"
-#include "gui/chat.h"
+#include "gui/widgets/chattab.h"
#include "utils/gettext.h"
diff --git a/src/net/ea/inventoryhandler.cpp b/src/net/ea/inventoryhandler.cpp
index 21ae6dcb..5f7e6c6c 100644
--- a/src/net/ea/inventoryhandler.cpp
+++ b/src/net/ea/inventoryhandler.cpp
@@ -32,9 +32,10 @@
#include "localplayer.h"
#include "log.h"
-#include "gui/chat.h"
#include "gui/storagewindow.h"
+#include "gui/widgets/chattab.h"
+
#include "resources/iteminfo.h"
#include "utils/gettext.h"
diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp
index 00230ea3..bf775f51 100644
--- a/src/net/ea/playerhandler.cpp
+++ b/src/net/ea/playerhandler.cpp
@@ -33,7 +33,6 @@
#include "gui/buy.h"
#include "gui/buysell.h"
-#include "gui/chat.h"
#include "gui/gui.h"
#include "gui/npc_text.h"
#include "gui/npcintegerdialog.h"
@@ -45,6 +44,8 @@
#include "gui/storagewindow.h"
#include "gui/viewport.h"
+#include "gui/widgets/chattab.h"
+
#include "utils/stringutils.h"
#include "utils/gettext.h"
diff --git a/src/net/ea/skillhandler.cpp b/src/net/ea/skillhandler.cpp
index fcc0f4b2..477f96bf 100644
--- a/src/net/ea/skillhandler.cpp
+++ b/src/net/ea/skillhandler.cpp
@@ -27,9 +27,10 @@
#include "log.h"
-#include "gui/chat.h"
#include "gui/skill.h"
+#include "gui/widgets/chattab.h"
+
#include "utils/gettext.h"
/** job dependend identifiers (?) */
diff --git a/src/net/ea/tradehandler.cpp b/src/net/ea/tradehandler.cpp
index ea41ed70..1df02a1e 100644
--- a/src/net/ea/tradehandler.cpp
+++ b/src/net/ea/tradehandler.cpp
@@ -30,10 +30,11 @@
#include "localplayer.h"
#include "player_relations.h"
-#include "gui/chat.h"
#include "gui/confirm_dialog.h"
#include "gui/trade.h"
+#include "gui/widgets/chattab.h"
+
#include "utils/gettext.h"
std::string tradePartnerName;
diff --git a/src/net/tmwserv/partyhandler.cpp b/src/net/tmwserv/partyhandler.cpp
index dfbcea80..510eb77a 100644
--- a/src/net/tmwserv/partyhandler.cpp
+++ b/src/net/tmwserv/partyhandler.cpp
@@ -26,9 +26,10 @@
#include "net/messagein.h"
-#include "gui/chat.h"
#include "gui/partywindow.h"
+#include "gui/widgets/chattab.h"
+
#include "log.h"
#include "localplayer.h"
diff --git a/src/net/tmwserv/tradehandler.cpp b/src/net/tmwserv/tradehandler.cpp
index 85228355..8b3e06c6 100644
--- a/src/net/tmwserv/tradehandler.cpp
+++ b/src/net/tmwserv/tradehandler.cpp
@@ -30,10 +30,11 @@
#include "item.h"
#include "localplayer.h"
-#include "gui/chat.h"
#include "gui/confirm_dialog.h"
#include "gui/trade.h"
+#include "gui/widgets/chattab.h"
+
std::string tradePartnerName;
int tradePartnerID;
diff --git a/src/statuseffect.cpp b/src/statuseffect.cpp
index 077fbb63..fe076a55 100644
--- a/src/statuseffect.cpp
+++ b/src/statuseffect.cpp
@@ -21,10 +21,12 @@
#include <map>
-#include "gui/chat.h"
#include "statuseffect.h"
#include "log.h"
+
+#include "gui/widgets/chattab.h"
+
#include "utils/xml.h"