summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/Controllers/HistoryController.cpp')
-rw-r--r--Swift/Controllers/HistoryController.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/Swift/Controllers/HistoryController.cpp b/Swift/Controllers/HistoryController.cpp
index 4f97006..6d8e68e 100644
--- a/Swift/Controllers/HistoryController.cpp
+++ b/Swift/Controllers/HistoryController.cpp
@@ -18,13 +18,24 @@ HistoryController::HistoryController(UIEventStream* uiEventStream, HistoryWindow
HistoryController::~HistoryController() {
uiEventStream_->onUIEvent.disconnect(boost::bind(&HistoryController::handleUIEvent, this, _1));
delete historyWindow_;
+ delete roster_;
}
void HistoryController::handleUIEvent(boost::shared_ptr<UIEvent> rawEvent) {
boost::shared_ptr<RequestHistoryUIEvent> event = boost::dynamic_pointer_cast<RequestHistoryUIEvent>(rawEvent);
if (event != NULL) {
if (historyWindow_ == NULL) {
- historyWindow_ = historyWindowFactory_->createHistoryWindow();
+ historyWindow_ = historyWindowFactory_->createHistoryWindow(uiEventStream_);
+ roster_ = new Roster(false, true);
+ historyWindow_->setRosterModel(roster_);
+
+ JID putin("vputin@karla.com");
+ JID medvedev("dmedvedev@karla.com");
+ JID kev("kevin@doomsong.co.uk");
+ const std::set<ContactRosterItem::Feature> none;
+ roster_->addContact(putin, putin, "Vladimir Putin", "Recent", "");
+ roster_->addContact(medvedev, medvedev, "Dmitri Medvedev", "Recent", "");
+ roster_->addContact(kev, kev, "Kev", "Recent", "");
}
historyWindow_->activate();
}