diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-02-05 15:00:58 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-02-05 15:00:58 +0300 |
commit | 9a3a196dbf633a699c26d0227802a42f025c8bfd (patch) | |
tree | dfbdb2ff1e2c54d75a2bf6411d3f70df22518c28 /src/gui/chatwindow.cpp | |
parent | fc17ff22d9df50df9c5d1cf3dc0de358001271ed (diff) | |
parent | ece36a40d4e9a838cde01075d7681b8fc517b19f (diff) | |
download | ManaVerse-9a3a196dbf633a699c26d0227802a42f025c8bfd.tar.gz ManaVerse-9a3a196dbf633a699c26d0227802a42f025c8bfd.tar.bz2 ManaVerse-9a3a196dbf633a699c26d0227802a42f025c8bfd.tar.xz ManaVerse-9a3a196dbf633a699c26d0227802a42f025c8bfd.zip |
Merge branch 'master' into stripped
Conflicts:
src/guichan/gui.cpp
src/guichan/include/guichan/sdl/sdlpixel.hpp
Diffstat (limited to 'src/gui/chatwindow.cpp')
-rw-r--r-- | src/gui/chatwindow.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gui/chatwindow.cpp b/src/gui/chatwindow.cpp index 899bbdc36..6831ad5b6 100644 --- a/src/gui/chatwindow.cpp +++ b/src/gui/chatwindow.cpp @@ -548,6 +548,9 @@ void ChatWindow::removeTab(ChatTab *tab) void ChatWindow::addTab(ChatTab *tab) { + if (!tab) + return; + mChatTabs->addTab(tab, tab->mScrollArea); // Update UI @@ -764,18 +767,18 @@ void ChatWindow::keyPressed(gcn::KeyEvent &event) mCurHist = mHistory.end(); mChatInput->setText(""); } - else if (keyboard.isKeyActive(keyboard.KEY_AUTOCOMPLETE_CHAT) && + else if (keyboard.isActionActive(keyboard.KEY_AUTOCOMPLETE_CHAT) && mChatInput->getText() != "") { autoComplete(); return; } - else if (keyboard.isKeyActive(keyboard.KEY_DEACTIVATE_CHAT) && + else if (keyboard.isActionActive(keyboard.KEY_DEACTIVATE_CHAT) && mChatInput->isVisible()) { mChatInput->processVisible(false); } - else if (keyboard.isKeyActive(keyboard.KEY_CHAT_PREV_HISTORY) && + else if (keyboard.isActionActive(keyboard.KEY_CHAT_PREV_HISTORY) && mChatInput->isVisible()) { ChatTab *tab = getFocused(); @@ -807,7 +810,7 @@ void ChatWindow::keyPressed(gcn::KeyEvent &event) mChatInput->getText().length())); } } - else if (keyboard.isKeyActive(keyboard.KEY_CHAT_NEXT_HISTORY) && + else if (keyboard.isActionActive(keyboard.KEY_CHAT_NEXT_HISTORY) && mChatInput->isVisible()) { ChatTab *tab = getFocused(); |