diff options
author | Kevin Smith <git@kismith.co.uk> | 2010-06-25 18:36:42 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2010-06-25 18:36:42 (GMT) |
commit | 5518a05a200d6531b5ee1d1409a1d451bc3b0749 (patch) | |
tree | d40e77f5ed163ff19ec7a9b2292ec74a8ad5b455 /Swift/QtUI/QtChatWindow.cpp | |
parent | 9695b3f8343a04e71fea697fc8c280cdafe85465 (diff) | |
download | swift-contrib-5518a05a200d6531b5ee1d1409a1d451bc3b0749.zip swift-contrib-5518a05a200d6531b5ee1d1409a1d451bc3b0749.tar.bz2 |
Command-line option to not use tabs.
Resolves: #476
Diffstat (limited to 'Swift/QtUI/QtChatWindow.cpp')
-rw-r--r-- | Swift/QtUI/QtChatWindow.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/Swift/QtUI/QtChatWindow.cpp b/Swift/QtUI/QtChatWindow.cpp index fcc1308..8fed3c6 100644 --- a/Swift/QtUI/QtChatWindow.cpp +++ b/Swift/QtUI/QtChatWindow.cpp @@ -222,7 +222,11 @@ void QtChatWindow::setName(const String& name) { } void QtChatWindow::updateTitleWithUnreadCount() { - setWindowTitle(contact_); + if (isWindow()) { + setWindowTitle(unreadCount_ > 0 ? QString("(%1) %2").arg(unreadCount_).arg(contact_) : contact_); + } else { + setWindowTitle(contact_); + } emit titleUpdated(); } @@ -318,7 +322,18 @@ void QtChatWindow::show() { } void QtChatWindow::activate() { + if (isWindow()) { + QWidget::show(); + } emit wantsToActivate(); } +void QtChatWindow::resizeEvent(QResizeEvent*) { + emit geometryChanged(); +} + +void QtChatWindow::moveEvent(QMoveEvent*) { + emit geometryChanged(); +} + } |