diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-09-06 20:57:24 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-09-06 22:58:35 +0300 |
commit | 4ad3cd45f7a8c3f6d1817705c06223d1a2798a2f (patch) | |
tree | a776928bb1339cdd29eb2e54d50eb3fa6e3448d7 /src/gui/chatwindow.cpp | |
parent | 22ed653d8b630c813333d5c73a4ca02dede2a5a5 (diff) | |
download | plus-4ad3cd45f7a8c3f6d1817705c06223d1a2798a2f.tar.gz plus-4ad3cd45f7a8c3f6d1817705c06223d1a2798a2f.tar.bz2 plus-4ad3cd45f7a8c3f6d1817705c06223d1a2798a2f.tar.xz plus-4ad3cd45f7a8c3f6d1817705c06223d1a2798a2f.zip |
Improve constructors in some classes.
Diffstat (limited to 'src/gui/chatwindow.cpp')
-rw-r--r-- | src/gui/chatwindow.cpp | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/gui/chatwindow.cpp b/src/gui/chatwindow.cpp index 3f87e6d2c..3d1cd86db 100644 --- a/src/gui/chatwindow.cpp +++ b/src/gui/chatwindow.cpp @@ -78,6 +78,7 @@ class ChatInput : public TextField, public gcn::FocusListener public: ChatInput(ChatWindow *const window, TabbedArea *const tabs): TextField("", false), + FocusListener(), mWindow(window), mChatTabs(tabs) { @@ -154,7 +155,16 @@ static const char *ACTION_COLOR_PICKER = "color picker"; ChatWindow::ChatWindow(): Window(_("Chat"), false, nullptr, "chat.xml"), + ActionListener(), + KeyListener(), + mItemLinkHandler(new ItemLinkHandler), + mChatTabs(new TabbedArea), + mChatInput(new ChatInput(this, mChatTabs)), mTmpVisible(false), + mReturnToggles(config.getBoolValue("ReturnToggles")), + mColorListModel(new ColorListModel), + mColorPicker(new DropDown(mColorListModel)), + mChatColor(config.getIntValue("chatColor")), mChatHistoryIndex(0), mGMLoaded(false), mHaveMouse(false), @@ -181,20 +191,12 @@ ChatWindow::ChatWindow(): setMinWidth(150); setMinHeight(90); - mItemLinkHandler = new ItemLinkHandler; - - mChatTabs = new TabbedArea; mChatTabs->enableScrollButtons(true); mChatTabs->setFollowDownScroll(true); - mChatInput = new ChatInput(this, mChatTabs); mChatInput->setActionEventId("chatinput"); mChatInput->addActionListener(this); - mChatColor = config.getIntValue("chatColor"); - mColorListModel = new ColorListModel; - mColorPicker = new DropDown(mColorListModel); - mColorPicker->setActionEventId(ACTION_COLOR_PICKER); mColorPicker->addActionListener(this); mColorPicker->setSelected(mChatColor); @@ -212,10 +214,7 @@ ChatWindow::ChatWindow(): mChatInput->addKeyListener(this); mCurHist = mHistory.end(); - mReturnToggles = config.getBoolValue("ReturnToggles"); - mRainbowColor = 0; - mColorPicker->setVisible(config.getBoolValue("showChatColorsList")); fillCommands(); |