From 30ad1caee31342cc42dcd5b88ef17a48e232d0c9 Mon Sep 17 00:00:00 2001 From: Miguel Jacq Date: Tue, 24 Oct 2023 10:58:44 +1100 Subject: [PATCH] Fix reacting to 'Use a bridge' checkbox state change --- desktop/onionshare/tor_settings_tab.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/desktop/onionshare/tor_settings_tab.py b/desktop/onionshare/tor_settings_tab.py index 0a2b12e24..a7aa4bbb3 100644 --- a/desktop/onionshare/tor_settings_tab.py +++ b/desktop/onionshare/tor_settings_tab.py @@ -97,7 +97,7 @@ def __init__( self.bridge_use_checkbox = QtWidgets.QCheckBox( strings._("gui_settings_bridge_use_checkbox") ) - self.bridge_use_checkbox.stateChanged.connect( + self.bridge_use_checkbox.clicked.connect( self.bridge_use_checkbox_state_changed ) @@ -529,15 +529,17 @@ def connection_type_bundled_toggled(self, checked): self.connection_type_socks.hide() self.connection_type_bridges_radio_group.show() - def bridge_use_checkbox_state_changed(self, state): + def bridge_use_checkbox_state_changed(self): """ 'Use a bridge' checkbox changed """ - if state == QtCore.Qt.Checked: + if self.bridge_use_checkbox.isChecked(): + self.common.log("TorSettingsTab", "bridge_use_checkbox_state_changed", "Use bridge checkbox toggled on") self.bridge_settings.show() self.bridge_builtin_radio.click() self.bridge_builtin_dropdown.setCurrentText("obfs4") else: + self.common.log("TorSettingsTab", "bridge_use_checkbox_state_changed", "Use bridge checkbox toggled off") self.bridge_settings.hide() def bridge_builtin_radio_toggled(self, checked):