diff options
author | Kevin Smith <git@kismith.co.uk> | 2009-06-26 19:34:11 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2009-06-26 19:34:41 (GMT) |
commit | e2d9f9e47056a41d5e5a67ea3130ccdd860a06ed (patch) | |
tree | 75651c66869903c9a34d013d3553b123768c35a3 /Swift/QtUI | |
parent | 649fc1d12d7be943b5ab964b9dac0670797d9057 (diff) | |
download | swift-contrib-e2d9f9e47056a41d5e5a67ea3130ccdd860a06ed.zip swift-contrib-e2d9f9e47056a41d5e5a67ea3130ccdd860a06ed.tar.bz2 |
Use nicks in tab titles.
Diffstat (limited to 'Swift/QtUI')
-rw-r--r-- | Swift/QtUI/QtChatWindow.cpp | 5 | ||||
-rw-r--r-- | Swift/QtUI/QtChatWindow.h | 1 |
2 files changed, 6 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(); diff --git a/Swift/QtUI/QtChatWindow.h b/Swift/QtUI/QtChatWindow.h index 20a53b9..6e45d34 100644 --- a/Swift/QtUI/QtChatWindow.h +++ b/Swift/QtUI/QtChatWindow.h @@ -29,6 +29,7 @@ namespace Swift { void setSecurityLabelsEnabled(bool enabled); void setSecurityLabelsError(); SecurityLabel getSelectedSecurityLabel(); + void setName(const String& name); protected slots: void qAppFocusChanged(QWidget* old, QWidget* now); |