mirror of
https://github.com/fergalmoran/picard.git
synced 2026-02-17 13:13:58 +00:00
PICARD-2206: Fix tab order for option pages
This commit is contained in:
@@ -175,11 +175,11 @@ class ReleasesOptionsPage(OptionsPage):
|
||||
|
||||
def add_slider(name, griditer, context):
|
||||
label = pgettext_attributes(context, name)
|
||||
self._release_type_sliders[name] = \
|
||||
ReleaseTypeScore(self.ui.type_group,
|
||||
self.ui.gridLayout,
|
||||
label,
|
||||
next(griditer))
|
||||
self._release_type_sliders[name] = ReleaseTypeScore(
|
||||
self.ui.type_group,
|
||||
self.ui.gridLayout,
|
||||
label,
|
||||
next(griditer))
|
||||
|
||||
griditer = RowColIter(len(RELEASE_PRIMARY_GROUPS)
|
||||
+ len(RELEASE_SECONDARY_GROUPS)
|
||||
@@ -190,16 +190,25 @@ class ReleasesOptionsPage(OptionsPage):
|
||||
key=lambda v: pgettext_attributes('release_group_secondary_type', v)):
|
||||
add_slider(name, griditer, context='release_group_secondary_type')
|
||||
|
||||
self.reset_preferred_types_btn = QtWidgets.QPushButton(self.ui.type_group)
|
||||
self.reset_preferred_types_btn.setText(_("Reset all"))
|
||||
reset_types_btn = QtWidgets.QPushButton(self.ui.type_group)
|
||||
reset_types_btn.setText(_("Reset all"))
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.reset_preferred_types_btn.sizePolicy().hasHeightForWidth())
|
||||
self.reset_preferred_types_btn.setSizePolicy(sizePolicy)
|
||||
sizePolicy.setHeightForWidth(reset_types_btn.sizePolicy().hasHeightForWidth())
|
||||
reset_types_btn.setSizePolicy(sizePolicy)
|
||||
r, c = next(griditer)
|
||||
self.ui.gridLayout.addWidget(self.reset_preferred_types_btn, r, c, 1, 2)
|
||||
self.reset_preferred_types_btn.clicked.connect(self.reset_preferred_types)
|
||||
self.ui.gridLayout.addWidget(reset_types_btn, r, c, 1, 2)
|
||||
reset_types_btn.clicked.connect(self.reset_preferred_types)
|
||||
|
||||
self.setTabOrder(reset_types_btn, self.ui.country_list)
|
||||
self.setTabOrder(self.ui.country_list, self.ui.preferred_country_list)
|
||||
self.setTabOrder(self.ui.preferred_country_list, self.ui.add_countries)
|
||||
self.setTabOrder(self.ui.add_countries, self.ui.remove_countries)
|
||||
self.setTabOrder(self.ui.remove_countries, self.ui.format_list)
|
||||
self.setTabOrder(self.ui.format_list, self.ui.preferred_format_list)
|
||||
self.setTabOrder(self.ui.preferred_format_list, self.ui.add_formats)
|
||||
self.setTabOrder(self.ui.add_formats, self.ui.remove_formats)
|
||||
|
||||
self.ui.add_countries.clicked.connect(self.add_preferred_countries)
|
||||
self.ui.remove_countries.clicked.connect(self.remove_preferred_countries)
|
||||
|
||||
@@ -139,11 +139,13 @@ class Ui_InterfaceOptionsPage(object):
|
||||
InterfaceOptionsPage.setTabOrder(self.toolbar_multiselect, self.builtin_search)
|
||||
InterfaceOptionsPage.setTabOrder(self.builtin_search, self.use_adv_search_syntax)
|
||||
InterfaceOptionsPage.setTabOrder(self.use_adv_search_syntax, self.quit_confirmation)
|
||||
InterfaceOptionsPage.setTabOrder(self.quit_confirmation, self.starting_directory)
|
||||
InterfaceOptionsPage.setTabOrder(self.quit_confirmation, self.filebrowser_horizontal_autoscroll)
|
||||
InterfaceOptionsPage.setTabOrder(self.filebrowser_horizontal_autoscroll, self.starting_directory)
|
||||
InterfaceOptionsPage.setTabOrder(self.starting_directory, self.starting_directory_path)
|
||||
InterfaceOptionsPage.setTabOrder(self.starting_directory_path, self.starting_directory_browse)
|
||||
InterfaceOptionsPage.setTabOrder(self.starting_directory_browse, self.ui_language)
|
||||
InterfaceOptionsPage.setTabOrder(self.ui_language, self.toolbar_layout_list)
|
||||
InterfaceOptionsPage.setTabOrder(self.ui_language, self.ui_theme)
|
||||
InterfaceOptionsPage.setTabOrder(self.ui_theme, self.toolbar_layout_list)
|
||||
InterfaceOptionsPage.setTabOrder(self.toolbar_layout_list, self.add_button)
|
||||
InterfaceOptionsPage.setTabOrder(self.add_button, self.insert_separator_button)
|
||||
InterfaceOptionsPage.setTabOrder(self.insert_separator_button, self.up_button)
|
||||
|
||||
@@ -3,8 +3,10 @@
|
||||
# Automatically generated - don't edit.
|
||||
# Use `python setup.py build_ui` to update it.
|
||||
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_MetadataOptionsPage(object):
|
||||
def setupUi(self, MetadataOptionsPage):
|
||||
MetadataOptionsPage.setObjectName("MetadataOptionsPage")
|
||||
@@ -83,7 +85,8 @@ class Ui_MetadataOptionsPage(object):
|
||||
QtCore.QMetaObject.connectSlotsByName(MetadataOptionsPage)
|
||||
MetadataOptionsPage.setTabOrder(self.translate_artist_names, self.artist_locale)
|
||||
MetadataOptionsPage.setTabOrder(self.artist_locale, self.standardize_artists)
|
||||
MetadataOptionsPage.setTabOrder(self.standardize_artists, self.convert_punctuation)
|
||||
MetadataOptionsPage.setTabOrder(self.standardize_artists, self.standardize_instruments)
|
||||
MetadataOptionsPage.setTabOrder(self.standardize_instruments, self.convert_punctuation)
|
||||
MetadataOptionsPage.setTabOrder(self.convert_punctuation, self.release_ars)
|
||||
MetadataOptionsPage.setTabOrder(self.release_ars, self.track_ars)
|
||||
MetadataOptionsPage.setTabOrder(self.track_ars, self.va_name)
|
||||
@@ -105,4 +108,3 @@ class Ui_MetadataOptionsPage(object):
|
||||
self.label_7.setText(_("Non-album tracks:"))
|
||||
self.nat_name_default.setText(_("Default"))
|
||||
self.va_name_default.setText(_("Default"))
|
||||
|
||||
|
||||
@@ -124,11 +124,14 @@ class Ui_NetworkOptionsPage(object):
|
||||
|
||||
self.retranslateUi(NetworkOptionsPage)
|
||||
QtCore.QMetaObject.connectSlotsByName(NetworkOptionsPage)
|
||||
NetworkOptionsPage.setTabOrder(self.web_proxy, self.server_host)
|
||||
NetworkOptionsPage.setTabOrder(self.web_proxy, self.proxy_type_http)
|
||||
NetworkOptionsPage.setTabOrder(self.proxy_type_http, self.proxy_type_socks)
|
||||
NetworkOptionsPage.setTabOrder(self.proxy_type_socks, self.server_host)
|
||||
NetworkOptionsPage.setTabOrder(self.server_host, self.server_port)
|
||||
NetworkOptionsPage.setTabOrder(self.server_port, self.username)
|
||||
NetworkOptionsPage.setTabOrder(self.username, self.password)
|
||||
NetworkOptionsPage.setTabOrder(self.password, self.browser_integration)
|
||||
NetworkOptionsPage.setTabOrder(self.password, self.transfer_timeout)
|
||||
NetworkOptionsPage.setTabOrder(self.transfer_timeout, self.browser_integration)
|
||||
NetworkOptionsPage.setTabOrder(self.browser_integration, self.browser_integration_port)
|
||||
NetworkOptionsPage.setTabOrder(self.browser_integration_port, self.browser_integration_localhost_only)
|
||||
|
||||
|
||||
@@ -95,9 +95,13 @@ class Ui_ScriptingOptionsPage(object):
|
||||
self.remove_button.clicked.connect(self.script_list.remove_selected_script)
|
||||
self.enable_tagger_scripts.toggled['bool'].connect(ScriptingOptionsPage.enable_tagger_scripts_toggled)
|
||||
QtCore.QMetaObject.connectSlotsByName(ScriptingOptionsPage)
|
||||
ScriptingOptionsPage.setTabOrder(self.enable_tagger_scripts, self.add_button)
|
||||
ScriptingOptionsPage.setTabOrder(self.add_button, self.script_list)
|
||||
ScriptingOptionsPage.setTabOrder(self.enable_tagger_scripts, self.script_list)
|
||||
ScriptingOptionsPage.setTabOrder(self.script_list, self.tagger_script)
|
||||
ScriptingOptionsPage.setTabOrder(self.tagger_script, self.add_button)
|
||||
ScriptingOptionsPage.setTabOrder(self.add_button, self.scripting_documentation_button)
|
||||
ScriptingOptionsPage.setTabOrder(self.scripting_documentation_button, self.move_up_button)
|
||||
ScriptingOptionsPage.setTabOrder(self.move_up_button, self.move_down_button)
|
||||
ScriptingOptionsPage.setTabOrder(self.move_down_button, self.remove_button)
|
||||
|
||||
def retranslateUi(self, ScriptingOptionsPage):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
|
||||
@@ -107,7 +107,8 @@ class Ui_TagsCompatibilityOptionsPage(object):
|
||||
TagsCompatibilityOptionsPage.setTabOrder(self.enc_utf8, self.enc_utf16)
|
||||
TagsCompatibilityOptionsPage.setTabOrder(self.enc_utf16, self.enc_iso88591)
|
||||
TagsCompatibilityOptionsPage.setTabOrder(self.enc_iso88591, self.id3v23_join_with)
|
||||
TagsCompatibilityOptionsPage.setTabOrder(self.id3v23_join_with, self.write_id3v1)
|
||||
TagsCompatibilityOptionsPage.setTabOrder(self.id3v23_join_with, self.itunes_compatible_grouping)
|
||||
TagsCompatibilityOptionsPage.setTabOrder(self.itunes_compatible_grouping, self.write_id3v1)
|
||||
|
||||
def retranslateUi(self, TagsCompatibilityOptionsPage):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
|
||||
@@ -305,10 +305,12 @@
|
||||
<tabstop>builtin_search</tabstop>
|
||||
<tabstop>use_adv_search_syntax</tabstop>
|
||||
<tabstop>quit_confirmation</tabstop>
|
||||
<tabstop>filebrowser_horizontal_autoscroll</tabstop>
|
||||
<tabstop>starting_directory</tabstop>
|
||||
<tabstop>starting_directory_path</tabstop>
|
||||
<tabstop>starting_directory_browse</tabstop>
|
||||
<tabstop>ui_language</tabstop>
|
||||
<tabstop>ui_theme</tabstop>
|
||||
<tabstop>toolbar_layout_list</tabstop>
|
||||
<tabstop>add_button</tabstop>
|
||||
<tabstop>insert_separator_button</tabstop>
|
||||
|
||||
@@ -166,6 +166,7 @@
|
||||
<tabstop>translate_artist_names</tabstop>
|
||||
<tabstop>artist_locale</tabstop>
|
||||
<tabstop>standardize_artists</tabstop>
|
||||
<tabstop>standardize_instruments</tabstop>
|
||||
<tabstop>convert_punctuation</tabstop>
|
||||
<tabstop>release_ars</tabstop>
|
||||
<tabstop>track_ars</tabstop>
|
||||
|
||||
@@ -272,10 +272,13 @@
|
||||
</widget>
|
||||
<tabstops>
|
||||
<tabstop>web_proxy</tabstop>
|
||||
<tabstop>proxy_type_http</tabstop>
|
||||
<tabstop>proxy_type_socks</tabstop>
|
||||
<tabstop>server_host</tabstop>
|
||||
<tabstop>server_port</tabstop>
|
||||
<tabstop>username</tabstop>
|
||||
<tabstop>password</tabstop>
|
||||
<tabstop>transfer_timeout</tabstop>
|
||||
<tabstop>browser_integration</tabstop>
|
||||
<tabstop>browser_integration_port</tabstop>
|
||||
<tabstop>browser_integration_localhost_only</tabstop>
|
||||
|
||||
@@ -209,9 +209,13 @@
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>enable_tagger_scripts</tabstop>
|
||||
<tabstop>add_button</tabstop>
|
||||
<tabstop>script_list</tabstop>
|
||||
<tabstop>tagger_script</tabstop>
|
||||
<tabstop>add_button</tabstop>
|
||||
<tabstop>scripting_documentation_button</tabstop>
|
||||
<tabstop>move_up_button</tabstop>
|
||||
<tabstop>move_down_button</tabstop>
|
||||
<tabstop>remove_button</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections>
|
||||
|
||||
@@ -236,6 +236,7 @@
|
||||
<tabstop>enc_utf16</tabstop>
|
||||
<tabstop>enc_iso88591</tabstop>
|
||||
<tabstop>id3v23_join_with</tabstop>
|
||||
<tabstop>itunes_compatible_grouping</tabstop>
|
||||
<tabstop>write_id3v1</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
|
||||
Reference in New Issue
Block a user