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:
Micah Lee 2019-01-19 20:43:25 -08:00
parent a0c3a276ec
commit 3bbff7e85a
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73
5 changed files with 6 additions and 23 deletions

View File

@ -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

View File

@ -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.

View File

@ -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.

View File

@ -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):

View File

@ -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)