If connecting to Tor fails, open the correct TorSettings dialog

This commit is contained in:
Micah Lee 2021-10-17 12:15:25 -07:00
parent 9f9328fd1f
commit 2161c58a4a
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73
2 changed files with 7 additions and 7 deletions

View File

@ -165,7 +165,7 @@ class MainWindow(QtWidgets.QMainWindow):
# Start the "Connecting to Tor" dialog, which calls onion.connect()
tor_con = TorConnectionDialog(self.common)
tor_con.canceled.connect(self.tor_connection_canceled)
tor_con.open_settings.connect(self.tor_connection_open_settings)
tor_con.open_tor_settings.connect(self.tor_connection_open_tor_settings)
if not self.common.gui.local_only:
tor_con.start()
self.settings_have_changed()
@ -234,14 +234,14 @@ class MainWindow(QtWidgets.QMainWindow):
# Wait 100ms before asking
QtCore.QTimer.singleShot(100, ask)
def tor_connection_open_settings(self):
def tor_connection_open_tor_settings(self):
"""
The TorConnectionDialog wants to open the Settings dialog
The TorConnectionDialog wants to open the Tor Settings dialog
"""
self.common.log("MainWindow", "tor_connection_open_settings")
self.common.log("MainWindow", "tor_connection_open_tor_settings")
# Wait 1ms for the event loop to finish closing the TorConnectionDialog
QtCore.QTimer.singleShot(1, self.open_settings)
QtCore.QTimer.singleShot(1, self.open_tor_settings)
def open_tor_settings(self):
"""

View File

@ -48,7 +48,7 @@ class TorConnectionDialog(QtWidgets.QProgressDialog):
Connecting to Tor dialog.
"""
open_settings = QtCore.Signal()
open_tor_settings = QtCore.Signal()
success = QtCore.Signal()
def __init__(
@ -149,7 +149,7 @@ class TorConnectionDialog(QtWidgets.QProgressDialog):
)
# Open settings
self.open_settings.emit()
self.open_tor_settings.emit()
QtCore.QTimer.singleShot(1, alert)