Closed
Bug 125078
Opened 23 years ago
Closed 23 years ago
Implement InitPrintSettingsFromPrinter for GTK+/Xlib
Categories
(Core :: Printing: Output, defect)
Tracking
()
VERIFIED
FIXED
mozilla0.9.9
People
(Reporter: rods, Assigned: roland.mainz)
References
Details
Attachments
(3 files, 3 obsolete files)
72.52 KB,
patch
|
rods
:
review+
attinasi
:
superreview+
|
Details | Diff | Splinter Review |
767 bytes,
patch
|
Details | Diff | Splinter Review | |
2.25 KB,
patch
|
roland.mainz
:
review+
shaver
:
superreview+
asa
:
approval+
|
Details | Diff | Splinter Review |
If GTK PS or XPrint supports being able to get the current default settings for
a printer, then you may want to implement this.
Settings such as Page Orientation, Page Size, number of copies etc.
The idea is to get them from the printer and set them into the PrintSettings
Assignee | ||
Updated•23 years ago
|
Severity: normal → major
Status: NEW → ASSIGNED
OS: Windows 2000 → Linux
Summary: Implement InitPrintSettingsFromPrinter for GTK → Implement InitPrintSettingsFromPrinter for GTK+/Xlib
Target Milestone: --- → mozilla0.9.9
Assignee | ||
Comment 2•23 years ago
|
||
Changes:
- Implemented |InitPrintSettingsFromPrinter()| for both Xprint and PostScript
code
- Added PR_LOG() support to |nsDeviceContextSpecXlib| to watch what it is
doing, including all values stored in |nsIPrintSettings| by
|InitPrintSettingsFromPrinter()|
- Introduced a central repository for the paper sizes supported by the
postscript module (see nsPostScriptObj.h, |postscript_module_paper_sizes|).
This avoids that we always have to change multiple places when we want to
change these values.
- Cleaned up the prefs used by the PostScript module. PostScript module-specfic
prefs are now always using the prefix |print.postscript.|
- PostScript module can now take printer-specific argument.
Example search order when looking up the "paper_size"-prefs for the printer
"foobar":
1. 'print.postscript.printer_foobar.paper_size'
2. 'print.printer_default.paper_size'
3. 'print.postscript.paper_size'
This feature allows the user to set printer-specific defaults (and
module-specific defaults for systems with more than one print module).
- Cleaned-up the |Init()|-method
- Other minor cleanup stuff
Assignee | ||
Updated•23 years ago
|
Attachment #69812 -
Flags: needs-work+
Assignee | ||
Comment 3•23 years ago
|
||
Changes since last patch:
- Implemented |nsPrinterEnumerator[GTK,Xlib]::GetDefaultPrinterName()|.
- Ported Xlib gfx changes over to GTK+ gfx
- Modified printdialog.xul to call |setPrinterDefaultsForSelectedPrinter()| (in
printdialog.js) each time the user changes the selected printer. This function
loads the printer-specific defaults into the nsIPrintSettings
Attachment #69812 -
Attachment is obsolete: true
Assignee | ||
Comment 4•23 years ago
|
||
ToDO:
- Fix the printjoboptionsdialog.js to use a "weak" match to select the paper
size in the loadDialog() function. Currently the code looks like this:
-- snip --
createPaperArray();
var selectedInx = 0;
for (var i=0;i<gPaperArray.length;i++) {
if (print_paper_width == gPaperArray[i].width && print_paper_height ==
gPaperArray[i].height) {
selectedInx = i;
break;
}
}
createPaperSizeList(selectedInx);
-- snip --
This won't work on all platforms due rounding errors. width/height matches
should tolerate a +/-2mm difference and they should convert the paper size to mm
first - for example: PostScript module uses inches for all paper sizes, Xprint
only millimeters for all paper sizes ...
... I'll file a new patch on sunday...
Assignee | ||
Comment 5•23 years ago
|
||
Changes:
- Fixed printjoboptions.js and printjoboptions.xul to find the selected page
size even if they differ +/- 5mm
- Added page sizes DIN-A5, DIN-A2, DIN-A1 and DIN-A0 (I think we should either
query the supported paper sizes from the printer or include all paper sizes
(which are tons out there - we miss the whole DIN-B* and DIN-C* series, some US
formats, all japanese formats etc. etc. - AFAIK more than 90 entries are
missing...))
- Fixed more prefs stuff
Attachment #69829 -
Attachment is obsolete: true
Reporter | ||
Comment 6•23 years ago
|
||
Comment on attachment 70017 [details] [diff] [review]
New patch for 2002-02-13-08-trunk
r=rods
Attachment #70017 -
Flags: review+
Comment 7•23 years ago
|
||
Comment on attachment 70017 [details] [diff] [review]
New patch for 2002-02-13-08-trunk
sr=attinasi
Attachment #70017 -
Flags: superreview+
Assignee | ||
Comment 8•23 years ago
|
||
Changes:
- Fixed a crasher when we delete an non-existing object in the error case
- Added the ability to list per-printer paper sizes in the print job options
dialog (this code is currently only active for Xprint module printers; I am
working for a better solution for PostScript/Xprint/etc. later...)
Attachment #70017 -
Attachment is obsolete: true
Reporter | ||
Comment 9•23 years ago
|
||
Comment on attachment 70357 [details] [diff] [review]
New patch for 2002-02-13-08-trunk
r=rods
Attachment #70357 -
Flags: review+
Comment 10•23 years ago
|
||
Comment on attachment 70357 [details] [diff] [review]
New patch for 2002-02-13-08-trunk
sr=attinasi - make me proud, man...
Attachment #70357 -
Flags: superreview+
nsPostScriptObj.h is included by a C file (font_metrics.c), so you can't use C++
comments or you'll break IRIX (and maybe a few other platforms).
Assignee | ||
Comment 12•23 years ago
|
||
Assignee | ||
Comment 13•23 years ago
|
||
Patches have been checked in, marking bug as FIXED.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 14•23 years ago
|
||
Roland please verify...thanks!
Comment 15•23 years ago
|
||
Roland please verify when you get chance...this is nsbeta1+ bug so its
showing up on the verification radar...
thanks.
Comment 16•23 years ago
|
||
The changes to nsDeviceContextSpecG.cpp with this patch broke the build on AIX
(strings.h is not included, so strcasecmp was not found). Shouldn't the usage of
strcasecmp be changed to nsCRT::strcasecmp?
Assignee | ||
Comment 18•23 years ago
|
||
sujay wrote:
> Roland please verify when you get chance...this is nsbeta1+ bug so its
> showing up on the verification radar..
Sorry, I was away for two days... thanks for marking it VERIFIED... :)
Assignee | ||
Comment 19•23 years ago
|
||
Philip K. Warren wrote:
> The changes to nsDeviceContextSpecG.cpp with this patch broke the build on AIX
> (strings.h is not included, so strcasecmp was not found).
Mhhh, yes... this may happen... xx@@@!!!... ;-(
strings.h is implicitly included via the XprintUtils header, but AIX is one of
the rare platforms which does not ship with libXp.so - which disables the Xprint
support in Mozilla... fun... ;-(
> Shouldn't the usage
> of strcasecmp be changed to nsCRT::strcasecmp?
Most nsCRT::*-stuff is going to die. Please use the NSPR calls (PL_strcasecmp()
in this case) instead if neccesary...
Options:
- Add the missing |#include <strings.h>|
- Switch from |strcasecmp| to |PL_strcasecmp()|
- Enable Xprint support for AIX :)
Comment 20•23 years ago
|
||
switching strcasecmp's to PL_strcasecmp since
strcasecmp is defined in strings.h which is not included
if xprint is not enabled.
I consider this a port bustage (aix doesn't compile) however
I am having problems getting my aix tinderbox running...
Assignee | ||
Comment 21•23 years ago
|
||
Comment on attachment 71919 [details] [diff] [review]
fix for AIX (platforms without xprint)
r=Roland.Mainz@informatik.med.uni-giessen.de
Attachment #71919 -
Flags: review+
Comment 22•23 years ago
|
||
Comment on attachment 71919 [details] [diff] [review]
fix for AIX (platforms without xprint)
sr=shaver.
Attachment #71919 -
Flags: superreview+
Comment 23•23 years ago
|
||
Comment on attachment 71919 [details] [diff] [review]
fix for AIX (platforms without xprint)
a=asa (on behalf of drivers) for checkin to the 1.0 trunk
Attachment #71919 -
Flags: approval+
Comment 24•23 years ago
|
||
Fix checked in
You need to log in
before you can comment on or make changes to this bug.
Description
•