mirror of
https://github.com/onionshare/onionshare.git
synced 2025-05-07 17:05:16 -04:00
Don't show alert dialogs when Tor disconnects - just display in statusbar and stop any active share.
This commit is contained in:
parent
6f4d7f7f44
commit
5c84c277da
2 changed files with 7 additions and 6 deletions
|
@ -176,7 +176,6 @@ class OnionShareGui(QtWidgets.QMainWindow):
|
|||
quit, or open settings.
|
||||
"""
|
||||
common.log('OnionShareGui', '_tor_connection_canceled')
|
||||
self.timer.stop()
|
||||
|
||||
def ask():
|
||||
a = Alert(strings._('gui_tor_connection_ask', True), QtWidgets.QMessageBox.Question, buttons=QtWidgets.QMessageBox.NoButton, autostart=False)
|
||||
|
@ -223,8 +222,10 @@ class OnionShareGui(QtWidgets.QMainWindow):
|
|||
# We might've stopped the main requests timer if a Tor connection failed.
|
||||
# If we've reloaded settings, we probably succeeded in obtaining a new
|
||||
# connection. If so, restart the timer.
|
||||
if not self.timer.isActive():
|
||||
self.timer.start()
|
||||
if self.onion.is_authenticated():
|
||||
if not self.timer.isActive():
|
||||
self.timer.start()
|
||||
self.status_bar.clearMessage()
|
||||
|
||||
d = SettingsDialog(self.onion, self.qtapp, self.config)
|
||||
d.settings_saved.connect(reload_settings)
|
||||
|
@ -401,8 +402,7 @@ class OnionShareGui(QtWidgets.QMainWindow):
|
|||
self.timer.stop()
|
||||
if self.server_status.status != self.server_status.STATUS_STOPPED:
|
||||
self.server_status.stop_server()
|
||||
self.status_bar.clearMessage()
|
||||
self._tor_connection_canceled()
|
||||
self.status_bar.showMessage(strings._('gui_tor_connection_lost', True))
|
||||
|
||||
# scroll to the bottom of the dl progress bar log pane
|
||||
# if a new download has been added
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue