From d6b689eaf158d942bcbd8f5849b1f0571bf1c955 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Mon, 31 Jan 2022 23:55:57 +0100 Subject: [PATCH] build: Replace array with dict It's more readable than "magic" indexes, and makes it easier to provide fallback values for optional entries. Part-of: --- data/meson.build | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/data/meson.build b/data/meson.build index 76ae45c93..c4264e015 100644 --- a/data/meson.build +++ b/data/meson.build @@ -48,16 +48,19 @@ subdir('icons') subdir('theme') data_resources = [ - ['dbus-interfaces', []], - ['osk-layouts', []], - ['theme', theme_deps] + {'name': 'dbus-interfaces'}, + {'name': 'osk-layouts'}, + {'name': 'theme', 'deps': theme_deps} ] foreach resource : data_resources + name = resource.get('name') + deps = resource.get('deps', []) + gnome.compile_resources( - 'gnome-shell-' + resource[0], - 'gnome-shell-@0@.gresource.xml'.format(resource[0]), - source_dir: resource[0], - dependencies: resource[1], + 'gnome-shell-' + name, + 'gnome-shell-@0@.gresource.xml'.format(name), + source_dir: name, + dependencies: deps, gresource_bundle: true, install: true, install_dir: pkgdatadir