summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVlad Voicu <vladvoic@gmail.com>2011-05-23 16:05:31 (GMT)
committerVlad Voicu <vladvoic@gmail.com>2011-05-23 20:01:27 (GMT)
commit8a104f454bbb806947caffdd5b46294b8ebd60df (patch)
tree3e35a057eacb0c2e14ee12a718cba68f6b43eca0 /Swift/Controllers/ViewHistoryController.cpp
parent1fe7e5991c8d1601874f47d9d7038eafb568f6f2 (diff)
downloadswift-contrib-8a104f454bbb806947caffdd5b46294b8ebd60df.zip
swift-contrib-8a104f454bbb806947caffdd5b46294b8ebd60df.tar.bz2
fixes after code review
Diffstat (limited to 'Swift/Controllers/ViewHistoryController.cpp')
-rw-r--r--Swift/Controllers/ViewHistoryController.cpp12
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 */
}
}