From 82b1860dacab66f4b5f7b8e630fb9cc322faa1a2 Mon Sep 17 00:00:00 2001 From: Miguel Jacq Date: Mon, 15 Jan 2018 11:25:08 +1100 Subject: [PATCH] add missing 'toggled' connect for obfs4 radio. Remove the enabling/disabling of radios for bridges, it obstructs normal UX --- onionshare_gui/settings_dialog.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/onionshare_gui/settings_dialog.py b/onionshare_gui/settings_dialog.py index 0c5198fc..7b24bf0c 100644 --- a/onionshare_gui/settings_dialog.py +++ b/onionshare_gui/settings_dialog.py @@ -129,6 +129,7 @@ class SettingsDialog(QtWidgets.QDialog): # OBFS4 option radio self.tor_bridges_use_obfs4_radio = QtWidgets.QRadioButton(strings._('gui_settings_tor_bridges_obfs4_radio_option', True)) + self.tor_bridges_use_obfs4_radio.toggled.connect(self.tor_bridges_use_obfs4_radio_toggled) # Custom bridges radio and textbox self.tor_bridges_use_custom_radio = QtWidgets.QRadioButton(strings._('gui_settings_tor_bridges_custom_radio_option', True)) @@ -397,8 +398,6 @@ class SettingsDialog(QtWidgets.QDialog): 'No bridges' option was toggled. If checked, enable other bridge options. """ if checked: - self.tor_bridges_use_obfs4_radio.setEnabled(True) - self.tor_bridges_use_custom_radio.setEnabled(True) self.tor_bridges_use_custom_textbox_options.hide() def tor_bridges_use_obfs4_radio_toggled(self, checked): @@ -406,7 +405,6 @@ class SettingsDialog(QtWidgets.QDialog): obfs4 bridges option was toggled. If checked, disable custom bridge options. """ if checked: - self.tor_bridges_use_custom_radio.setEnabled(False) self.tor_bridges_use_custom_textbox_options.hide() def tor_bridges_use_custom_radio_toggled(self, checked): @@ -414,7 +412,6 @@ class SettingsDialog(QtWidgets.QDialog): Custom bridges option was toggled. If checked, show custom bridge options. """ if checked: - self.tor_bridges_use_obfs4_radio.setEnabled(False) self.tor_bridges_use_custom_textbox_options.show() def connection_type_automatic_toggled(self, checked):