mirror of
https://github.com/onionshare/onionshare.git
synced 2024-12-28 16:59:35 -05:00
When a share is active, disable the full advanced options group, not just the stealth checkbox
This commit is contained in:
parent
cd63dc37f1
commit
0ab29ff8af
@ -161,7 +161,7 @@ class OnionShareGui(QtWidgets.QMainWindow):
|
|||||||
self.app.choose_port()
|
self.app.choose_port()
|
||||||
|
|
||||||
# disable the stealth option
|
# disable the stealth option
|
||||||
self.options.set_stealth_enabled(False)
|
self.options.set_advanced_enabled(False)
|
||||||
|
|
||||||
# start onionshare http service in new thread
|
# start onionshare http service in new thread
|
||||||
t = threading.Thread(target=web.start, args=(self.app.port, self.app.stay_open, self.app.transparent_torification))
|
t = threading.Thread(target=web.start, args=(self.app.port, self.app.stay_open, self.app.transparent_torification))
|
||||||
@ -250,7 +250,7 @@ class OnionShareGui(QtWidgets.QMainWindow):
|
|||||||
web.stop(self.app.port)
|
web.stop(self.app.port)
|
||||||
self.app.cleanup()
|
self.app.cleanup()
|
||||||
self.filesize_warning.hide()
|
self.filesize_warning.hide()
|
||||||
self.options.set_stealth_enabled(True)
|
self.options.set_advanced_enabled(True)
|
||||||
self.stop_server_finished.emit()
|
self.stop_server_finished.emit()
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
@ -47,18 +47,18 @@ class Options(QtWidgets.QVBoxLayout):
|
|||||||
self.stealth.stateChanged.connect(self.stealth_changed)
|
self.stealth.stateChanged.connect(self.stealth_changed)
|
||||||
|
|
||||||
# advanced options group
|
# advanced options group
|
||||||
advanced_group = QtWidgets.QGroupBox(strings._("gui_advanced_options", True))
|
self.advanced_group = QtWidgets.QGroupBox(strings._("gui_advanced_options", True))
|
||||||
advanced_group.setCheckable(True)
|
self.advanced_group.setCheckable(True)
|
||||||
advanced_group.setChecked(False)
|
self.advanced_group.setChecked(False)
|
||||||
advanced_group.setFlat(True)
|
self.advanced_group.setFlat(True)
|
||||||
advanced_group.toggled.connect(self.advanced_options_changed)
|
self.advanced_group.toggled.connect(self.advanced_options_changed)
|
||||||
advanced_group_layout = QtWidgets.QVBoxLayout()
|
advanced_group_layout = QtWidgets.QVBoxLayout()
|
||||||
advanced_group_layout.addWidget(self.stealth)
|
advanced_group_layout.addWidget(self.stealth)
|
||||||
advanced_group.setLayout(advanced_group_layout)
|
self.advanced_group.setLayout(advanced_group_layout)
|
||||||
|
|
||||||
# add the widgets
|
# add the widgets
|
||||||
self.addWidget(self.close_automatically)
|
self.addWidget(self.close_automatically)
|
||||||
self.addWidget(advanced_group)
|
self.addWidget(self.advanced_group)
|
||||||
|
|
||||||
def stay_open_changed(self, state):
|
def stay_open_changed(self, state):
|
||||||
"""
|
"""
|
||||||
@ -89,9 +89,10 @@ class Options(QtWidgets.QVBoxLayout):
|
|||||||
else:
|
else:
|
||||||
self.app.set_stealth(False)
|
self.app.set_stealth(False)
|
||||||
|
|
||||||
def set_stealth_enabled(self, enabled):
|
def set_advanced_enabled(self, enabled):
|
||||||
"""
|
"""
|
||||||
You cannot toggle stealth after an onion service has started. This method
|
You cannot toggle stealth after an onion service has started. This method
|
||||||
disables and re-enabled the stealth checkbox.
|
disables and re-enabled the advanced options group, including the stealth
|
||||||
|
checkbox.
|
||||||
"""
|
"""
|
||||||
self.stealth.setEnabled(enabled)
|
self.advanced_group.setEnabled(enabled)
|
||||||
|
Loading…
Reference in New Issue
Block a user