Limit resolution choices to dpi
...because nothing else is really supported
This commit is contained in:
parent
65c3ad186d
commit
ed218e5278
1 changed files with 8 additions and 0 deletions
|
@ -156,6 +156,12 @@ function canConvertImageTo(type)
|
||||||
return has(targets, type)
|
return has(targets, type)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function unitsIsDpi(resolution)
|
||||||
|
{
|
||||||
|
return resolution.units == 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function limitChoices(name, choices, mimeType)
|
function limitChoices(name, choices, mimeType)
|
||||||
{
|
{
|
||||||
switch(name) {
|
switch(name) {
|
||||||
|
@ -172,6 +178,8 @@ function limitChoices(name, choices, mimeType)
|
||||||
{
|
{
|
||||||
return ["application/octet-stream"];
|
return ["application/octet-stream"];
|
||||||
}
|
}
|
||||||
|
case "printer-resolution":
|
||||||
|
return choices.filter(unitsIsDpi);
|
||||||
default:
|
default:
|
||||||
return choices;
|
return choices;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue