extensions-tool: Add template metadata
When we allow users to choose between different templates, we should provide some context for each template to facilitate that choice. Add that metadata in the form of a .desktop file, which allows us to specify name and description, and is well supported by our translation infrastructure. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/812
This commit is contained in:
parent
37c6fbc6b2
commit
f9bee05d49
@ -94,5 +94,6 @@ subprojects/extensions-tool/src/command-prefs.c
|
||||
subprojects/extensions-tool/src/command-reset.c
|
||||
subprojects/extensions-tool/src/command-uninstall.c
|
||||
subprojects/extensions-tool/src/main.c
|
||||
subprojects/extensions-tool/src/templates/00-plain.desktop.in
|
||||
# Please do not remove this file from POTFILES.in. Run "git submodule init && git submodule update" to get it.
|
||||
subprojects/gvc/gvc-mixer-control.c
|
||||
|
@ -35,6 +35,8 @@ cc = meson.get_compiler('c')
|
||||
|
||||
bash_completion = dependency('bash-completion', required: get_option('bash_completion'))
|
||||
|
||||
po_dir = meson.source_root() + '/po'
|
||||
|
||||
subdir('src')
|
||||
|
||||
if bash_completion.found()
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<gresources>
|
||||
<gresource prefix="/org/gnome/extensions-tool">
|
||||
<file>templates/00-plain.desktop</file>
|
||||
<file>templates/plain/extension.js</file>
|
||||
<file>templates/plain/stylesheet.css</file>
|
||||
</gresource>
|
||||
|
@ -22,9 +22,12 @@ sources = [
|
||||
'main.c'
|
||||
]
|
||||
|
||||
subdir('templates')
|
||||
|
||||
resources = gnome.compile_resources('resources',
|
||||
'gnome-extensions-tool.gresource.xml',
|
||||
source_dir: '.'
|
||||
source_dir: ['.', meson.current_build_dir()],
|
||||
dependencies: template_deps,
|
||||
)
|
||||
|
||||
executable('gnome-extensions',
|
||||
|
@ -0,0 +1,5 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Plain
|
||||
Comment=An empty extension
|
||||
Path=plain
|
12
subprojects/extensions-tool/src/templates/meson.build
Normal file
12
subprojects/extensions-tool/src/templates/meson.build
Normal file
@ -0,0 +1,12 @@
|
||||
template_metas = [
|
||||
'00-plain.desktop',
|
||||
]
|
||||
template_deps = []
|
||||
foreach template : template_metas
|
||||
template_deps += i18n.merge_file(template,
|
||||
input: template + '.in',
|
||||
output: template,
|
||||
po_dir: po_dir,
|
||||
type: 'desktop',
|
||||
)
|
||||
endforeach
|
Loading…
Reference in New Issue
Block a user