summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2015-06-17 20:40:41 (GMT)
committerTobias Markmann <tm@ayena.de>2015-07-10 14:56:43 (GMT)
commitb54aa689ffc6bec7987c193e28c641d2f0f73236 (patch)
treead9984fc3f9633e21fe0ff5ef8728f6d420ca07f /Swift/Controllers/MainController.cpp
parent7af21fdd59af3b3112cff69996301605859af84c (diff)
downloadswift-b54aa689ffc6bec7987c193e28c641d2f0f73236.zip
swift-b54aa689ffc6bec7987c193e28c641d2f0f73236.tar.bz2
Implement logic behind 'Clear all' button
The 'Clear all' button in the file transfer overview window was only present in the UI, without any logic behind. That's fixed now. Test-Information: Send a file in between two Swift instances. Verified that the button is enabled/disabled at appropriate times and works as expected if pressed. Change-Id: Ib92621cba479683ade8d815ce5ace9768449a499
Diffstat (limited to 'Swift/Controllers/MainController.cpp')
-rw-r--r--Swift/Controllers/MainController.cpp107
1 files changed, 54 insertions, 53 deletions
diff --git a/Swift/Controllers/MainController.cpp b/Swift/Controllers/MainController.cpp
index a65a18a..cdaa207 100644
--- a/Swift/Controllers/MainController.cpp
+++ b/Swift/Controllers/MainController.cpp
@@ -11,88 +11,88 @@
11#include <boost/bind.hpp> 11#include <boost/bind.hpp>
12#include <boost/lexical_cast.hpp> 12#include <boost/lexical_cast.hpp>
13#include <boost/shared_ptr.hpp> 13#include <boost/shared_ptr.hpp>
14#include <boost/smart_ptr/make_shared.hpp> 14#include <boost/smart_ptr/make_shared.hpp>
15 15
16#include <Swiften/Base/format.h>
17#include <Swiften/Base/Algorithm.h> 16#include <Swiften/Base/Algorithm.h>
18#include <Swiften/Base/String.h> 17#include <Swiften/Base/String.h>
19#include <Swiften/StringCodecs/Base64.h>
20#include <Swiften/Network/TimerFactory.h>
21#include <Swiften/Client/Storages.h>
22#include <Swiften/VCards/VCardManager.h>
23#include <Swiften/Client/NickResolver.h>
24#include <Swiften/Base/foreach.h> 18#include <Swiften/Base/foreach.h>
19#include <Swiften/Base/format.h>
25#include <Swiften/Client/Client.h> 20#include <Swiften/Client/Client.h>
26#include <Swiften/Presence/PresenceSender.h> 21#include <Swiften/Client/ClientBlockListManager.h>
22#include <Swiften/Client/ClientXMLTracer.h>
23#include <Swiften/Client/NickResolver.h>
24#include <Swiften/Client/StanzaChannel.h>
25#include <Swiften/Client/Storages.h>
26#include <Swiften/Crypto/CryptoProvider.h>
27#include <Swiften/Disco/CapsInfoGenerator.h>
28#include <Swiften/Disco/ClientDiscoManager.h>
29#include <Swiften/Disco/GetDiscoInfoRequest.h>
27#include <Swiften/Elements/ChatState.h> 30#include <Swiften/Elements/ChatState.h>
31#include <Swiften/Elements/DiscoInfo.h>
28#include <Swiften/Elements/Presence.h> 32#include <Swiften/Elements/Presence.h>
29#include <Swiften/Elements/VCardUpdate.h> 33#include <Swiften/Elements/VCardUpdate.h>
30#include <Swiften/Elements/DiscoInfo.h>
31#include <Swiften/Disco/CapsInfoGenerator.h>
32#include <Swiften/Disco/GetDiscoInfoRequest.h>
33#include <Swiften/Disco/ClientDiscoManager.h>
34#include <Swiften/VCards/GetVCardRequest.h>
35#include <Swiften/StringCodecs/Hexify.h>
36#include <Swiften/Network/NetworkFactories.h>
37#include <Swiften/FileTransfer/FileTransferManager.h> 34#include <Swiften/FileTransfer/FileTransferManager.h>
38#include <Swiften/Client/ClientXMLTracer.h> 35#include <Swiften/Network/NetworkFactories.h>
39#include <Swiften/Client/StanzaChannel.h> 36#include <Swiften/Network/TimerFactory.h>
40#include <Swiften/Client/ClientBlockListManager.h> 37#include <Swiften/Presence/PresenceSender.h>
41#include <Swiften/Crypto/CryptoProvider.h> 38#include <Swiften/StringCodecs/Base64.h>
39#include <Swiften/StringCodecs/Hexify.h>
40#include <Swiften/VCards/GetVCardRequest.h>
41#include <Swiften/VCards/VCardManager.h>
42 42
43#ifdef SWIFTEN_PLATFORM_WIN32 43#ifdef SWIFTEN_PLATFORM_WIN32
44#include <Swiften/SASL/WindowsAuthentication.h> 44#include <Swiften/SASL/WindowsAuthentication.h>
45#endif 45#endif
46 46
47#include <SwifTools/Dock/Dock.h> 47#include <Swift/Controllers/AdHocManager.h>
48#include <SwifTools/Notifier/TogglableNotifier.h> 48#include <Swift/Controllers/BlockListController.h>
49#include <SwifTools/Idle/IdleDetector.h>
50
51#include <Swift/Controllers/Intl.h>
52#include <Swift/Controllers/UIInterfaces/UIFactory.h>
53#include <Swift/Controllers/BuildVersion.h> 49#include <Swift/Controllers/BuildVersion.h>
54#include <Swift/Controllers/Chat/UserSearchController.h>
55#include <Swift/Controllers/Chat/ChatsManager.h> 50#include <Swift/Controllers/Chat/ChatsManager.h>
56#include <Swift/Controllers/XMPPEvents/EventController.h>
57#include <Swift/Controllers/EventWindowController.h>
58#include <Swift/Controllers/UIInterfaces/LoginWindow.h>
59#include <Swift/Controllers/UIInterfaces/LoginWindowFactory.h>
60#include <Swift/Controllers/UIInterfaces/MainWindow.h>
61#include <Swift/Controllers/Chat/MUCController.h> 51#include <Swift/Controllers/Chat/MUCController.h>
52#include <Swift/Controllers/Chat/UserSearchController.h>
53#include <Swift/Controllers/ContactEditController.h>
54#include <Swift/Controllers/ContactSuggester.h>
55#include <Swift/Controllers/ContactsFromXMPPRoster.h>
56#include <Swift/Controllers/EventNotifier.h>
57#include <Swift/Controllers/EventWindowController.h>
58#include <Swift/Controllers/FileTransfer/FileTransferOverview.h>
59#include <Swift/Controllers/FileTransferListController.h>
60#include <Swift/Controllers/HighlightEditorController.h>
61#include <Swift/Controllers/HighlightManager.h>
62#include <Swift/Controllers/HistoryController.h>
63#include <Swift/Controllers/HistoryViewController.h>
64#include <Swift/Controllers/Intl.h>
65#include <Swift/Controllers/PresenceNotifier.h>
66#include <Swift/Controllers/ProfileController.h>
62#include <Swift/Controllers/Roster/RosterController.h> 67#include <Swift/Controllers/Roster/RosterController.h>
68#include <Swift/Controllers/SettingConstants.h>
69#include <Swift/Controllers/Settings/SettingsProvider.h>
70#include <Swift/Controllers/ShowProfileController.h>
63#include <Swift/Controllers/SoundEventController.h> 71#include <Swift/Controllers/SoundEventController.h>
64#include <Swift/Controllers/SoundPlayer.h> 72#include <Swift/Controllers/SoundPlayer.h>
65#include <Swift/Controllers/StatusTracker.h> 73#include <Swift/Controllers/StatusTracker.h>
74#include <Swift/Controllers/Storages/CertificateStorageFactory.h>
75#include <Swift/Controllers/Storages/CertificateStorageTrustChecker.h>
76#include <Swift/Controllers/Storages/StoragesFactory.h>
66#include <Swift/Controllers/SystemTray.h> 77#include <Swift/Controllers/SystemTray.h>
67#include <Swift/Controllers/SystemTrayController.h> 78#include <Swift/Controllers/SystemTrayController.h>
68#include <Swift/Controllers/XMLConsoleController.h> 79#include <Swift/Controllers/UIEvents/JoinMUCUIEvent.h>
69#include <Swift/Controllers/HistoryController.h> 80#include <Swift/Controllers/UIEvents/RequestChatUIEvent.h>
70#include <Swift/Controllers/HistoryViewController.h>
71#include <Swift/Controllers/FileTransferListController.h>
72#include <Swift/Controllers/UIEvents/UIEventStream.h> 81#include <Swift/Controllers/UIEvents/UIEventStream.h>
73#include <Swift/Controllers/PresenceNotifier.h> 82#include <Swift/Controllers/UIInterfaces/LoginWindow.h>
74#include <Swift/Controllers/EventNotifier.h> 83#include <Swift/Controllers/UIInterfaces/LoginWindowFactory.h>
75#include <Swift/Controllers/Storages/StoragesFactory.h> 84#include <Swift/Controllers/UIInterfaces/MainWindow.h>
85#include <Swift/Controllers/UIInterfaces/UIFactory.h>
76#include <Swift/Controllers/WhiteboardManager.h> 86#include <Swift/Controllers/WhiteboardManager.h>
77#include <Swift/Controllers/Settings/SettingsProvider.h> 87#include <Swift/Controllers/XMLConsoleController.h>
78#include <Swift/Controllers/UIEvents/RequestChatUIEvent.h> 88#include <Swift/Controllers/XMPPEvents/EventController.h>
79#include <Swift/Controllers/UIEvents/JoinMUCUIEvent.h>
80#include <Swift/Controllers/Storages/CertificateStorageFactory.h>
81#include <Swift/Controllers/Storages/CertificateStorageTrustChecker.h>
82#include <Swift/Controllers/ProfileController.h>
83#include <Swift/Controllers/ShowProfileController.h>
84#include <Swift/Controllers/ContactEditController.h>
85#include <Swift/Controllers/XMPPURIController.h> 89#include <Swift/Controllers/XMPPURIController.h>
86#include <Swift/Controllers/AdHocManager.h> 90
87#include <Swift/Controllers/FileTransfer/FileTransferOverview.h> 91#include <SwifTools/Dock/Dock.h>
88#include <Swift/Controllers/SettingConstants.h> 92#include <SwifTools/Idle/IdleDetector.h>
89#include <Swift/Controllers/HighlightManager.h> 93#include <SwifTools/Notifier/TogglableNotifier.h>
90#include <Swift/Controllers/HighlightEditorController.h>
91#include <Swift/Controllers/BlockListController.h>
92#include <Swift/Controllers/ContactSuggester.h>
93#include <Swift/Controllers/ContactsFromXMPPRoster.h>
94 94
95namespace Swift { 95namespace Swift {
96 96
97static const std::string CLIENT_NAME = "Swift"; 97static const std::string CLIENT_NAME = "Swift";
98static const std::string CLIENT_NODE = "http://swift.im"; 98static const std::string CLIENT_NODE = "http://swift.im";
@@ -268,10 +268,11 @@ void MainController::resetClient() {
268 delete historyViewController_; 268 delete historyViewController_;
269 historyViewController_ = NULL; 269 historyViewController_ = NULL;
270 delete historyController_; 270 delete historyController_;
271 historyController_ = NULL; 271 historyController_ = NULL;
272#endif 272#endif
273 fileTransferListController_->setFileTransferOverview(NULL);
273 delete ftOverview_; 274 delete ftOverview_;
274 ftOverview_ = NULL; 275 ftOverview_ = NULL;
275 delete blockListController_; 276 delete blockListController_;
276 blockListController_ = NULL; 277 blockListController_ = NULL;
277 delete rosterController_; 278 delete rosterController_;