summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCatalin Badea <catalin.badea392@gmail.com>2012-06-26 07:56:42 (GMT)
committerCătălin Badea <catalin.badea392@gmail.com>2012-08-11 15:52:56 (GMT)
commit39dfd6c2068e3d6850f607fd400031203b846e57 (patch)
tree8273a805b3271020c490b11419a81d336aa963af /Swift/Controllers/HistoryController.cpp
parent743388feda5091bd6e54d88f66d2866a59205f35 (diff)
downloadswift-contrib-39dfd6c2068e3d6850f607fd400031203b846e57.zip
swift-contrib-39dfd6c2068e3d6850f607fd400031203b846e57.tar.bz2
Use seperate controllers for viewing/handling history
Diffstat (limited to 'Swift/Controllers/HistoryController.cpp')
-rw-r--r--Swift/Controllers/HistoryController.cpp31
1 files changed, 0 insertions, 31 deletions
diff --git a/Swift/Controllers/HistoryController.cpp b/Swift/Controllers/HistoryController.cpp
index 6d8e68e..f04fceb 100644
--- a/Swift/Controllers/HistoryController.cpp
+++ b/Swift/Controllers/HistoryController.cpp
@@ -10,35 +10,4 @@
#include <Swift/Controllers/UIEvents/RequestHistoryUIEvent.h>
namespace Swift {
-
-HistoryController::HistoryController(UIEventStream* uiEventStream, HistoryWindowFactory* historyWindowFactory) : uiEventStream_(uiEventStream), historyWindowFactory_(historyWindowFactory), historyWindow_(NULL) {
- uiEventStream_->onUIEvent.connect(boost::bind(&HistoryController::handleUIEvent, this, _1));
-}
-
-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(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();
- }
-}
-
}