mirror of
https://github.com/onionshare/onionshare.git
synced 2024-10-01 01:35:40 -04:00
If connecting to Tor fails, open the correct TorSettings dialog
This commit is contained in:
parent
9f9328fd1f
commit
2161c58a4a
@ -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):
|
||||
"""
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user