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)

All
Linux
enhancement
Not set
normal

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...
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.
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" ?
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.
> 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)... :-)
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...
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
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 ?
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.
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 ?
Patches for bug 72087 ("Xprint major revamp...") contain include this patch, too...
Reassining to me, adding dependicy to bug 72087. patches in bug 72087 implement this...
Assignee: katakai → Roland.Mainz
Depends on: 72087
Accepting...
Status: NEW → ASSIGNED
Fixed by patches from bug 72087. katakai - do you verify ?
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Can you change QA contact to me for all bugs you want to ask me verification?
> Can you change QA contact to me for all bugs you want to ask me verification ? OK...
QA Contact: Roland.Mainz → katakai
Verified.
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: