You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tdebase/kicker/kicker/kicker-3.5-kconfigXTize.pl

38 lines
587 B

#!/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";
}