diff options
author | Catalin Badea <catalin.badea392@gmail.com> | 2012-06-04 12:00:47 (GMT) |
---|---|---|
committer | Cătălin Badea <catalin.badea392@gmail.com> | 2012-08-11 15:45:27 (GMT) |
commit | ab658eccab4955e338db8f42accd847fd6a9c106 (patch) | |
tree | b9f796c517c6187925aeaf1b20901ee4f9ed401f /Swift/Controllers/HistoryController.cpp | |
parent | c09901d69a0b606d8f16a3496c0c4f24c3c7aa1b (diff) | |
download | swift-contrib-ab658eccab4955e338db8f42accd847fd6a9c106.zip swift-contrib-ab658eccab4955e338db8f42accd847fd6a9c106.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(); } } |