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/FileTransferController.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/FileTransferController.h')
-rw-r--r-- | Swift/Controllers/FileTransfer/FileTransferController.h | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/Swift/Controllers/FileTransfer/FileTransferController.h b/Swift/Controllers/FileTransfer/FileTransferController.h index 3d6f7d5..490773d 100644 --- a/Swift/Controllers/FileTransfer/FileTransferController.h +++ b/Swift/Controllers/FileTransfer/FileTransferController.h @@ -1,24 +1,31 @@ /* * Copyright (c) 2011 Tobias Markmann * Licensed under the simplified BSD license. * See Documentation/Licenses/BSD-simplified.txt for more information. */ +/* + * Copyright (c) 2015 Isode Limited. + * All rights reserved. + * See the COPYING file for more information. + */ + #pragma once #include <string> -#include <boost/shared_ptr.hpp> #include <boost/cstdint.hpp> +#include <boost/shared_ptr.hpp> -#include <Swiften/JID/JID.h> -#include <Swiften/FileTransfer/FileTransfer.h> -#include <Swiften/FileTransfer/IncomingFileTransfer.h> #include <Swiften/FileTransfer/FileReadBytestream.h> +#include <Swiften/FileTransfer/FileTransfer.h> #include <Swiften/FileTransfer/FileWriteBytestream.h> +#include <Swiften/FileTransfer/IncomingFileTransfer.h> +#include <Swiften/JID/JID.h> + #include <Swift/Controllers/FileTransfer/FileTransferProgressInfo.h> namespace Swift { class FileTransferManager; class ChatWindow; @@ -46,20 +53,20 @@ public: const JID &getOtherParty() const; bool isIncoming() const; FileTransfer::State getState() const; int getProgress() const; boost::uintmax_t getSize() const; - boost::signal<void ()> onStateChage; + boost::signal<void ()> onStateChanged; boost::signal<void ()> onProgressChange; private: void handleFileTransferStateChange(FileTransfer::State); void handleProgressPercentageChange(int percentage); -private: +private: bool sending; JID otherParty; std::string filename; FileTransfer::ref transfer; boost::shared_ptr<FileReadBytestream> fileReadStream; boost::shared_ptr<FileWriteBytestream> fileWriteStream; |