Merge branch '447_reload_tor_if_not_connected_and_settings_cancelled' of https://github.com/mig5/onionshare into mig5-447_reload_tor_if_not_connected_and_settings_cancelled

This commit is contained in:
Micah Lee 2017-12-05 14:05:16 -08:00
commit 58ec047a53
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73
2 changed files with 6 additions and 1 deletions

View File

@ -505,7 +505,11 @@ class SettingsDialog(QtWidgets.QDialog):
Cancel button clicked.
"""
common.log('SettingsDialog', 'cancel_clicked')
self.close()
if not self.onion.connected_to_tor:
Alert(strings._('gui_tor_connection_canceled', True), QtWidgets.QMessageBox.Warning)
sys.exit()
else:
self.close()
def help_clicked(self):
"""

View File

@ -117,6 +117,7 @@
"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_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"