mirror of
https://github.com/onionshare/onionshare.git
synced 2024-12-26 15:59:48 -05:00
Rename mode_settings_widget to be more clear, and fix one place that was still using tab_settings
This commit is contained in:
parent
9534a44051
commit
c426cfceb2
@ -73,15 +73,15 @@ class Mode(QtWidgets.QWidget):
|
||||
self.header_label.setStyleSheet(self.common.gui.css["mode_header_label"])
|
||||
self.header_label.setAlignment(QtCore.Qt.AlignHCenter)
|
||||
|
||||
self.mode_settings = ModeSettingsWidget(
|
||||
self.mode_settings_widget = ModeSettingsWidget(
|
||||
self.common, self.tab.tab_id, self.tab.mode_settings
|
||||
)
|
||||
self.mode_settings.change_persistent.connect(self.change_persistent)
|
||||
self.mode_settings_widget.change_persistent.connect(self.change_persistent)
|
||||
|
||||
header_layout = QtWidgets.QVBoxLayout()
|
||||
header_layout.setContentsMargins(0, 0, 0, 0)
|
||||
header_layout.addWidget(self.header_label)
|
||||
header_layout.addWidget(self.mode_settings)
|
||||
header_layout.addWidget(self.mode_settings_widget)
|
||||
|
||||
self.header = QtWidgets.QWidget()
|
||||
self.header.setLayout(header_layout)
|
||||
|
@ -57,7 +57,7 @@ class ReceiveMode(Mode):
|
||||
data_dir_layout.addWidget(self.data_dir_lineedit)
|
||||
data_dir_layout.addWidget(data_dir_button)
|
||||
|
||||
self.mode_settings.mode_specific_layout.addLayout(data_dir_layout)
|
||||
self.mode_settings_widget.mode_specific_layout.addLayout(data_dir_layout)
|
||||
|
||||
# Server status
|
||||
self.server_status.set_mode("receive")
|
||||
|
@ -59,7 +59,7 @@ class ShareMode(Mode):
|
||||
self.autostop_sharing_checkbox.setText(
|
||||
strings._("mode_settings_share_autostop_sharing_checkbox")
|
||||
)
|
||||
self.mode_settings.mode_specific_layout.addWidget(
|
||||
self.mode_settings_widget.mode_specific_layout.addWidget(
|
||||
self.autostop_sharing_checkbox
|
||||
)
|
||||
|
||||
|
@ -59,7 +59,9 @@ class WebsiteMode(Mode):
|
||||
self.disable_csp_checkbox.setText(
|
||||
strings._("mode_settings_website_disable_csp_checkbox")
|
||||
)
|
||||
self.mode_settings.mode_specific_layout.addWidget(self.disable_csp_checkbox)
|
||||
self.mode_settings_widget.mode_specific_layout.addWidget(
|
||||
self.disable_csp_checkbox
|
||||
)
|
||||
|
||||
# File selection
|
||||
self.file_selection = FileSelection(self.common, self)
|
||||
|
@ -496,7 +496,7 @@ class Tab(QtWidgets.QWidget):
|
||||
if self.mode is None:
|
||||
return True
|
||||
|
||||
if self.tab_settings["persistent"]["enabled"]:
|
||||
if self.mode_settings.get("persistent", "enabled"):
|
||||
dialog_text = strings._("gui_close_tab_warning_persistent_description")
|
||||
else:
|
||||
server_status = self.get_mode().server_status
|
||||
|
Loading…
Reference in New Issue
Block a user