Now when you cancel connecting to Tor, it prompts you if you want to quit or open settings

This commit is contained in:
Micah Lee 2017-05-14 19:21:33 -07:00
parent ad2c5e94b4
commit 58f70b1d9b
No known key found for this signature in database
GPG key ID: 403C2657CD994F73
4 changed files with 23 additions and 9 deletions

View file

@ -42,7 +42,6 @@ class TorConnectionDialog(QtWidgets.QProgressDialog):
# Label
self.setLabelText(strings._('connecting_to_tor', True))
self.setCancelButtonText(strings._('gui_tor_connection_exit', True))
# Progress bar ticks from 0 to 100
self.setRange(0, 100)
@ -72,7 +71,7 @@ class TorConnectionDialog(QtWidgets.QProgressDialog):
self.cancel()
# Display the exception in an alert box
Alert("{}\n\nTry adjusting how OnionShare connects to the Tor network in Settings.".format(e.args[0]), QtWidgets.QMessageBox.Warning)
Alert("{}\n\n{}".format(e.args[0], strings._('gui_tor_connection_error_settings', True)), QtWidgets.QMessageBox.Warning)
# Open settings
self.open_settings.emit()