mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-10 19:52:50 -03:00
Actually still uncheck the timer when the server stops, but *only* when it stops
This commit is contained in:
parent
bddb9596d1
commit
d500069398
2 changed files with 2 additions and 3 deletions
|
@ -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))
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in a new issue