Closed Bug 885759 Opened 11 years ago Closed 11 years ago

Print header / footer strings get saved to about:config prefs like "print_headerleft", not "print.print_headerleft"

Categories

(Core :: Printing: Setup, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 720134

People

(Reporter: dholbert, Unassigned)

Details

STR: 1. Search about:config for print_header You'll notice that we have these prefs print.print_headerleft, print.print_headercenter, print.print_headerright (Now, we'll do the UI actions that we'd expect to change these prefs.) 2. Visit e.g. about:blank 3. File | Print 4. Click the "Options" tab on print dialog (on linux, at least) 5. Change the upper-left "Header and Footer" option to "Custom" and type in your own custom value 6. Complete the print ooperation. 7. Return to about:config, and search for print_header ACTUAL RESULTS: The original prefs are still there, but now there are also these three prefs: print_headercenter print_headerleft print_headerright with no "print." prefix. The customized one has your customized value, and the un-customized ones have the same default values as the print.print_header* prefs. EXPECTED RESULTS: I'm pretty sure we're intending to save these values back to the "print.print_header*" prefs, not to these un-print.-prefixed prefs. The feature seems to work as expected, regardless -- i.e. my next print operation still shows my customized header value. So I suspect we're completely ignoring the print.-prefixed versions, and instead we're reading & writing to the unprefixed versions. (and we're getting the default value from somewhere else when the unprefixed versions aren't present)
The "print." prefix used to be hard-coded. Bug 128142 changed them to add a "GetPrefName()" method which adds the prefix. Then bug 203937 removed the prefix-adding part of GetPrefName(), because we were already getting our handle on the pref DB with the "print." prefix already baked in (via prefService->GetBranch("print.", ...), in the constructor. Bug 297277 moved that GetBranch("print.", ...) call to Init(). And then bug 656826 removed that call entirely, and doesn't seem to have replaced it with any auto-"print."-prefixing thing: http://hg.mozilla.org/mozilla-central/rev/8b60dc275a20#l5.40 And that bug is already marked as blocking bug 720134, which this bug appears to be a dupe of.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.