summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCatalin Badea <catalin.badea392@gmail.com>2012-06-27 17:53:07 (GMT)
committerCatalin Badea <catalin.badea392@gmail.com>2012-06-27 17:53:07 (GMT)
commit72819f0c95ad3fe264806d3a072fcbfab3131fcf (patch)
tree002cdb467597cfbe774b93f49400e3facd9efe43 /Swift/QtUI
parent0998d6a8f138e0fd00245fc3c1efc8878fa7b888 (diff)
downloadswift-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.cpp7
-rw-r--r--Swift/QtUI/QtHistoryWindow.h2
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_;