mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-14 08:49:47 -05:00
#447 show alert and exit if the Settings dialog is canceled yet Tor is still not connected
This commit is contained in:
parent
9910ea5c72
commit
fe311f591f
@ -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):
|
||||
"""
|
||||
|
@ -112,5 +112,6 @@
|
||||
"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 is disconnected from Tor.\n\nPlease re-open OnionShare and configure the Tor connection.",
|
||||
"share_via_onionshare": "Share via OnionShare"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user