mirror of
https://github.com/onionshare/onionshare.git
synced 2025-07-25 15:45:58 -04:00
If connecting to Tor fails, open the correct TorSettings dialog
This commit is contained in:
parent
6faa1349ba
commit
ee5895bbda
2 changed files with 7 additions and 7 deletions
|
@ -165,7 +165,7 @@ class MainWindow(QtWidgets.QMainWindow):
|
||||||
# Start the "Connecting to Tor" dialog, which calls onion.connect()
|
# Start the "Connecting to Tor" dialog, which calls onion.connect()
|
||||||
tor_con = TorConnectionDialog(self.common)
|
tor_con = TorConnectionDialog(self.common)
|
||||||
tor_con.canceled.connect(self.tor_connection_canceled)
|
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:
|
if not self.common.gui.local_only:
|
||||||
tor_con.start()
|
tor_con.start()
|
||||||
self.settings_have_changed()
|
self.settings_have_changed()
|
||||||
|
@ -234,14 +234,14 @@ class MainWindow(QtWidgets.QMainWindow):
|
||||||
# Wait 100ms before asking
|
# Wait 100ms before asking
|
||||||
QtCore.QTimer.singleShot(100, ask)
|
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
|
# 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):
|
def open_tor_settings(self):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -48,7 +48,7 @@ class TorConnectionDialog(QtWidgets.QProgressDialog):
|
||||||
Connecting to Tor dialog.
|
Connecting to Tor dialog.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
open_settings = QtCore.Signal()
|
open_tor_settings = QtCore.Signal()
|
||||||
success = QtCore.Signal()
|
success = QtCore.Signal()
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
|
@ -149,7 +149,7 @@ class TorConnectionDialog(QtWidgets.QProgressDialog):
|
||||||
)
|
)
|
||||||
|
|
||||||
# Open settings
|
# Open settings
|
||||||
self.open_settings.emit()
|
self.open_tor_settings.emit()
|
||||||
|
|
||||||
QtCore.QTimer.singleShot(1, alert)
|
QtCore.QTimer.singleShot(1, alert)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue