From 4371c8c1ffcf24e8d5a7cf2ec126be239cab3d76 Mon Sep 17 00:00:00 2001 From: David Athay Date: Fri, 18 Apr 2008 15:23:49 +0000 Subject: Fixed numerous crashes with chat and guild windows using new tabbed area. --- src/gui/chat.h | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) (limited to 'src/gui/chat.h') diff --git a/src/gui/chat.h b/src/gui/chat.h index d605def0..ab8c3985 100644 --- a/src/gui/chat.h +++ b/src/gui/chat.h @@ -37,9 +37,8 @@ class BrowserBox; class ScrollArea; -//class TabbedContainer; -//class GCContainer; class TabbedArea; +class Channel; enum { @@ -131,7 +130,7 @@ class ChatWindow : public Window, public gcn::ActionListener, * @param line Text message. * @parem own Type of message (usually the owner-type). */ - void chatLog(std::string line, int own, std::string channelName = "General"); + void chatLog(std::string line, int own, const std::string &channelName = "General"); #if 0 /* @@ -184,23 +183,27 @@ class ChatWindow : public Window, public gcn::ActionListener, /** Called to add the channel to the channel manager */ void - addChannel(short channel, std::string channelName); + addChannel(short channel, const std::string &channelName); /** Called to remove the channel from the channel manager */ void - removeChannel(short channel); + removeChannel(short channelId); + void + removeChannel(const std::string &channelName); + void + removeChannel(Channel *channel); /** Called to create a new channel tab */ void - createNewChannelTab(std::string channelName); + createNewChannelTab(const std::string &channelName); /** Called to join channel */ void - enterChannel(std::string channel, std::string password = "None"); + enterChannel(const std::string &channel, const std::string &password = "None"); /** Called to output text to a specific channel */ void - sendToChannel(short channel, std::string user, std::string msg); + sendToChannel(short channel, const std::string &user, const std::string &msg); /** Called when key is pressed */ void @@ -233,18 +236,13 @@ class ChatWindow : public Window, public gcn::ActionListener, #if 0 /** Constructs failed messages for actions */ - std::string const_msg(CHATSKILL); - std::map mTabs; - TabbedContainer *mContainer; /**< Tabbed container for tabbing between channels */ - GCContainer *mTab; /**< Tabs */ + std::string const_msg(CHATSKILL);*/ #endif TabbedArea *mChatTabs; /** < Chat Tabbed area for holding each channel */ gcn::TextField *mChatInput; /**< Input box for typing chat messages */ std::map mChannelOutput; /**< Map each TextOutput to a tab */ std::map mChannelScroll; /**< Map each ScrollArea to a tab */ - BrowserBox *mTextOutput; /**< Text box for displaying chat history */ - ScrollArea *mScrollArea; /**< Scroll area around text output */ typedef std::list History; typedef History::iterator HistoryIterator; -- cgit v1.2.3-70-g09d2