summaryrefslogtreecommitdiff
path: root/src/gui/chat.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/chat.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/chat.cpp')
-rw-r--r--src/gui/chat.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp
index 7861bdb6..b0b15dbc 100644
--- a/src/gui/chat.cpp
+++ b/src/gui/chat.cpp
@@ -232,7 +232,10 @@ bool ChatWindow::isInputFocused()
void ChatWindow::removeTab(ChatTab *tab)
{
// Prevent removal of the local chat tab
- if (tab != localChatTab) mChatTabs->removeTab(tab);
+ if (tab == localChatTab)
+ return;
+
+ mChatTabs->removeTab(tab);
}
void ChatWindow::addTab(ChatTab *tab)
@@ -250,6 +253,11 @@ void ChatWindow::addTab(ChatTab *tab)
logic();
}
+void ChatWindow::removeWhisper(std::string nick)
+{
+ mWhispers.erase(nick);
+}
+
void ChatWindow::chatSend(std::string &msg)
{
ChatTab *tab = getFocused();