Skip to content

Commit

Permalink
Merge pull request onionshare#1798 from onionshare/show-bridge-option…
Browse files Browse the repository at this point in the history
…s-on-click-use-bridge

Fix reacting to 'Use a bridge' checkbox state change
  • Loading branch information
SaptakS authored Oct 25, 2023
2 parents f880a93 + 30ad1ca commit ea076e4
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 ea076e4

Please sign in to comment.