Closed Bug 312763 Opened 19 years ago Closed 19 years ago

When changing Page Setup in FF 1.5 b2, the settings are not saved

Categories

(Firefox :: Settings UI, defect)

1.5.0.x Branch
PowerPC
macOS
defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox1.5rc1

People

(Reporter: nick.kreeger, Assigned: mark)

References

Details

(Keywords: fixed1.8, regression)

Attachments

(1 file)

When changing the page setup options in FF 1.5 b2, the settings are not saved
when the dialog is opened back up (File->Page Setup).

Steps to Reproduce:
1. Change Page Setup options
2. Click OK
3. Open back up Page Setup and notice the settings did not save
I originally fixed this in bug 306370, it regressed since then.
Flags: blocking1.8rc1?
Target Milestone: --- → Firefox1.5rc1
Version: unspecified → 1.5 Branch
Keywords: regression
This is a regression since 1.5b1.
Attached patch FixSplinter Review
Regression window, 100306 - 100405.

http://bonsai.mozilla.org/cvsquery.cgi?branch=MOZILLA_1_8_BRANCH&date=explicit&mindate=2005-10-03+05%3A00&maxdate=2005-10-04+06%3A00


This was caused by bug 267422, which removed savePrintSettings following
showPageSetup in printUtils.js.  That was done because kInitSaveNativeData was
thought to be useless (bug 267422 comment 54), which may be the case on other
platforms, but is most definitely not on the Mac.  On the Mac, Page Setup data
is considered a native setting, and preferences like print.print_orientation
aren't used at all.
Attachment #199872 - Flags: review?(bugs.mano)
Blocks: 267422
we wouldn't stop ship for this bug. But, if you get a reviewed and trunk
verified patch, come back tomorrow and nominate the patch for branch approval
and we'd probably take it. 
Flags: blocking1.8rc1? → blocking1.8rc1-
(In reply to comment #3)
> This was caused by bug 267422, which removed savePrintSettings following
> showPageSetup in printUtils.js.  That was done because kInitSaveNativeData was
> thought to be useless (bug 267422 comment 54), which may be the case on other
> platforms, but is most definitely not on the Mac.  On the Mac, Page Setup data
> is considered a native setting, and preferences like print.print_orientation
> aren't used at all.

I don't see where the magic is to handle kInitSaveNativeData:
http://lxr.mozilla.org/mozilla1.8/search?string=kInitSaveNativeData -- is there
some magic that I'm missing somewhere?  I see various references to
MAC_OS_X_PAGE_SETUP_PREFNAME off the PRINTING_PREF_BRANCH in
ReadPageFormatFromPrefs/WritePageFormatToPrefs in nsPrintSettingsX..
Comment on attachment 199872 [details] [diff] [review]
Fix

So, two questions here:
1. Do we really need to check for  printSettingsAreGlobal? if one sets is to be
false (that is, print settings per window), the page setup setting wouldn't be
remembered at all.

2. similar questions on the second arg.
(In reply to comment #6)
> (From update of attachment 199872 [details] [diff] [review] [edit])
> So, two questions here:
> 1. Do we really need to check for  printSettingsAreGlobal? if one sets is to be
> false (that is, print settings per window), the page setup setting wouldn't be
> remembered at all.

I don't understand the purpose of printSettingsAreGlobal (or rather, of
non-global print settings).  Doing per-window print settings seems pretty
counterintuitive..
(In reply to comment #5)
We do this in nsPrintOptionsX::WritePrefs, which isn't getting called at all
after a Page Setup now.  It's actually not gated on kInitSaveNativeData, though
possibly it should be (along with other constants).
That makes three of us that don't know what the story is with
use_global_printsettings.  I included it because the old behavior respected that
setting, and I don't want to break anyone that might be relying on it,
especially at this stage of the game.  Considering all of the reinitialization
that goes on now, I would't be surprised if setting use_global_printsettings no
longer has the intended effect.  Possibly, the same goes for save_print_settings.
(In reply to comment #7)
> Doing per-window print settings seems pretty counterintuitive..

Prolly why it's not the default. ;)


(In reply to comment #9)
> That makes three of us that don't know what the story is with
> use_global_printsettings.  I included it because the old behavior respected that
> setting, and I don't want to break anyone that might be relying on it,
> especially at this stage of the game.  Considering all of the reinitialization
> that goes on now, I would't be surprised if setting use_global_printsettings no
> longer has the intended effect.  Possibly, the same goes for save_print_settings.

In any case, this patch doesn't affect other platforms (see the XP
implementation of WritePrefs), not relying on it for mac native settings should
be safe, even now.
(In reply to comment #10)
> In any case, this patch doesn't affect other platforms (see the XP
> implementation of WritePrefs), not relying on it for mac native settings
> should be safe, even now.

OK, so I can either whack printSettingsAreGlobal and leave kInitSaveNativeData,
or replace kInitSaveNativeData with 0 and leave printSettingsAreGlobal in place.
 My preference is for the former, because kInitSaveNativeData helps the intent
of the code read more easily.  That's this change:

-+      if (gPrintSettingsAreGlobal && gSavePrintSettings) {
++      if (gSavePrintSettings) {
Comment on attachment 199872 [details] [diff] [review]
Fix

very well. r=mano with comment 11.
Attachment #199872 - Flags: review?(bugs.mano) → review+
Fixed on the trunk.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Comment on attachment 199872 [details] [diff] [review]
Fix

Ready for the branch.
Attachment #199872 - Flags: approval1.8rc1?
In order to help us evaluate this bug, can you help us by including the
information we included at the top of tinderbox:
* to request drivers' approval, set the attachment flag to approval1.8rc1?.
* include a comment about the value, the risk, and any existing testing.
* land changes and get them verified on the trunk before requesting branch approval.
Thanks.
Verified, trunk 101905.  No risk in restoring a line that was present until a
few weeks ago.  The removal and reintroduction of saving in this way after
showing the page setup dialog only affects the Mac.
Status: RESOLVED → VERIFIED
Attachment #199872 - Flags: approval1.8rc1? → approval1.8rc1+
Fixed on the 1.8 branch.
Keywords: fixed1.8
*** Bug 313117 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: