diff options
author | Catalin Badea <catalin.badea392@gmail.com> | 2012-06-04 12:00:47 (GMT) |
---|---|---|
committer | Catalin Badea <catalin.badea392@gmail.com> | 2012-06-19 20:21:54 (GMT) |
commit | 8e90fc4fb400b925dfb7897b47ecb1ffd0d13538 (patch) | |
tree | a6814b14391badfc5b85d8645a112e64bc731968 /Swift/Controllers/HistoryController.cpp | |
parent | 250ba9152e6b09e1654e18040cffa0d1c31434ec (diff) | |
download | swift-contrib-8e90fc4fb400b925dfb7897b47ecb1ffd0d13538.zip swift-contrib-8e90fc4fb400b925dfb7897b47ecb1ffd0d13538.tar.bz2 |
Disconnect history controller from the event stream. Fixed coding style
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(); } } |