diff --git a/picard/ui/ui_options_renaming.py b/picard/ui/ui_options_renaming.py index 4c54c1db7..756f2a936 100644 --- a/picard/ui/ui_options_renaming.py +++ b/picard/ui/ui_options_renaming.py @@ -55,16 +55,13 @@ class Ui_RenamingOptionsPage(object): self.ascii_filenames = QtWidgets.QCheckBox(RenamingOptionsPage) self.ascii_filenames.setObjectName("ascii_filenames") self.verticalLayout_5.addWidget(self.ascii_filenames) - self.windows_compatibility = QtWidgets.QGroupBox(RenamingOptionsPage) - self.windows_compatibility.setCheckable(True) - self.windows_compatibility.setChecked(False) + self.windows_compatibility = QtWidgets.QCheckBox(RenamingOptionsPage) self.windows_compatibility.setObjectName("windows_compatibility") - self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.windows_compatibility) - self.verticalLayout_2.setObjectName("verticalLayout_2") - self.windows_long_paths = QtWidgets.QCheckBox(self.windows_compatibility) - self.windows_long_paths.setObjectName("windows_long_paths") - self.verticalLayout_2.addWidget(self.windows_long_paths) self.verticalLayout_5.addWidget(self.windows_compatibility) + self.windows_long_paths = QtWidgets.QCheckBox(RenamingOptionsPage) + self.windows_long_paths.setEnabled(False) + self.windows_long_paths.setObjectName("windows_long_paths") + self.verticalLayout_5.addWidget(self.windows_long_paths) self.label_2 = QtWidgets.QLabel(RenamingOptionsPage) self.label_2.setObjectName("label_2") self.verticalLayout_5.addWidget(self.label_2) @@ -144,12 +141,22 @@ class Ui_RenamingOptionsPage(object): self.verticalLayout_5.addLayout(self.horizontalLayout) self.retranslateUi(RenamingOptionsPage) + self.windows_compatibility.toggled['bool'].connect(self.windows_long_paths.setEnabled) # type: ignore QtCore.QMetaObject.connectSlotsByName(RenamingOptionsPage) RenamingOptionsPage.setTabOrder(self.move_files, self.move_files_to) RenamingOptionsPage.setTabOrder(self.move_files_to, self.move_files_to_browse) RenamingOptionsPage.setTabOrder(self.move_files_to_browse, self.move_additional_files) RenamingOptionsPage.setTabOrder(self.move_additional_files, self.move_additional_files_pattern) RenamingOptionsPage.setTabOrder(self.move_additional_files_pattern, self.delete_empty_dirs) + RenamingOptionsPage.setTabOrder(self.delete_empty_dirs, self.rename_files) + RenamingOptionsPage.setTabOrder(self.rename_files, self.ascii_filenames) + RenamingOptionsPage.setTabOrder(self.ascii_filenames, self.windows_compatibility) + RenamingOptionsPage.setTabOrder(self.windows_compatibility, self.windows_long_paths) + RenamingOptionsPage.setTabOrder(self.windows_long_paths, self.naming_script_selector) + RenamingOptionsPage.setTabOrder(self.naming_script_selector, self.open_script_editor) + RenamingOptionsPage.setTabOrder(self.open_script_editor, self.example_filename_before) + RenamingOptionsPage.setTabOrder(self.example_filename_before, self.example_filename_sample_files_button) + RenamingOptionsPage.setTabOrder(self.example_filename_sample_files_button, self.example_filename_after) def retranslateUi(self, RenamingOptionsPage): _translate = QtCore.QCoreApplication.translate @@ -160,7 +167,7 @@ class Ui_RenamingOptionsPage(object): self.delete_empty_dirs.setText(_("Delete empty directories")) self.rename_files.setText(_("Rename files when saving")) self.ascii_filenames.setText(_("Replace non-ASCII characters")) - self.windows_compatibility.setTitle(_("Windows compatibility")) + self.windows_compatibility.setText(_("Windows compatibility")) self.windows_long_paths.setText(_("Allow paths longer than 259 characters")) self.label_2.setText(_("Selected file naming script:")) self.open_script_editor.setText(_("Edit file naming script...")) diff --git a/ui/options_renaming.ui b/ui/options_renaming.ui index 1bb2f5e19..57ae43a6b 100644 --- a/ui/options_renaming.ui +++ b/ui/options_renaming.ui @@ -19,7 +19,7 @@ 0 - + @@ -94,25 +94,20 @@ - - + + Windows compatibility - - true - - + + + + + false - - - - - Allow paths longer than 259 characters - - - - + + Allow paths longer than 259 characters + @@ -308,6 +303,33 @@ move_additional_files move_additional_files_pattern delete_empty_dirs + rename_files + ascii_filenames + windows_compatibility + windows_long_paths + naming_script_selector + open_script_editor + example_filename_before + example_filename_sample_files_button + example_filename_after + + + windows_compatibility + toggled(bool) + windows_long_paths + setEnabled(bool) + + + 226 + 267 + + + 226 + 296 + + + +