diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2015-07-11 09:43:38 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-02-22 15:31:22 -0500 |
commit | 88fb3c5ac9a99ced3a65659abeab003eb9088a25 (patch) | |
tree | 53e81d5663ca9e70c06d05e03f067de318167483 /tools/fmt-bindings | |
parent | 73170bfc538abfb6840acf99e9c6c82debe9f4d0 (diff) |
improve output format to include required XML boilerplate
Diffstat (limited to 'tools/fmt-bindings')
-rwxr-xr-x | tools/fmt-bindings | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/fmt-bindings b/tools/fmt-bindings index cc053bc131..ce150ee5bd 100755 --- a/tools/fmt-bindings +++ b/tools/fmt-bindings @@ -208,7 +208,9 @@ while (<>) { ($group_key,$group_file,$group_name) = split (/\s+/, $_, 3); if ($make_accelmap && $ardour_bindings) { if (!exists ($group_handles{$group_file})) { - open $group_handles{$group_file}, ">", "gtk2_ardour/" . $group_file . ".bindings" or die "Cannot open bindings file " . $group_file . ".bindings: $!" + + open $group_handles{$group_file}, ">", "gtk2_ardour/" . $group_file . ".bindings" or die "Cannot open bindings file " . $group_file . ".bindings: $!"; + print { $group_handles{$group_file} } "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n <Bindings name=\"ardour-", $group_file , "\">\n <Press>\n"; } $group_files{$group_key} = $group_handles{$group_file} } @@ -281,7 +283,7 @@ while (<>) { $b =~ s/LEVEL4/Level4-/; if (exists ($group_files{$gkey})) { - print { $group_files{$gkey} } "<Binding key=\"" . $b . "\" action=\"" . $action . "\"/>\n"; + print { $group_files{$gkey} } " <Binding key=\"" . $b . "\" action=\"" . $action . "\"/>\n"; } } } @@ -302,6 +304,7 @@ while (<>) { } foreach my $key (keys %group_handles) { + print { $group_handles{$key} } " </Press>\n <Release>\n </Release>\n</Bindings>\n"; close $group_handles{$key} or die "Group file $group_files{$key} not closed!" } |