mirror of
https://github.com/onionshare/onionshare.git
synced 2024-10-01 01:35:40 -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
@ -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
|
||||
|
@ -114,11 +114,12 @@
|
||||
"update_error_check_error": "Error checking for updates: Maybe you're not connected to Tor, or maybe the OnionShare website is down.",
|
||||
"update_error_invalid_latest_version": "Error checking for updates: The OnionShare website responded saying the latest version is '{}', but that doesn't appear to be a valid version string.",
|
||||
"update_not_available": "You are running the latest version of OnionShare.",
|
||||
"gui_tor_connection_ask": "Tor isn't running.\n\nWould you like to open OnionShare settings to troubleshoot connecting to Tor?",
|
||||
"gui_tor_connection_ask": "Would you like to open OnionShare settings to troubleshoot connecting to Tor?",
|
||||
"gui_tor_connection_ask_open_settings": "Open Settings",
|
||||
"gui_tor_connection_ask_quit": "Quit",
|
||||
"gui_tor_connection_error_settings": "Try adjusting how OnionShare connects to the Tor network in Settings.",
|
||||
"gui_tor_connection_canceled": "OnionShare cannot connect to Tor.\n\nMake sure you're connected to the internet, then re-open OnionShare to configure the Tor connection.",
|
||||
"gui_tor_connection_lost": "Disconnected from Tor.",
|
||||
"gui_server_started_after_timeout": "The server started after your chosen auto-timeout.\nPlease start a new share.",
|
||||
"gui_server_timeout_expired": "The chosen timeout has already expired.\nPlease update the timeout and then you may start sharing.",
|
||||
"share_via_onionshare": "Share via OnionShare"
|
||||
|
Loading…
Reference in New Issue
Block a user