summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-06-25 18:36:42 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-06-25 18:36:42 (GMT)
commit5518a05a200d6531b5ee1d1409a1d451bc3b0749 (patch)
treed40e77f5ed163ff19ec7a9b2292ec74a8ad5b455 /Swift/QtUI/QtChatWindow.cpp
parent9695b3f8343a04e71fea697fc8c280cdafe85465 (diff)
downloadswift-5518a05a200d6531b5ee1d1409a1d451bc3b0749.zip
swift-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.cpp17
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();
+}
+
}