Skip to content

Commit

Permalink
Fix reacting to 'Use a bridge' checkbox state change
Browse files Browse the repository at this point in the history
  • Loading branch information
mig5 committed Oct 23, 2023
1 parent f880a93 commit 30ad1ca
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions desktop/onionshare/tor_settings_tab.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 30ad1ca

Please sign in to comment.