diff options
Diffstat (limited to 'Swift/Controllers/HistoryController.cpp')
-rw-r--r-- | Swift/Controllers/HistoryController.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Swift/Controllers/HistoryController.cpp b/Swift/Controllers/HistoryController.cpp index 2aa1b6e..4f97006 100644 --- a/Swift/Controllers/HistoryController.cpp +++ b/Swift/Controllers/HistoryController.cpp @@ -1,21 +1,22 @@ /* * Copyright (c) 2012 Catalin Badea - * Licensed under the GNU General Public License v3. - * See Documentation/Licenses/GPLv3.txt for more information. + * Licensed under the simplified BSD license. + * See Documentation/Licenses/BSD-simplified.txt for more information. */ -#include "Swift/Controllers/HistoryController.h" +#include <Swift/Controllers/HistoryController.h> -#include "Swift/Controllers/UIInterfaces/HistoryWindowFactory.h" -#include "Swift/Controllers/UIEvents/RequestHistoryUIEvent.h" +#include <Swift/Controllers/UIInterfaces/HistoryWindowFactory.h> +#include <Swift/Controllers/UIEvents/RequestHistoryUIEvent.h> namespace Swift { -HistoryController::HistoryController(UIEventStream* uiEventStream, HistoryWindowFactory* historyWindowFactory) : historyWindowFactory_(historyWindowFactory), historyWindow_(NULL) { - uiEventStream->onUIEvent.connect(boost::bind(&HistoryController::handleUIEvent, this, _1)); +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_; } @@ -25,7 +26,6 @@ void HistoryController::handleUIEvent(boost::shared_ptr<UIEvent> rawEvent) { if (historyWindow_ == NULL) { historyWindow_ = historyWindowFactory_->createHistoryWindow(); } - historyWindow_->show(); historyWindow_->activate(); } } |