Catalan updates

This commit is contained in:
Jamie Cameron
2007-11-27 17:38:54 +00:00
parent 57f1d12362
commit bec4d0cc86
2 changed files with 17 additions and 13 deletions

View File

@@ -44,17 +44,8 @@ if (&indexof($pinfo{nice}, @nice_range) < 0) {
print $pinfo{nice};
}
else {
print "<select name=nice>\n";
for($i=0; $i<@nice_range; $i++) {
printf "<option value=%d %s>%d%s\n",
$nice_range[$i],
$pinfo{nice} == $nice_range[$i] ? "selected" : "",
$nice_range[$i],
$i==0 ? " ($text{'edit_prihigh'})" :
$i==@nice_range-1 ? " ($text{'edit_prilow'})" :
$nice_range[$i]==0 ? " ($text{'edit_pridef'})" : "";
}
print "</select> <input type=submit value='$text{'edit_change'}'>\n";
print &nice_selector("nice", $pinfo{nice});
print &ui_submit($text{'edit_change'});
}
print "</td> </form></tr>\n";
$i = 0;

View File

@@ -215,8 +215,8 @@ else {
}
}
elsif ($sel == 0) {
# nothing to read. maybe the process is done, and a subprocess
# is hanging things up
# nothing to read. maybe the process is done, and a
# subprocess is hanging things up
last if (!kill(0, $pid));
}
if ($_[7] && time() - $start > $_[7]) {
@@ -570,5 +570,18 @@ else {
}
}
# nice_selector(name, value)
# Returns a menu for selecting a nice level
sub nice_selector
{
local ($name, $value) = @_;
local $l = scalar(@nice_range);
return &ui_select($name, $value,
[ map { [ $_, $_.($_ == $nice_range[0] ? " ($text{'edit_prihigh'})" :
$_ == 0 ? " ($text{'edit_pridef'})" :
$_ == $nice_range[$l-1] ? " ($text{'edit_prilow'})" :
"") ] } @nice_range ]);
}
1;