Bug 130923 ('Xprint refuses to print with the message "Inter nal error"'),

r=db48x, sr=attinasi, a=asa, code from gisburn


git-svn-id: svn://10.0.0.236/trunk@116682 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
leaf%mozilla.org
2002-03-16 02:33:52 +00:00
parent db136cbcaf
commit 2cd30aba06

View File

@@ -1122,14 +1122,13 @@ XpuResolutionList XpuGetResolutionList( Display *pdpy, XPContext pcontext, int *
char *value;
char *tok_lasts;
const char *s;
long default_resolution = 0;
long default_resolution = -1;
int default_resolution_rec_index = -1;
/* Get default document resolution */
if( XpuGetOneLongAttribute(pdpy, pcontext, XPDocAttr, "default-printer-resolution", &default_resolution) != 1 )
{
fprintf(stderr, "XpuGetResolutionList: Internal error, no 'default-printer-resolution' XPDocAttr found.\n");
return(NULL);
default_resolution = -1;
}
value = XpGetOneAttribute(pdpy, pcontext, XPPrinterAttr, "printer-resolutions-supported");
@@ -1161,11 +1160,14 @@ XpuResolutionList XpuGetResolutionList( Display *pdpy, XPContext pcontext, int *
list[rec_count-2].dpi = tmp;
/* Default resolution ? */
if( list[rec_count-2].dpi == default_resolution )
if( default_resolution != -1 )
{
default_resolution_rec_index = rec_count-2;
}
/* Is this the default resolution ? */
if( list[rec_count-2].dpi == default_resolution )
{
default_resolution_rec_index = rec_count-2;
}
}
}
XFree(value);