diff options
author | Catalin Badea <catalin.badea392@gmail.com> | 2012-06-19 20:16:09 (GMT) |
---|---|---|
committer | Cătălin Badea <catalin.badea392@gmail.com> | 2012-08-11 15:45:28 (GMT) |
commit | 743388feda5091bd6e54d88f66d2866a59205f35 (patch) | |
tree | 7401883292df4b74b7202685ceeca20bcfde487e /Swift/Controllers/HistoryController.cpp | |
parent | f1727e2400ce057833859a4d2b443862edd0a8c4 (diff) | |
download | swift-contrib-743388feda5091bd6e54d88f66d2866a59205f35.zip swift-contrib-743388feda5091bd6e54d88f66d2866a59205f35.tar.bz2 |
Added contact roster
Diffstat (limited to 'Swift/Controllers/HistoryController.cpp')
-rw-r--r-- | Swift/Controllers/HistoryController.cpp | 13 |
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(); } |