diff options
author | Catalin Badea <catalin.badea392@gmail.com> | 2012-06-27 17:53:07 (GMT) |
---|---|---|
committer | Cătălin Badea <catalin.badea392@gmail.com> | 2012-08-11 15:52:57 (GMT) |
commit | f9b22479a43e95ecee326be3da719397b87fe6eb (patch) | |
tree | 306f03e404da6cbaa39e58e5d1ed83a647effc59 /Swift/QtUI | |
parent | fc40104bf6e6d915561f95015e0b5617d97880e4 (diff) | |
download | swift-contrib-f9b22479a43e95ecee326be3da719397b87fe6eb.zip swift-contrib-f9b22479a43e95ecee326be3da719397b87fe6eb.tar.bz2 |
Display conversations by using roster selection
Diffstat (limited to 'Swift/QtUI')
-rw-r--r-- | Swift/QtUI/QtHistoryWindow.cpp | 7 | ||||
-rw-r--r-- | Swift/QtUI/QtHistoryWindow.h | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/Swift/QtUI/QtHistoryWindow.cpp b/Swift/QtUI/QtHistoryWindow.cpp index d067190..b3df29f 100644 --- a/Swift/QtUI/QtHistoryWindow.cpp +++ b/Swift/QtUI/QtHistoryWindow.cpp @@ -42,6 +42,8 @@ QtHistoryWindow::QtHistoryWindow(SettingsProvider* settings, UIEventStream* even ui_.bottomLeftLayout_->addWidget(conversationRoster_); setWindowTitle(tr("History")); + + conversationRoster_->onSomethingSelectedChanged.connect(boost::bind(&QtHistoryWindow::handleSomethingSelectedChanged, this, _1)); } QtHistoryWindow::~QtHistoryWindow() { @@ -72,4 +74,9 @@ void QtHistoryWindow::addMessage(const HistoryMessage& message) { conversation_->addMessage(snippet); } +void QtHistoryWindow::handleSomethingSelectedChanged(RosterItem* item) { + conversation_->resetView(); + onSelectedContactChanged(item); +} + } diff --git a/Swift/QtUI/QtHistoryWindow.h b/Swift/QtUI/QtHistoryWindow.h index d522f53..1f0cdb7 100644 --- a/Swift/QtUI/QtHistoryWindow.h +++ b/Swift/QtUI/QtHistoryWindow.h @@ -31,6 +31,8 @@ namespace Swift { virtual void closeEvent(QCloseEvent* event); virtual void showEvent(QShowEvent* event); + void handleSomethingSelectedChanged(RosterItem* item); + Ui::QtHistoryWindow ui_; QtChatTheme* theme_; QtChatView* conversation_; |