Community
Participate
Working Groups
Please see bug 25612 for details.
TextViewer clients need a way (API) to say whether they want the shared printer data or not. Given that API freeze has passed this needs to be shifted to 3.6.
Actually before we do that we need the investigate and discuss: - which preferences do want to we remember (e.g. I wouldn't keep page range setting) - do we want the settings only per session or store them so that they are available after workspace restart I've seen all combinations of the above in different tools. Deepak, please do a little investigation to find out what's the most common behavior of modern applications.
I think the following preferences in PrinterData class should be remembered collate copyCount name (printer name) orientation otherData (printer specific data like margins, paper size etc) printToFile Most applications remember these settings only for the current session. The default printer name (the only setting that is remembered across sessions) is set at the system level not at the application level.
>The >default printer name (the only setting that is remembered across sessions) is >set at the system level not at the application level. Right, but some (e.g. Firefox) even remember that (which I think is not good). OK, please go ahead and implement the above settings.
Created attachment 150500 [details] patch
The patch needs some more work: - it's not remembered for the session but per editor - 0 is not a valid value for setStart/EndPage(int) - I prefer to store the correct printer data and then just use that one i.e. reset the corresponding values when assigning to the field
Created attachment 154548 [details] reworked patch
The patch needs some more work: - we group statics together - the "if (fgPrinterData != null)" is not needed, simply reset the values when setting the field as said in my previous comment - as said before, 0 is an illegal value for start/EndPage - after some poking I found that the copy count is also reset by most apps ==> please also reset the copy count
Created attachment 154554 [details] reworked patch Resetting the copyCount to 1 dosent work, I have filed bug 297952 for this.
Created attachment 154558 [details] reworked patch
bug 297957 filed for allowing copying of PrinterData object.
Thanks for the patch. Committed to HEAD with a FIXME comment that we need to copy the printer data. Available in builds > N20091215-2000.
.
Bug 297964 for the dependency on 297957.
Verified for 3.6 M5 with I20100124-2000.