diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-03-27 07:32:02 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-03-27 07:32:02 -0600 |
commit | 9d68ee18a9d1f37cbdf4b984d6db72f7fc59cf51 (patch) | |
tree | 8928f298da71ff16f9177aa7227b9dcc97ae9d01 /src/gui/widgets/whispertab.cpp | |
parent | 268e47c0d3791483f3d0066e24c6686c3c938da9 (diff) | |
download | mana-9d68ee18a9d1f37cbdf4b984d6db72f7fc59cf51.tar.gz mana-9d68ee18a9d1f37cbdf4b984d6db72f7fc59cf51.tar.bz2 mana-9d68ee18a9d1f37cbdf4b984d6db72f7fc59cf51.tar.xz mana-9d68ee18a9d1f37cbdf4b984d6db72f7fc59cf51.zip |
Add a close command to WhisperTab
Diffstat (limited to 'src/gui/widgets/whispertab.cpp')
-rw-r--r-- | src/gui/widgets/whispertab.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gui/widgets/whispertab.cpp b/src/gui/widgets/whispertab.cpp index ba469c00..8af8d427 100644 --- a/src/gui/widgets/whispertab.cpp +++ b/src/gui/widgets/whispertab.cpp @@ -55,6 +55,7 @@ WhisperTab::WhisperTab(const std::string &nick) : WhisperTab::~WhisperTab() { + chatWindow->removeWhisper(mNick); } void WhisperTab::sendChat(std::string &msg) { @@ -76,3 +77,11 @@ void WhisperTab::sendChat(std::string &msg) { chatLog(strprintf(_("%s: %s"), player_node->getName().c_str(), msg.c_str()), BY_PLAYER, false); } + +void WhisperTab::handleCommand(std::string msg) +{ + if (msg == "close") + delete this; + else + ChatTab::handleCommand(msg); +} |