Closed
Bug 70318
Opened 24 years ago
Closed 24 years ago
user_pref("print.print_method", x); should default to x=1 if XP* vars are set...
Categories
(Core Graveyard :: Printing: Xprint, enhancement)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: roland.mainz, Assigned: roland.mainz)
References
Details
Attachments
(1 file)
"print.print_method" variable should default to 1 if user has a configured and
working X11 print system, e.g. that XPSERVERLIST env var is set (current Xprint
module in Mozilla uses XPDISPLAY - but this is non-standard and will be removed
_soon_... :-)
I am simply tired of setting user_pref("print.print_method", 1); in prefs.js
after each new Mozilla build... =:-)
Offer: Please give me a hint where the code sits which sets the "default" for
"print.print_method" (usally "0") and I create a patch...
Comment 1•24 years ago
|
||
I'm not sure looking environmen variable is good and standard way
in Mozilla, but it could be one of solution.
Try to search by print.print_method,
http://lxr.mozilla.org/mozilla/search?string=print.print_method
I believe gfx/gtk has the codes so, shall we move this to xprint
component? Browser/Preferences is not proper for this issue, I think.
Assignee | ||
Comment 2•24 years ago
|
||
Uhm.. I'd like to control the default value returned by
"pPrefs->GetIntPref("print.print_method", &method);" if "print.print_method" has
not been set...
And a "lxr" search fails in that case - and I do not know exactly where the
matching code may be located...
> Browser/Preferences is not proper for this issue, I think.
What about "Preferences: Backend" ?
Comment 3•24 years ago
|
||
Do you mean you want to change the codes of GetIntPref()?
I understand we should change the codes around
pPrefs->GetIntPref("print.print_method", &method) in gfx/gtk.
If print.print_method isn't set in user preference, then
check XPrint setting is usable or not. If it's avalable, use Xprint.
Assignee | ||
Comment 4•24 years ago
|
||
> Do you mean you want to change the codes of GetIntPref()?
No... I assume somewhere hidden in the code is some way to define defaults...
> I understand we should change the codes around
> pPrefs->GetIntPref("print.print_method", &method) in gfx/gtk.
> If print.print_method isn't set in user preference, then
> check XPrint setting is usable or not. If it's avalable, use Xprint.
AFAIK this is indicated by the XPSERVERLIST env var. Set it (with displays to
useable Xservers with PRINT extension) and you want to use Xprint (in
Mozilla)... :-)
Assignee | ||
Comment 5•24 years ago
|
||
Clarification (based on chat questions):
I do not want to store something permanent in prefs.js - I only want to supply a
(variable) default value (based on the existance of XPSERVERLIST env var) if
print.print_method is _not_ set in prefs.js...
![]() |
||
Comment 6•24 years ago
|
||
Not sure if that's what you want, but... see
http://lxr.mozilla.org/seamonkey/source/modules/libpref/src/unix/unix.js
http://lxr.mozilla.org/seamonkey/source/modules/libpref/src/init/all.js
and in general http://lxr.mozilla.org/seamonkey/source/modules/libpref/src/
let's leave this in xprint land. preferences [backend] aren't for this sort of
stuff
Assignee: matt → katakai
Component: Preferences → Printing: Xprint
QA Contact: sairuh → Roland.Mainz
Assignee | ||
Comment 8•24 years ago
|
||
Can anyone explain how to peek shell env vars within JavaScript
(http://lxr.mozilla.org/seamonkey/source/modules/libpref/src/unix/unix.js would
be one canidate for implementing this...) ?
If that is not possible we have to do that directly in Mozilla (C++ code)...
BTW: Does 'pPrefs->GetIntPref("print.print_method", &method);' alter "method"
variable if "print.print_method" was not set in the *.js config files ?
Comment 9•24 years ago
|
||
I don't think it is possible to change for prefs to look for env variable.
We should do this in gfx/gtk, gfx/xprint layer.
Assignee | ||
Comment 10•24 years ago
|
||
Assignee | ||
Comment 11•24 years ago
|
||
Created patch for 2001-03-03-08-Mtrunk.
This patch simply introduces a new macro (NS_DEFAULT_PRINT_METHOD) which selects
the default print system based on the existance of the XPSERVERLIST env var:
#define NS_DEFAULT_PRINT_METHOD ((getenv("XPSERVERLIST")!=NULL)?(1):(0))
(BTW: Would it be usefull to replace the "0" and "1" by a enumeration ?)
Comments ?
Assignee | ||
Comment 12•24 years ago
|
||
Patches for bug 72087 ("Xprint major revamp...") contain include this patch,
too...
Assignee | ||
Comment 13•24 years ago
|
||
Assignee: katakai → Roland.Mainz
Depends on: 72087
Assignee | ||
Comment 15•24 years ago
|
||
Fixed by patches from bug 72087.
katakai - do you verify ?
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Comment 16•24 years ago
|
||
Can you change QA contact to me for all bugs you want to ask me verification?
Assignee | ||
Comment 17•24 years ago
|
||
> Can you change QA contact to me for all bugs you want to ask me verification ?
OK...
QA Contact: Roland.Mainz → katakai
Updated•17 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•