summaryrefslogtreecommitdiff
path: root/src/gui/widgets/chattab.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/chattab.cpp')
-rw-r--r--src/gui/widgets/chattab.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gui/widgets/chattab.cpp b/src/gui/widgets/chattab.cpp
index ff856361..120d4e21 100644
--- a/src/gui/widgets/chattab.cpp
+++ b/src/gui/widgets/chattab.cpp
@@ -62,15 +62,23 @@ ChatTab::ChatTab(const std::string &name) : Tab()
gcn::ScrollArea::SHOW_ALWAYS);
mScrollArea->setScrollAmount(0, 1);
mScrollArea->setOpaque(false);
+
+ chatWindow->addTab(this);
}
ChatTab::~ChatTab()
{
+ chatWindow->removeTab(this);
delete mTextOutput;
delete mScrollArea;
}
-void ChatTab::chatLog(std::string line, int own, bool ignoreRecord)
+void ChatTab::chatLog(const char* line, int own, bool ignoreRecord)
+{
+ chatLog(std::string(line), own, ignoreRecord);
+}
+
+void ChatTab::chatLog(std::string line, int own, bool ignoreRecord)
{
// Trim whitespace
trim(line);