From 2161c58a4afaa78b46fbb2412dbd3cee99fb61d2 Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Sun, 17 Oct 2021 12:15:25 -0700 Subject: [PATCH] If connecting to Tor fails, open the correct TorSettings dialog --- desktop/src/onionshare/main_window.py | 10 +++++----- desktop/src/onionshare/tor_connection_dialog.py | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/desktop/src/onionshare/main_window.py b/desktop/src/onionshare/main_window.py index b3f8b6c9..c125741c 100644 --- a/desktop/src/onionshare/main_window.py +++ b/desktop/src/onionshare/main_window.py @@ -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): """ diff --git a/desktop/src/onionshare/tor_connection_dialog.py b/desktop/src/onionshare/tor_connection_dialog.py index dd2721bd..daf49a32 100644 --- a/desktop/src/onionshare/tor_connection_dialog.py +++ b/desktop/src/onionshare/tor_connection_dialog.py @@ -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)