Closed
Bug 223243
Opened 21 years ago
Closed 21 years ago
margins pref no longer works
Categories
(Core :: Printing: Output, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: jblanco, Unassigned)
Details
Attachments
(1 file, 2 obsolete files)
2.97 KB,
patch
|
mkaply
:
review+
|
Details | Diff | Splinter Review |
In Mozilla you use to be able to have the following prefs set in all.js and
mozilla would print all documents with no margins.
pref("print.print_margin_bottom", "0.0");
pref("print.print_margin_left", "0.0");
pref("print.print_margin_right", "0.0");
pref("print.print_margin_top", "0.0");
You cannot do this anymore. Now Mozilla will look to see if a specific printer
will have the settings and if not will then set the default margin values to
0.5. I think the above prefs should still be able to be used. They are
generic, not printer specific, and can be used as the default settings for every
printer that's used in Mozilla. This allows the user to set the default printer
margin settings to whatever they wish.
Reporter | ||
Comment 1•21 years ago
|
||
What mozilla does now is look for the specific printer setting and use that
margin setting. If there is no pref set, it will set the margin to 0.5. With my
patch mozilla will look for the specific printer setting first and will use
that margin setting. If the margin pref is not set, it will then look for the
generic pref without the appended printer name and will use that setting. If
there is no specific printer or non specific printer margin pref set, it will
set the margin to 0.5.
Comment on attachment 133855 [details] [diff] [review]
patch to be able to use non printer specific margin prefs
strcmpi is so not portable :)
Attachment #133855 -
Flags: review-
Comment 3•21 years ago
|
||
use:
nsCRT::strcasecmp
Reporter | ||
Comment 4•21 years ago
|
||
Reporter | ||
Updated•21 years ago
|
Attachment #133855 -
Attachment is obsolete: true
Comment on attachment 134042 [details] [diff] [review]
using nsCRT::strcasecmp
> void nsPrintOptions::ReadInchesToTwipsPref(const char * aPrefId,
>- nscoord& aTwips)
>+ nscoord& aTwips,
>+ const char * aMarginPref)
> {
> if (!mPrefBranch) {
> return;
>@@ -1153,6 +1141,8 @@
> aTwips = 0;
> }
> nsMemory::Free(str);
>+ } else if (nsCRT::strcasecmp(aPrefId, aMarginPref) ) {
>+ ReadInchesToTwipsPref(aMarginPref, aTwips, aMarginPref);
> }
> }
sr=dbaron if, instead of adding a recursive call here, you do something like:
nsresult rv = mPrefBranch->GetCharPref(aPrefId, &str);
+ if (NS_FAILED(rv) || !str)
+ rv = mPrefBranch->GetCharPref(aMarginPref, &str);
if (NS_SUCCEEDED(rv) && str) {
Reporter | ||
Comment 6•21 years ago
|
||
Attachment #134042 -
Attachment is obsolete: true
Attachment #134517 -
Flags: review?(mkaply)
Updated•21 years ago
|
Attachment #134517 -
Flags: review?(mkaply) → review+
Comment 7•21 years ago
|
||
I checked this in now
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•