diff options
| author | Tobias Markmann <tm@ayena.de> | 2015-06-17 20:40:41 (GMT) |
|---|---|---|
| committer | Tobias Markmann <tm@ayena.de> | 2015-07-10 14:56:43 (GMT) |
| commit | b54aa689ffc6bec7987c193e28c641d2f0f73236 (patch) | |
| tree | ad9984fc3f9633e21fe0ff5ef8728f6d420ca07f /Swift/Controllers/FileTransfer/FileTransferOverview.h | |
| parent | 7af21fdd59af3b3112cff69996301605859af84c (diff) | |
| download | swift-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/FileTransfer/FileTransferOverview.h')
| -rw-r--r-- | Swift/Controllers/FileTransfer/FileTransferOverview.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/Swift/Controllers/FileTransfer/FileTransferOverview.h b/Swift/Controllers/FileTransfer/FileTransferOverview.h index 716666a..e3cbf81 100644 --- a/Swift/Controllers/FileTransfer/FileTransferOverview.h +++ b/Swift/Controllers/FileTransfer/FileTransferOverview.h | |||
| @@ -2,18 +2,24 @@ | |||
| 2 | * Copyright (c) 2011 Tobias Markmann | 2 | * Copyright (c) 2011 Tobias Markmann |
| 3 | * Licensed under the simplified BSD license. | 3 | * Licensed under the simplified BSD license. |
| 4 | * See Documentation/Licenses/BSD-simplified.txt for more information. | 4 | * See Documentation/Licenses/BSD-simplified.txt for more information. |
| 5 | */ | 5 | */ |
| 6 | 6 | ||
| 7 | /* | ||
| 8 | * Copyright (c) 2015 Isode Limited. | ||
| 9 | * All rights reserved. | ||
| 10 | * See the COPYING file for more information. | ||
| 11 | */ | ||
| 12 | |||
| 7 | #pragma once | 13 | #pragma once |
| 8 | 14 | ||
| 9 | #include <vector> | 15 | #include <vector> |
| 10 | 16 | ||
| 11 | #include "Swift/Controllers/FileTransfer/FileTransferController.h" | ||
| 12 | |||
| 13 | #include <Swiften/Base/boost_bsignals.h> | 17 | #include <Swiften/Base/boost_bsignals.h> |
| 14 | 18 | ||
| 19 | #include <Swift/Controllers/FileTransfer/FileTransferController.h> | ||
| 20 | |||
| 15 | namespace Swift { | 21 | namespace Swift { |
| 16 | 22 | ||
| 17 | class ChatsManager; | 23 | class ChatsManager; |
| 18 | class FileTransferManager; | 24 | class FileTransferManager; |
| 19 | 25 | ||
| @@ -22,15 +28,20 @@ public: | |||
| 22 | FileTransferOverview(FileTransferManager*); | 28 | FileTransferOverview(FileTransferManager*); |
| 23 | ~FileTransferOverview(); | 29 | ~FileTransferOverview(); |
| 24 | 30 | ||
| 25 | void sendFile(const JID&, const std::string&); | 31 | void sendFile(const JID&, const std::string&); |
| 26 | const std::vector<FileTransferController*>& getFileTransfers() const; | 32 | const std::vector<FileTransferController*>& getFileTransfers() const; |
| 33 | void clearFinished(); | ||
| 34 | bool isClearable() const; | ||
| 27 | 35 | ||
| 28 | boost::signal<void (FileTransferController*)> onNewFileTransferController; | 36 | boost::signal<void (FileTransferController*)> onNewFileTransferController; |
| 37 | boost::signal<void ()> onFileTransferListChanged; | ||
| 29 | 38 | ||
| 30 | private: | 39 | private: |
| 31 | void handleIncomingFileTransfer(IncomingFileTransfer::ref transfer); | 40 | void handleIncomingFileTransfer(IncomingFileTransfer::ref transfer); |
| 41 | void handleNewFileTransferController(FileTransferController* controller); | ||
| 42 | void handleFileTransferStateChanged(); | ||
| 32 | 43 | ||
| 33 | private: | 44 | private: |
| 34 | std::vector<FileTransferController*> fileTransfers; | 45 | std::vector<FileTransferController*> fileTransfers; |
| 35 | FileTransferManager *fileTransferManager; | 46 | FileTransferManager *fileTransferManager; |
| 36 | }; | 47 | }; |
Swift