mirror of
https://github.com/onionshare/onionshare.git
synced 2024-12-28 08:49:30 -05:00
When you uncheck the advanced options checkbox, also uncheck all advanced options
This commit is contained in:
parent
a56c9b56a6
commit
0e44a2e1fc
@ -51,6 +51,7 @@ class Options(QtWidgets.QVBoxLayout):
|
||||
advanced_group.setCheckable(True)
|
||||
advanced_group.setChecked(False)
|
||||
advanced_group.setFlat(True)
|
||||
advanced_group.toggled.connect(self.advanced_options_changed)
|
||||
advanced_group_layout = QtWidgets.QVBoxLayout()
|
||||
advanced_group_layout.addWidget(self.stealth)
|
||||
advanced_group.setLayout(advanced_group_layout)
|
||||
@ -63,12 +64,21 @@ class Options(QtWidgets.QVBoxLayout):
|
||||
"""
|
||||
When the 'close automatically' checkbox is toggled, let the web app know.
|
||||
"""
|
||||
if state > 0:
|
||||
self.web.set_stay_open(False)
|
||||
self.app.stay_open = False
|
||||
else:
|
||||
if state == 0:
|
||||
self.web.set_stay_open(True)
|
||||
self.app.stay_open = True
|
||||
else:
|
||||
self.web.set_stay_open(False)
|
||||
self.app.stay_open = False
|
||||
|
||||
def advanced_options_changed(self, checked):
|
||||
"""
|
||||
When the 'advanced options' checkbox is unchecked, uncheck all advanced
|
||||
options, and let the onionshare app know.
|
||||
"""
|
||||
if not checked:
|
||||
self.stealth.setChecked(False)
|
||||
self.app.set_stealth(False)
|
||||
|
||||
def stealth_changed(self, state):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user