From dcea4595807e5bb6c158620133f2b7fac54be64e Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Fri, 4 May 2018 16:26:54 -0700 Subject: [PATCH] Start building Uploads widget --- onionshare_gui/receive_mode/__init__.py | 3 ++- onionshare_gui/receive_mode/uploads.py | 36 +++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 onionshare_gui/receive_mode/uploads.py diff --git a/onionshare_gui/receive_mode/__init__.py b/onionshare_gui/receive_mode/__init__.py index 27147db0..c306d8a9 100644 --- a/onionshare_gui/receive_mode/__init__.py +++ b/onionshare_gui/receive_mode/__init__.py @@ -22,6 +22,7 @@ from PyQt5 import QtCore, QtWidgets, QtGui from onionshare import strings from onionshare.web import Web +from .uploads import Uploads from ..mode import Mode class ReceiveMode(Mode): @@ -46,7 +47,7 @@ class ReceiveMode(Mode): self.server_status.update() # Downloads - #self.uploads = Uploads(self.common) + self.uploads = Uploads(self.common) self.uploads_in_progress = 0 self.uploads_completed = 0 self.new_upload = False # For scrolling to the bottom of the uploads list diff --git a/onionshare_gui/receive_mode/uploads.py b/onionshare_gui/receive_mode/uploads.py new file mode 100644 index 00000000..821e4440 --- /dev/null +++ b/onionshare_gui/receive_mode/uploads.py @@ -0,0 +1,36 @@ +# -*- coding: utf-8 -*- +""" +OnionShare | https://onionshare.org/ + +Copyright (C) 2014-2018 Micah Lee + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +""" +from PyQt5 import QtCore, QtWidgets, QtGui + +from onionshare import strings + +class Uploads(QtWidgets.QWidget): + """ + The uploads chunk of the GUI. This lists all of the active upload + progress bars, as well as information about each upload. + """ + def __init__(self, common): + super(Uploads, self).__init__() + + self.common = common + + self.layout = QtWidgets.QVBoxLayout() + self.layout.addStretch() + self.setLayout(self.layout)