diff options
author | Catalin Badea <catalin.badea392@gmail.com> | 2012-06-27 17:53:07 (GMT) |
---|---|---|
committer | Catalin Badea <catalin.badea392@gmail.com> | 2012-06-27 17:53:07 (GMT) |
commit | 72819f0c95ad3fe264806d3a072fcbfab3131fcf (patch) | |
tree | 002cdb467597cfbe774b93f49400e3facd9efe43 /Swift/QtUI | |
parent | 0998d6a8f138e0fd00245fc3c1efc8878fa7b888 (diff) | |
download | swift-contrib-72819f0c95ad3fe264806d3a072fcbfab3131fcf.zip swift-contrib-72819f0c95ad3fe264806d3a072fcbfab3131fcf.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_; |