You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
587 B
Perl
38 lines
587 B
Perl
#!/usr/bin/perl
|
|
|
|
$detailed = 1;
|
|
$namesfirst = 1;
|
|
|
|
while (<>)
|
|
{
|
|
($key, $value) = ($_ =~ /([^=]+)=[ \t]*([^\n]+)/);
|
|
if ($key eq "DetailedMenuEntries")
|
|
{
|
|
if ($value eq "false")
|
|
{
|
|
$detailed = 0;
|
|
}
|
|
}
|
|
elsif ($key eq "DetailedEntriesNamesFirst")
|
|
{
|
|
if ($value eq "false")
|
|
{
|
|
$namesfirst = 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
if (not $detailed)
|
|
{
|
|
print "MenuEntryFormat=NameOnly\n";
|
|
}
|
|
elsif ($namesfirst)
|
|
{
|
|
print "MenuEntryFormat=NameAndDescription\n";
|
|
}
|
|
else
|
|
{
|
|
print "MenuEntryFormat=DescriptionAndName\n";
|
|
}
|
|
|