mirror of
https://github.com/onionshare/onionshare.git
synced 2024-10-01 01:35:40 -04:00
Finish removing web event REQUEST_CLOSE_SERVER, which used to be a receive mode feature to allow the Tor Browser user to close the server, but we removed
This commit is contained in:
parent
a0c3a276ec
commit
3bbff7e85a
@ -35,11 +35,10 @@ class Web(object):
|
||||
REQUEST_OTHER = 3
|
||||
REQUEST_CANCELED = 4
|
||||
REQUEST_RATE_LIMIT = 5
|
||||
REQUEST_CLOSE_SERVER = 6
|
||||
REQUEST_UPLOAD_FILE_RENAMED = 7
|
||||
REQUEST_UPLOAD_SET_DIR = 8
|
||||
REQUEST_UPLOAD_FINISHED = 9
|
||||
REQUEST_ERROR_DOWNLOADS_DIR_CANNOT_CREATE = 10
|
||||
REQUEST_UPLOAD_FILE_RENAMED = 6
|
||||
REQUEST_UPLOAD_SET_DIR = 7
|
||||
REQUEST_UPLOAD_FINISHED = 8
|
||||
REQUEST_ERROR_DOWNLOADS_DIR_CANNOT_CREATE = 9
|
||||
|
||||
def __init__(self, common, is_gui, mode='share'):
|
||||
self.common = common
|
||||
|
@ -312,12 +312,6 @@ class Mode(QtWidgets.QWidget):
|
||||
"""
|
||||
pass
|
||||
|
||||
def handle_request_close_server(self, event):
|
||||
"""
|
||||
Handle REQUEST_CLOSE_SERVER event.
|
||||
"""
|
||||
pass
|
||||
|
||||
def handle_request_upload_file_renamed(self, event):
|
||||
"""
|
||||
Handle REQUEST_UPLOAD_FILE_RENAMED event.
|
||||
|
@ -103,7 +103,7 @@ class ReceiveMode(Mode):
|
||||
return True
|
||||
# An upload is probably still running - hold off on stopping the share, but block new shares.
|
||||
else:
|
||||
self.server_status_label.setText(strings._('timeout_upload_still_running'))
|
||||
self.server_status_label.setText(strings._('gui_receive_mode_timeout_waiting'))
|
||||
self.web.receive_mode.can_upload = False
|
||||
return False
|
||||
|
||||
@ -159,13 +159,6 @@ class ReceiveMode(Mode):
|
||||
'progress': event["data"]["progress"]
|
||||
})
|
||||
|
||||
def handle_request_close_server(self, event):
|
||||
"""
|
||||
Handle REQUEST_CLOSE_SERVER event.
|
||||
"""
|
||||
self.stop_server()
|
||||
self.system_tray.showMessage(strings._('systray_close_server_title'), strings._('systray_close_server_message'))
|
||||
|
||||
def handle_request_upload_file_renamed(self, event):
|
||||
"""
|
||||
Handle REQUEST_UPLOAD_FILE_RENAMED event.
|
||||
|
@ -138,7 +138,7 @@ class ShareMode(Mode):
|
||||
return True
|
||||
# A download is probably still running - hold off on stopping the share
|
||||
else:
|
||||
self.server_status_label.setText(strings._('timeout_download_still_running'))
|
||||
self.server_status_label.setText(strings._('gui_share_mode_timeout_waiting'))
|
||||
return False
|
||||
|
||||
def start_server_custom(self):
|
||||
|
@ -384,9 +384,6 @@ class OnionShareGui(QtWidgets.QMainWindow):
|
||||
elif event["type"] == Web.REQUEST_CANCELED:
|
||||
mode.handle_request_canceled(event)
|
||||
|
||||
elif event["type"] == Web.REQUEST_CLOSE_SERVER:
|
||||
mode.handle_request_close_server(event)
|
||||
|
||||
elif event["type"] == Web.REQUEST_UPLOAD_FILE_RENAMED:
|
||||
mode.handle_request_upload_file_renamed(event)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user