diff options
author | Kevin Smith <git@kismith.co.uk> | 2013-03-24 10:03:46 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2013-03-24 10:03:46 (GMT) |
commit | 99063cc6e9168bf88d6c245d1f8bac02bd898c3d (patch) | |
tree | 9ee941b9c02b34a12f1cecf0a30b74eac7c9ccfb /Swift/QtUI/QtChatTabs.cpp | |
parent | b04ff6d3f9c4496d5667e4681e6820e708ba409a (diff) | |
download | swift-99063cc6e9168bf88d6c245d1f8bac02bd898c3d.zip swift-99063cc6e9168bf88d6c245d1f8bac02bd898c3d.tar.bz2 |
Don't hide the tabset if in single window mode
Change-Id: I91272f94258a49c9626cf3130bfbf2838a434e9b
Diffstat (limited to 'Swift/QtUI/QtChatTabs.cpp')
-rw-r--r-- | Swift/QtUI/QtChatTabs.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Swift/QtUI/QtChatTabs.cpp b/Swift/QtUI/QtChatTabs.cpp index 6d12d80..a119043 100644 --- a/Swift/QtUI/QtChatTabs.cpp +++ b/Swift/QtUI/QtChatTabs.cpp @@ -22,7 +22,7 @@ #include <qdebug.h> namespace Swift { -QtChatTabs::QtChatTabs() : QWidget() { +QtChatTabs::QtChatTabs(bool singleWindow) : QWidget(), singleWindow_(singleWindow) { #ifndef Q_OS_MAC setWindowIcon(QIcon(":/logo-chat-16.png")); #else @@ -46,7 +46,6 @@ QtChatTabs::QtChatTabs() : QWidget() { layout->setContentsMargins(0, 3, 0, 0); layout->addWidget(tabs_); setLayout(layout); - //resize(400, 300); } void QtChatTabs::closeEvent(QCloseEvent* event) { @@ -114,7 +113,13 @@ void QtChatTabs::handleTabClosing() { if (widget && ((index = tabs_->indexOf(widget)) >= 0)) { tabs_->removeTab(index); if (tabs_->count() == 0) { - hide(); + if (!singleWindow_) { + hide(); + } + else { + setWindowTitle(""); + onTitleChanged(""); + } } else { handleTabTitleUpdated(tabs_->currentWidget()); |