tweak emitted code for preference metadata
This commit is contained in:
parent
2d74669c7e
commit
89e897a84a
@ -6,16 +6,23 @@ $section = "";
|
|||||||
$heading = "";
|
$heading = "";
|
||||||
$accumulated = "";
|
$accumulated = "";
|
||||||
|
|
||||||
|
print "
|
||||||
|
void
|
||||||
|
UIConfiguration::build_metadata ()
|
||||||
|
{
|
||||||
|
|
||||||
|
#define VAR_META(name,...) { char const * _x[] { __VA_ARGS__ }; all_metadata.insert (std::make_pair<std::string,Metadata> ((name), PBD::upcase (_x))); }\n\n";
|
||||||
|
|
||||||
while (<>) {
|
while (<>) {
|
||||||
if (/\[SECTION:/) {
|
if (/\[SECTION:/) {
|
||||||
chop;
|
chop;
|
||||||
s/\[SECTION://;
|
s/\[SECTION://;
|
||||||
s/\]//;
|
s/\]//;
|
||||||
$section = $_;
|
$section = $_;
|
||||||
print $section, "\n";
|
|
||||||
$in_section = 1;
|
$in_section = 1;
|
||||||
$in_heading = 0;
|
$in_heading = 0;
|
||||||
$heading = "";
|
$heading = "";
|
||||||
|
$accumulated = "";
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -29,7 +36,7 @@ while (<>) {
|
|||||||
if ($accumulated ne "") {
|
if ($accumulated ne "") {
|
||||||
@arr = split (/\s+/, $accumulated);
|
@arr = split (/\s+/, $accumulated);
|
||||||
|
|
||||||
print "VAR_META (X_(\"$heading\"), ";
|
print "\tVAR_META (X_(\"$heading\"), ";
|
||||||
for my $word (@arr) {
|
for my $word (@arr) {
|
||||||
if ($word ne "") {
|
if ($word ne "") {
|
||||||
print "_(\"$word\"), ";
|
print "_(\"$word\"), ";
|
||||||
@ -52,3 +59,5 @@ while (<>) {
|
|||||||
|
|
||||||
$accumulated .= $_;
|
$accumulated .= $_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print "\n}\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user