From 7963995550cc505c23a36014f7e07c766be983ea Mon Sep 17 00:00:00 2001 From: Saumya-Mishra9129 Date: Tue, 26 May 2020 12:35:16 +0530 Subject: [PATCH] Based on https://github.com/sugarlabs/collabwrapper/pull/24/commits/881ed15f1a0739a620312274d8a6d0a373cb9775 --- src/jarabe/model/filetransfer.py | 33 ++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/src/jarabe/model/filetransfer.py b/src/jarabe/model/filetransfer.py index 6564e5e12f..f915148f48 100644 --- a/src/jarabe/model/filetransfer.py +++ b/src/jarabe/model/filetransfer.py @@ -42,20 +42,25 @@ from jarabe.model import neighborhood -FT_STATE_NONE = 0 -FT_STATE_PENDING = 1 -FT_STATE_ACCEPTED = 2 -FT_STATE_OPEN = 3 -FT_STATE_COMPLETED = 4 -FT_STATE_CANCELLED = 5 - -FT_REASON_NONE = 0 -FT_REASON_REQUESTED = 1 -FT_REASON_LOCAL_STOPPED = 2 -FT_REASON_REMOTE_STOPPED = 3 -FT_REASON_LOCAL_ERROR = 4 -FT_REASON_LOCAL_ERROR = 5 -FT_REASON_REMOTE_ERROR = 6 +FT_STATE_NONE = TelepathyGLib.FileTransferState.NONE +FT_STATE_PENDING = TelepathyGLib.FileTransferState.PENDING +FT_STATE_ACCEPTED = TelepathyGLib.FileTransferState.ACCEPTED +FT_STATE_OPEN = TelepathyGLib.FileTransferState.OPEN +FT_STATE_COMPLETED = TelepathyGLib.FileTransferState.COMPLETED +FT_STATE_CANCELLED = TelepathyGLib.FileTransferState.CANCELLED + +FT_REASON_NONE = \ + TelepathyGLib.FileTransferStateChangeReason.NONE +FT_REASON_REQUESTED = \ + TelepathyGLib.FileTransferStateChangeReason.REQUESTED +FT_REASON_LOCAL_STOPPED = \ + TelepathyGLib.FileTransferStateChangeReason.LOCAL_STOPPED +FT_REASON_REMOTE_STOPPED = \ + TelepathyGLib.FileTransferStateChangeReason.REMOTE_STOPPED +FT_REASON_LOCAL_ERROR = \ + TelepathyGLib.FileTransferStateChangeReason.LOCAL_ERROR +FT_REASON_REMOTE_ERROR = \ + TelepathyGLib.FileTransferStateChangeReason.REMOTE_ERROR new_file_transfer = dispatch.Signal()