diff --git a/onionshare_gui/onionshare_gui.py b/onionshare_gui/onionshare_gui.py index fd278394..8c354eeb 100644 --- a/onionshare_gui/onionshare_gui.py +++ b/onionshare_gui/onionshare_gui.py @@ -426,7 +426,6 @@ class OnionShareGui(QtWidgets.QMainWindow): # close on finish? if not web.get_stay_open(): self.server_status.stop_server() - self.server_status.shutdown_timeout_reset() self.status_bar.showMessage(strings._('closing_automatically', True)) else: if self.server_status.status == self.server_status.STATUS_STOPPED: @@ -449,7 +448,6 @@ class OnionShareGui(QtWidgets.QMainWindow): if web.download_count == 0 or web.done: self.server_status.stop_server() self.status_bar.showMessage(strings._('close_on_timeout', True)) - self.server_status.shutdown_timeout_reset() # A download is probably still running - hold off on stopping the share else: self.status_bar.showMessage(strings._('timeout_download_still_running', True)) diff --git a/onionshare_gui/server_status.py b/onionshare_gui/server_status.py index 4e05bf22..48bffdca 100644 --- a/onionshare_gui/server_status.py +++ b/onionshare_gui/server_status.py @@ -119,6 +119,7 @@ class ServerStatus(QtWidgets.QVBoxLayout): """ Reset the timeout in the UI after stopping a share """ + self.server_shutdown_timeout_checkbox.setCheckState(QtCore.Qt.Unchecked) self.server_shutdown_timeout.setDateTime(QtCore.QDateTime.currentDateTime().addSecs(300)) self.server_shutdown_timeout.setMinimumDateTime(QtCore.QDateTime.currentDateTime().addSecs(120)) @@ -196,7 +197,6 @@ class ServerStatus(QtWidgets.QVBoxLayout): self.start_server() elif self.status == self.STATUS_STARTED: self.stop_server() - self.shutdown_timeout_reset() def start_server(self): """ @@ -219,6 +219,7 @@ class ServerStatus(QtWidgets.QVBoxLayout): Stop the server. """ self.status = self.STATUS_WORKING + self.shutdown_timeout_reset() self.update() self.server_stopped.emit()