mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-25 10:42:58 -03:00
Merge branch 'mig5-dont_uncheck_timer_checkbox_on_stop'
This commit is contained in:
commit
5bb885c6ec
2 changed files with 2 additions and 4 deletions
|
@ -426,7 +426,6 @@ class OnionShareGui(QtWidgets.QMainWindow):
|
||||||
# close on finish?
|
# close on finish?
|
||||||
if not web.get_stay_open():
|
if not web.get_stay_open():
|
||||||
self.server_status.stop_server()
|
self.server_status.stop_server()
|
||||||
self.server_status.shutdown_timeout_reset()
|
|
||||||
self.status_bar.showMessage(strings._('closing_automatically', True))
|
self.status_bar.showMessage(strings._('closing_automatically', True))
|
||||||
else:
|
else:
|
||||||
if self.server_status.status == self.server_status.STATUS_STOPPED:
|
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:
|
if web.download_count == 0 or web.done:
|
||||||
self.server_status.stop_server()
|
self.server_status.stop_server()
|
||||||
self.status_bar.showMessage(strings._('close_on_timeout', True))
|
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
|
# A download is probably still running - hold off on stopping the share
|
||||||
else:
|
else:
|
||||||
self.status_bar.showMessage(strings._('timeout_download_still_running', True))
|
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
|
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.setDateTime(QtCore.QDateTime.currentDateTime().addSecs(300))
|
||||||
self.server_shutdown_timeout.setMinimumDateTime(QtCore.QDateTime.currentDateTime().addSecs(120))
|
self.server_shutdown_timeout.setMinimumDateTime(QtCore.QDateTime.currentDateTime().addSecs(120))
|
||||||
|
|
||||||
|
@ -163,7 +164,6 @@ class ServerStatus(QtWidgets.QVBoxLayout):
|
||||||
self.server_button.setText(strings._('gui_start_server', True))
|
self.server_button.setText(strings._('gui_start_server', True))
|
||||||
self.server_shutdown_timeout.setEnabled(True)
|
self.server_shutdown_timeout.setEnabled(True)
|
||||||
self.server_shutdown_timeout_checkbox.setEnabled(True)
|
self.server_shutdown_timeout_checkbox.setEnabled(True)
|
||||||
self.server_shutdown_timeout_checkbox.setCheckState(QtCore.Qt.Unchecked)
|
|
||||||
elif self.status == self.STATUS_STARTED:
|
elif self.status == self.STATUS_STARTED:
|
||||||
self.server_button.setEnabled(True)
|
self.server_button.setEnabled(True)
|
||||||
self.server_button.setText(strings._('gui_stop_server', True))
|
self.server_button.setText(strings._('gui_stop_server', True))
|
||||||
|
@ -197,7 +197,6 @@ class ServerStatus(QtWidgets.QVBoxLayout):
|
||||||
self.start_server()
|
self.start_server()
|
||||||
elif self.status == self.STATUS_STARTED:
|
elif self.status == self.STATUS_STARTED:
|
||||||
self.stop_server()
|
self.stop_server()
|
||||||
self.shutdown_timeout_reset()
|
|
||||||
|
|
||||||
def start_server(self):
|
def start_server(self):
|
||||||
"""
|
"""
|
||||||
|
@ -220,6 +219,7 @@ class ServerStatus(QtWidgets.QVBoxLayout):
|
||||||
Stop the server.
|
Stop the server.
|
||||||
"""
|
"""
|
||||||
self.status = self.STATUS_WORKING
|
self.status = self.STATUS_WORKING
|
||||||
|
self.shutdown_timeout_reset()
|
||||||
self.update()
|
self.update()
|
||||||
self.server_stopped.emit()
|
self.server_stopped.emit()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue