/* * Copyright (c) 2011 Vlad Voicu * Licensed under the Simplified BSD license. * See Documentation/Licenses/BSD-simplified.txt for more information. */ #include #include #include #include #include #include namespace Swift { ViewHistoryController::ViewHistoryController(ViewHistoryWindowFactory* viewHistoryWindowFactory, UIEventStream* uiEventStream): rosterController(rosterController), viewHistoryWindowFactory(viewHistoryWindowFactory), uiEventStream(uiEventStream), viewHistoryWindow(NULL) { uiEventStream->onUIEvent.connect(boost::bind(&ViewHistoryController::handleUIEvent, this, _1)); } ViewHistoryController::~ViewHistoryController() { } void ViewHistoryController::handleUIEvent(UIEvent::ref event) { RequestViewHistoryUIEvent::ref viewHistoryEvent = boost::dynamic_pointer_cast(event); if (viewHistoryEvent) { viewHistoryWindow = viewHistoryWindowFactory->createViewHistoryWindow(); } } void ViewHistoryController::setAvailable(bool enabled) { /* This will disable some function when the time comes */ enabled = false; /* only to avoid warnings for now */ } }