mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-14 16:57:16 -05:00
Remove REQUEST_UPLOAD_NEW_FILE_STARTED event, because it's not actually needed
This commit is contained in:
parent
9857d9fce8
commit
18573ba49c
@ -52,11 +52,10 @@ class Web(object):
|
|||||||
REQUEST_CANCELED = 4
|
REQUEST_CANCELED = 4
|
||||||
REQUEST_RATE_LIMIT = 5
|
REQUEST_RATE_LIMIT = 5
|
||||||
REQUEST_CLOSE_SERVER = 6
|
REQUEST_CLOSE_SERVER = 6
|
||||||
REQUEST_UPLOAD_NEW_FILE_STARTED = 7
|
REQUEST_UPLOAD_FILE_RENAMED = 7
|
||||||
REQUEST_UPLOAD_FILE_RENAMED = 8
|
REQUEST_UPLOAD_FINISHED = 8
|
||||||
REQUEST_UPLOAD_FINISHED = 9
|
REQUEST_ERROR_DOWNLOADS_DIR_CANNOT_CREATE = 9
|
||||||
REQUEST_ERROR_DOWNLOADS_DIR_CANNOT_CREATE = 10
|
REQUEST_ERROR_DOWNLOADS_DIR_NOT_WRITABLE = 10
|
||||||
REQUEST_ERROR_DOWNLOADS_DIR_NOT_WRITABLE = 11
|
|
||||||
|
|
||||||
def __init__(self, common, gui_mode, receive_mode=False):
|
def __init__(self, common, gui_mode, receive_mode=False):
|
||||||
self.common = common
|
self.common = common
|
||||||
@ -740,13 +739,6 @@ class ReceiveModeRequest(Request):
|
|||||||
writable stream.
|
writable stream.
|
||||||
"""
|
"""
|
||||||
if self.upload_request:
|
if self.upload_request:
|
||||||
# Tell the GUI about the new file upload
|
|
||||||
self.web.add_request(Web.REQUEST_UPLOAD_NEW_FILE_STARTED, self.path, {
|
|
||||||
'id': self.upload_id,
|
|
||||||
'filename': filename,
|
|
||||||
'total_bytes': total_content_length
|
|
||||||
})
|
|
||||||
|
|
||||||
self.progress[filename] = {
|
self.progress[filename] = {
|
||||||
'uploaded_bytes': 0,
|
'uploaded_bytes': 0,
|
||||||
'complete': False
|
'complete': False
|
||||||
|
@ -324,12 +324,6 @@ class Mode(QtWidgets.QWidget):
|
|||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def handle_request_upload_new_file_started(self, event):
|
|
||||||
"""
|
|
||||||
Handle REQUEST_UPLOAD_NEW_FILE_STARTED event.
|
|
||||||
"""
|
|
||||||
pass
|
|
||||||
|
|
||||||
def handle_request_upload_file_renamed(self, event):
|
def handle_request_upload_file_renamed(self, event):
|
||||||
"""
|
"""
|
||||||
Handle REQUEST_UPLOAD_FILE_RENAMED event.
|
Handle REQUEST_UPLOAD_FILE_RENAMED event.
|
||||||
|
@ -387,9 +387,6 @@ class OnionShareGui(QtWidgets.QMainWindow):
|
|||||||
elif event["type"] == Web.REQUEST_CLOSE_SERVER:
|
elif event["type"] == Web.REQUEST_CLOSE_SERVER:
|
||||||
mode.handle_request_close_server(event)
|
mode.handle_request_close_server(event)
|
||||||
|
|
||||||
elif event["type"] == Web.REQUEST_UPLOAD_NEW_FILE_STARTED:
|
|
||||||
mode.handle_request_upload_new_file_started(event)
|
|
||||||
|
|
||||||
elif event["type"] == Web.REQUEST_UPLOAD_FILE_RENAMED:
|
elif event["type"] == Web.REQUEST_UPLOAD_FILE_RENAMED:
|
||||||
mode.handle_request_upload_file_renamed(event)
|
mode.handle_request_upload_file_renamed(event)
|
||||||
|
|
||||||
|
@ -156,12 +156,6 @@ class ReceiveMode(Mode):
|
|||||||
self.stop_server()
|
self.stop_server()
|
||||||
self.system_tray.showMessage(strings._('systray_close_server_title', True), strings._('systray_close_server_message', True))
|
self.system_tray.showMessage(strings._('systray_close_server_title', True), strings._('systray_close_server_message', True))
|
||||||
|
|
||||||
def handle_request_upload_new_file_started(self, event):
|
|
||||||
"""
|
|
||||||
Handle REQUEST_UPLOAD_NEW_FILE_STARTED event.
|
|
||||||
"""
|
|
||||||
pass
|
|
||||||
|
|
||||||
def handle_request_upload_file_renamed(self, event):
|
def handle_request_upload_file_renamed(self, event):
|
||||||
"""
|
"""
|
||||||
Handle REQUEST_UPLOAD_FILE_RENAMED event.
|
Handle REQUEST_UPLOAD_FILE_RENAMED event.
|
||||||
|
Loading…
Reference in New Issue
Block a user