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 | |
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')
-rw-r--r-- | Swift/Controllers/HistoryController.cpp | 16 | ||||
-rw-r--r-- | Swift/Controllers/HistoryController.h | 9 | ||||
-rw-r--r-- | Swift/Controllers/MainController.cpp | 2 | ||||
-rw-r--r-- | Swift/Controllers/UIEvents/RequestHistoryUIEvent.h | 6 | ||||
-rw-r--r-- | Swift/Controllers/UIInterfaces/HistoryWindow.h | 5 | ||||
-rw-r--r-- | Swift/Controllers/UIInterfaces/HistoryWindowFactory.h | 6 |
6 files changed, 22 insertions, 22 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(); } } diff --git a/Swift/Controllers/HistoryController.h b/Swift/Controllers/HistoryController.h index 465b037..47ae361 100644 --- a/Swift/Controllers/HistoryController.h +++ b/Swift/Controllers/HistoryController.h @@ -1,16 +1,16 @@ /* * 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. */ #pragma once -#include "Swiften/Base/boost_bsignals.h" +#include <Swiften/Base/boost_bsignals.h> #include <boost/bind.hpp> #include <boost/shared_ptr.hpp> -#include "Swift/Controllers/UIEvents/UIEventStream.h" +#include <Swift/Controllers/UIEvents/UIEventStream.h> namespace Swift { class HistoryWindowFactory; @@ -25,6 +25,7 @@ namespace Swift { void handleUIEvent(boost::shared_ptr<UIEvent> event); private: + UIEventStream* uiEventStream_; HistoryWindowFactory* historyWindowFactory_; HistoryWindow* historyWindow_; }; diff --git a/Swift/Controllers/MainController.cpp b/Swift/Controllers/MainController.cpp index c92a9c6..af9f525 100644 --- a/Swift/Controllers/MainController.cpp +++ b/Swift/Controllers/MainController.cpp @@ -37,7 +37,7 @@ #include "Swift/Controllers/SystemTray.h" #include "Swift/Controllers/SystemTrayController.h" #include "Swift/Controllers/XMLConsoleController.h" -#include "Swift/Controllers/HistoryController.h" +#include <Swift/Controllers/HistoryController.h> #include "Swift/Controllers/FileTransferListController.h" #include "Swift/Controllers/UIEvents/UIEventStream.h" #include "Swift/Controllers/PresenceNotifier.h" diff --git a/Swift/Controllers/UIEvents/RequestHistoryUIEvent.h b/Swift/Controllers/UIEvents/RequestHistoryUIEvent.h index 8562beb..025e91f 100644 --- a/Swift/Controllers/UIEvents/RequestHistoryUIEvent.h +++ b/Swift/Controllers/UIEvents/RequestHistoryUIEvent.h @@ -1,12 +1,12 @@ /* * 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. */ #pragma once -#include "Swift/Controllers/UIEvents/UIEvent.h" +#include <Swift/Controllers/UIEvents/UIEvent.h> namespace Swift { class RequestHistoryUIEvent : public UIEvent { diff --git a/Swift/Controllers/UIInterfaces/HistoryWindow.h b/Swift/Controllers/UIInterfaces/HistoryWindow.h index 379d4b1..cb29120 100644 --- a/Swift/Controllers/UIInterfaces/HistoryWindow.h +++ b/Swift/Controllers/UIInterfaces/HistoryWindow.h @@ -1,7 +1,7 @@ /* * 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. */ #pragma once @@ -11,7 +11,6 @@ namespace Swift { public: virtual ~HistoryWindow() {}; - virtual void show() = 0; virtual void activate() = 0; }; } diff --git a/Swift/Controllers/UIInterfaces/HistoryWindowFactory.h b/Swift/Controllers/UIInterfaces/HistoryWindowFactory.h index c84d8d7..135438b 100644 --- a/Swift/Controllers/UIInterfaces/HistoryWindowFactory.h +++ b/Swift/Controllers/UIInterfaces/HistoryWindowFactory.h @@ -1,12 +1,12 @@ /* * 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. */ #pragma once -#include "Swift/Controllers/UIInterfaces/HistoryWindow.h" +#include <Swift/Controllers/UIInterfaces/HistoryWindow.h> namespace Swift { class UIEventStream; |