summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2009-06-26 19:34:11 (GMT)
committerKevin Smith <git@kismith.co.uk>2009-06-26 19:34:41 (GMT)
commite2d9f9e47056a41d5e5a67ea3130ccdd860a06ed (patch)
tree75651c66869903c9a34d013d3553b123768c35a3 /Swift/QtUI/QtChatWindow.cpp
parent649fc1d12d7be943b5ab964b9dac0670797d9057 (diff)
downloadswift-contrib-e2d9f9e47056a41d5e5a67ea3130ccdd860a06ed.zip
swift-contrib-e2d9f9e47056a41d5e5a67ea3130ccdd860a06ed.tar.bz2
Use nicks in tab titles.
Diffstat (limited to 'Swift/QtUI/QtChatWindow.cpp')
-rw-r--r--Swift/QtUI/QtChatWindow.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Swift/QtUI/QtChatWindow.cpp b/Swift/QtUI/QtChatWindow.cpp
index 8e916c3..f4e0b0b 100644
--- a/Swift/QtUI/QtChatWindow.cpp
+++ b/Swift/QtUI/QtChatWindow.cpp
@@ -121,6 +121,11 @@ void QtChatWindow::setUnreadMessageCount(int count) {
updateTitleWithUnreadCount();
}
+void QtChatWindow::setName(const String& name) {
+ contact_ = P2QSTRING(name);
+ updateTitleWithUnreadCount();
+}
+
void QtChatWindow::updateTitleWithUnreadCount() {
setWindowTitle(unreadCount_ > 0 ? QString("(%1) %2)").arg(unreadCount_).arg(contact_) : contact_);
emit titleUpdated();