diff options
author | Vlad Voicu <vladvoic@gmail.com> | 2011-05-23 16:05:31 (GMT) |
---|---|---|
committer | Vlad Voicu <vladvoic@gmail.com> | 2011-05-31 18:34:02 (GMT) |
commit | 494fbd58cfde0ed3cfe0304ce40ceb363378caf2 (patch) | |
tree | 3e35a057eacb0c2e14ee12a718cba68f6b43eca0 /Swift/Controllers/ViewHistoryController.cpp | |
parent | 09131c6d9b3d4253002204b41e731aa8af12fcd3 (diff) | |
download | swift-contrib-494fbd58cfde0ed3cfe0304ce40ceb363378caf2.zip swift-contrib-494fbd58cfde0ed3cfe0304ce40ceb363378caf2.tar.bz2 |
fixes after code review
Diffstat (limited to 'Swift/Controllers/ViewHistoryController.cpp')
-rw-r--r-- | Swift/Controllers/ViewHistoryController.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/Swift/Controllers/ViewHistoryController.cpp b/Swift/Controllers/ViewHistoryController.cpp index 0aaacdf..19b4abb 100644 --- a/Swift/Controllers/ViewHistoryController.cpp +++ b/Swift/Controllers/ViewHistoryController.cpp @@ -12,11 +12,10 @@ #include <Swift/Controllers/UIEvents/RequestViewHistoryUIEvent.h> #include <Swift/Controllers/UIEvents/UIEventStream.h> #include <Swift/Controllers/UIInterfaces/ViewHistoryWindowFactory.h> -#include <Swift/Controllers/Roster/RosterController.h> namespace Swift { -ViewHistoryController::ViewHistoryController(RosterController* rosterController, ViewHistoryWindowFactory* viewHistoryWindowFactory, UIEventStream* uiEventStream): rosterController(rosterController), viewHistoryWindowFactory(viewHistoryWindowFactory), uiEventStream(uiEventStream), viewHistoryWindow(NULL) { +ViewHistoryController::ViewHistoryController(ViewHistoryWindowFactory* viewHistoryWindowFactory, UIEventStream* uiEventStream): rosterController(rosterController), viewHistoryWindowFactory(viewHistoryWindowFactory), uiEventStream(uiEventStream), viewHistoryWindow(NULL) { uiEventStream->onUIEvent.connect(boost::bind(&ViewHistoryController::handleUIEvent, this, _1)); } @@ -26,15 +25,14 @@ ViewHistoryController::~ViewHistoryController() { void ViewHistoryController::handleUIEvent(UIEvent::ref event) { RequestViewHistoryUIEvent::ref viewHistoryEvent = boost::dynamic_pointer_cast<RequestViewHistoryUIEvent>(event); - if (!viewHistoryWindow) { + if (viewHistoryEvent) { viewHistoryWindow = viewHistoryWindowFactory->createViewHistoryWindow(); } } -void ViewHistoryController::setAvailable(bool b) { - if (viewHistoryWindow) { - viewHistoryWindow->setEnabled(b); - } +void ViewHistoryController::setAvailable(bool enabled) { + /* This will disable some function when the time comes */ + enabled = false; /* only to avoid warnings for now */ } } |