mirror of
https://github.com/fergalmoran/picard.git
synced 2025-12-22 09:18:18 +00:00
PICARD-1978: Tags from filenames toolbar action and keyboard shortcuts
Make Tags from filenames optionally available in the toolbar and assign it a keyboard shortcut.
This commit is contained in:
25080
picard/resources.py
25080
picard/resources.py
File diff suppressed because it is too large
Load Diff
@@ -597,7 +597,10 @@ class MainWindow(QtWidgets.QMainWindow, PreserveGeometry):
|
||||
self.enable_tag_saving_action.setChecked(not config.setting["dont_write_tags"])
|
||||
self.enable_tag_saving_action.triggered.connect(self.toggle_tag_saving)
|
||||
|
||||
self.tags_from_filenames_action = QtWidgets.QAction(_("Tags From &File Names..."), self)
|
||||
self.tags_from_filenames_action = QtWidgets.QAction(icontheme.lookup('picard-tags-from-filename'), _("Tags From &File Names..."), self)
|
||||
self.tags_from_filenames_action.setIconText(_("Parse File Names..."))
|
||||
self.tags_from_filenames_action.setToolTip(_('Set tags based on the file names'))
|
||||
self.tags_from_filenames_action.setShortcut(QtGui.QKeySequence(_("Ctrl+Shift+T")))
|
||||
self.tags_from_filenames_action.triggered.connect(self.open_tags_from_filenames)
|
||||
self.tags_from_filenames_action.setEnabled(False)
|
||||
|
||||
|
||||
@@ -122,6 +122,10 @@ class InterfaceOptionsPage(OptionsPage):
|
||||
'label': N_('Lookup CD...'),
|
||||
'icon': 'media-optical'
|
||||
},
|
||||
'tags_from_filenames_action': {
|
||||
'label': N_('Parse File Names...'),
|
||||
'icon': 'picard-tags-from-filename'
|
||||
},
|
||||
}
|
||||
ACTION_NAMES = set(TOOLBAR_BUTTONS.keys())
|
||||
options = [
|
||||
|
||||
BIN
resources/images/16x16/picard-tags-from-filename.png
Normal file
BIN
resources/images/16x16/picard-tags-from-filename.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 638 B |
BIN
resources/images/16x16/picard-tags-from-filename@2x.png
Normal file
BIN
resources/images/16x16/picard-tags-from-filename@2x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
BIN
resources/images/22x22/picard-tags-from-filename.png
Normal file
BIN
resources/images/22x22/picard-tags-from-filename.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 852 B |
BIN
resources/images/22x22/picard-tags-from-filename@2x.png
Normal file
BIN
resources/images/22x22/picard-tags-from-filename@2x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
141
resources/img-src/picard-tags-from-filename.svg
Normal file
141
resources/img-src/picard-tags-from-filename.svg
Normal file
@@ -0,0 +1,141 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
id="Capa_1"
|
||||
x="0px"
|
||||
y="0px"
|
||||
viewBox="0 0 58.981 58.981"
|
||||
style="enable-background:new 0 0 58.981 58.981;"
|
||||
xml:space="preserve"
|
||||
sodipodi:docname="tags-from-filename.svg"
|
||||
inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)"
|
||||
inkscape:export-filename="/home/phw/devel/musicbrainz/picard/resources/images/22x22/picard-tags-from-filename.png"
|
||||
inkscape:export-xdpi="35.810001"
|
||||
inkscape:export-ydpi="35.810001"><metadata
|
||||
id="metadata65"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
|
||||
id="defs63" /><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1848"
|
||||
inkscape:window-height="1016"
|
||||
id="namedview61"
|
||||
showgrid="false"
|
||||
inkscape:zoom="5.6586766"
|
||||
inkscape:cx="-26.408234"
|
||||
inkscape:cy="-14.358615"
|
||||
inkscape:window-x="72"
|
||||
inkscape:window-y="27"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="Capa_1" /><g
|
||||
id="g18"
|
||||
transform="matrix(0.84487756,0,0,0.84487756,20.554278,0)"><polygon
|
||||
id="polygon2"
|
||||
points="0.482,0 0.482,58 45.482,58 45.482,14 31.482,0 "
|
||||
style="fill:#efebde" /><g
|
||||
id="g14"><path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4"
|
||||
d="m 10.482,23 h 25 c 0.552,0 1,-0.447 1,-1 0,-0.553 -0.448,-1 -1,-1 h -25 c -0.552,0 -1,0.447 -1,1 0,0.553 0.447,1 1,1 z"
|
||||
style="fill:#d5d0bb" /><path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path6"
|
||||
d="m 10.482,15 h 10 c 0.552,0 1,-0.447 1,-1 0,-0.553 -0.448,-1 -1,-1 h -10 c -0.552,0 -1,0.447 -1,1 0,0.553 0.447,1 1,1 z"
|
||||
style="fill:#d5d0bb" /><path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path8"
|
||||
d="m 35.482,29 h -25 c -0.552,0 -1,0.447 -1,1 0,0.553 0.448,1 1,1 h 25 c 0.552,0 1,-0.447 1,-1 0,-0.553 -0.448,-1 -1,-1 z"
|
||||
style="fill:#d5d0bb" /><path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path10"
|
||||
d="m 35.482,37 h -25 c -0.552,0 -1,0.447 -1,1 0,0.553 0.448,1 1,1 h 25 c 0.552,0 1,-0.447 1,-1 0,-0.553 -0.448,-1 -1,-1 z"
|
||||
style="fill:#d5d0bb" /><path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path12"
|
||||
d="m 35.482,45 h -25 c -0.552,0 -1,0.447 -1,1 0,0.553 0.448,1 1,1 h 25 c 0.552,0 1,-0.447 1,-1 0,-0.553 -0.448,-1 -1,-1 z"
|
||||
style="fill:#d5d0bb" /></g><polygon
|
||||
id="polygon16"
|
||||
points="31.482,14 45.482,14 31.482,0 "
|
||||
style="fill:#d5d0bb" /></g><g
|
||||
id="g30" /><g
|
||||
id="g32" /><g
|
||||
id="g34" /><g
|
||||
id="g36" /><g
|
||||
id="g38" /><g
|
||||
id="g40" /><g
|
||||
id="g42" /><g
|
||||
id="g44" /><g
|
||||
id="g46" /><g
|
||||
id="g48" /><g
|
||||
id="g50" /><g
|
||||
id="g52" /><g
|
||||
id="g54" /><g
|
||||
id="g56" /><g
|
||||
id="g58" /><g
|
||||
id="g98"
|
||||
transform="matrix(0.72693982,0,0,0.72693982,-1.250131e-4,19.156328)"><path
|
||||
id="path31"
|
||||
d="M 44.472,0.784 H 31.294 L 6.848,25.151 30.582,48.936 55,24.599 V 11.288 Z m -1.457,14.87 c -1.621,0 -2.935,-1.314 -2.935,-2.935 0,-1.621 1.314,-2.935 2.935,-2.935 1.621,0 2.935,1.314 2.935,2.935 0,1.621 -1.314,2.935 -2.935,2.935 z"
|
||||
style="fill:#e3cda4"
|
||||
inkscape:connector-curvature="0" /><polygon
|
||||
id="polygon33"
|
||||
points="30.637,48.898 6.877,25.138 1,30.999 24.734,54.784 "
|
||||
style="fill:#cbb895" /><path
|
||||
id="path35"
|
||||
d="m 43.015,9.784 c 1.621,0 2.935,1.314 2.935,2.935 0,1.621 -1.314,2.935 -2.935,2.935 -1.621,0 -2.935,-1.314 -2.935,-2.935 0,-1.621 1.314,-2.935 2.935,-2.935 m 0,-4 c -3.824,0 -6.935,3.111 -6.935,6.935 0,3.824 3.111,6.935 6.935,6.935 3.824,0 6.935,-3.111 6.935,-6.935 0,-3.824 -3.111,-6.935 -6.935,-6.935 z"
|
||||
style="fill:#bfa380"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
id="path37"
|
||||
d="m 53.866,26.284 c -0.07,-0.121 -0.161,-0.22 -0.266,-0.299 l -1.412,1.398 c 0.526,0.983 4.22,8.578 -2.895,15.694 -2.741,2.739 -9.128,3.895 -13.912,1.172 -4.812,-2.738 -6.378,-8.497 -4.412,-16.218 0.137,-0.535 -0.187,-1.08 -0.722,-1.216 -0.537,-0.143 -1.079,0.187 -1.216,0.722 -2.98,11.703 2.079,16.583 5.36,18.45 2.143,1.219 4.695,1.809 7.215,1.808 3.501,0 6.935,-1.138 9.101,-3.304 8.568,-8.568 3.214,-18.111 3.159,-18.207 z"
|
||||
style="fill:#d75a4a"
|
||||
inkscape:connector-curvature="0" /><path
|
||||
id="path39"
|
||||
d="m 43.764,15.546 c 0.698,-0.185 1.299,-0.61 1.69,-1.195 L 42.6,11.984 C 22.251,-3.278 0.636,11.816 0.419,11.971 c -0.449,0.32 -0.554,0.945 -0.232,1.395 0.322,0.45 0.946,0.554 1.395,0.232 0.203,-0.145 20.627,-14.409 39.78,-0.044 z"
|
||||
style="fill:#d75a4a"
|
||||
inkscape:connector-curvature="0" /><g
|
||||
id="g41">
|
||||
</g><g
|
||||
id="g43">
|
||||
</g><g
|
||||
id="g45">
|
||||
</g><g
|
||||
id="g47">
|
||||
</g><g
|
||||
id="g49">
|
||||
</g><g
|
||||
id="g51">
|
||||
</g><g
|
||||
id="g53">
|
||||
</g><g
|
||||
id="g55">
|
||||
</g><g
|
||||
id="g57">
|
||||
</g><g
|
||||
id="g59">
|
||||
</g><g
|
||||
id="g61">
|
||||
</g><g
|
||||
id="g63">
|
||||
</g><g
|
||||
id="g65">
|
||||
</g><g
|
||||
id="g67">
|
||||
</g><g
|
||||
id="g69">
|
||||
</g></g></svg>
|
||||
|
After Width: | Height: | Size: 5.6 KiB |
@@ -63,6 +63,8 @@
|
||||
<file>images/16x16/picard-cluster@2x.png</file>
|
||||
<file>images/16x16/picard-edit-tags.png</file>
|
||||
<file>images/16x16/picard-edit-tags@2x.png</file>
|
||||
<file>images/16x16/picard-tags-from-filename.png</file>
|
||||
<file>images/16x16/picard-tags-from-filename@2x.png</file>
|
||||
<file>images/16x16/play-music.png</file>
|
||||
<file>images/16x16/play-music@2x.png</file>
|
||||
<file>images/16x16/play.png</file>
|
||||
@@ -117,6 +119,8 @@
|
||||
<file>images/22x22/picard-cluster@2x.png</file>
|
||||
<file>images/22x22/picard-edit-tags.png</file>
|
||||
<file>images/22x22/picard-edit-tags@2x.png</file>
|
||||
<file>images/22x22/picard-tags-from-filename.png</file>
|
||||
<file>images/22x22/picard-tags-from-filename@2x.png</file>
|
||||
<file>images/22x22/play-music.png</file>
|
||||
<file>images/22x22/play-music@2x.png</file>
|
||||
<file>images/22x22/play.png</file>
|
||||
|
||||
Reference in New Issue
Block a user