mirror of
https://github.com/fergalmoran/picard.git
synced 2026-02-19 06:03:59 +00:00
Use MainAction.* to define DEFAULT_TOOLBAR_LAYOUT
This commit is contained in:
@@ -49,6 +49,7 @@ from picard.i18n import N_
|
||||
from picard.util import system_supports_long_paths
|
||||
from picard.util.cdrom import get_default_cdrom_drives
|
||||
|
||||
from picard.ui.enums import MainAction
|
||||
from picard.ui.theme import UiTheme
|
||||
|
||||
|
||||
@@ -101,24 +102,24 @@ DEFAULT_STARTING_DIR = QStandardPaths.writableLocation(QStandardPaths.StandardLo
|
||||
|
||||
DEFAULT_THEME_NAME = str(UiTheme.DEFAULT)
|
||||
|
||||
DEFAULT_TOOLBAR_LAYOUT = [
|
||||
'add_directory_action',
|
||||
'add_files_action',
|
||||
'separator',
|
||||
'cluster_action',
|
||||
'separator',
|
||||
'autotag_action',
|
||||
'analyze_action',
|
||||
'browser_lookup_action',
|
||||
'separator',
|
||||
'save_action',
|
||||
'view_info_action',
|
||||
'remove_action',
|
||||
'separator',
|
||||
'cd_lookup_action',
|
||||
'separator',
|
||||
'submit_acoustid_action',
|
||||
]
|
||||
DEFAULT_TOOLBAR_LAYOUT = (
|
||||
MainAction.ADD_DIRECTORY,
|
||||
MainAction.ADD_FILES,
|
||||
'-',
|
||||
MainAction.CLUSTER,
|
||||
'-',
|
||||
MainAction.AUTOTAG,
|
||||
MainAction.ANALYZE,
|
||||
MainAction.BROWSER_LOOKUP,
|
||||
'-',
|
||||
MainAction.SAVE,
|
||||
MainAction.VIEW_INFO,
|
||||
MainAction.REMOVE,
|
||||
'-',
|
||||
MainAction.CD_LOOKUP,
|
||||
'-',
|
||||
MainAction.SUBMIT_ACOUSTID,
|
||||
)
|
||||
|
||||
DEFAULT_TOP_TAGS = [
|
||||
'title',
|
||||
|
||||
@@ -236,7 +236,18 @@ Option('setting', 'interface_colors_dark', InterfaceColors(dark_theme=True).get_
|
||||
|
||||
# picard/ui/options/interface_toolbar.py
|
||||
# Action Toolbar
|
||||
ListOption('setting', 'toolbar_layout', DEFAULT_TOOLBAR_LAYOUT, title=N_("Layout of the tool bar"))
|
||||
|
||||
|
||||
def make_default_toolbar_layout():
|
||||
for e in DEFAULT_TOOLBAR_LAYOUT:
|
||||
if e == '-':
|
||||
yield e
|
||||
else:
|
||||
# we want the string matching the MainAction
|
||||
yield e.value
|
||||
|
||||
|
||||
ListOption('setting', 'toolbar_layout', list(make_default_toolbar_layout()), title=N_("Layout of the tool bar"))
|
||||
|
||||
# picard/ui/options/interface_top_tags.py
|
||||
# Top Tags
|
||||
|
||||
Reference in New Issue
Block a user