summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
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 */
}
}