summaryrefslogtreecommitdiff
path: root/src/gui/widgets/whispertab.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-03-27 07:32:02 -0600
committerJared Adams <jaxad0127@gmail.com>2009-03-27 07:32:02 -0600
commit9d68ee18a9d1f37cbdf4b984d6db72f7fc59cf51 (patch)
tree8928f298da71ff16f9177aa7227b9dcc97ae9d01 /src/gui/widgets/whispertab.cpp
parent268e47c0d3791483f3d0066e24c6686c3c938da9 (diff)
downloadMana-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.cpp9
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);
+}