mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-05 16:46:26 +00:00
fix for bug 82041. Navigator pref getting moved back to netscape. r=mcafee, a=asa, sr=blake
This commit is contained in:
parent
f6c0b018b6
commit
22aef24a0a
@ -559,7 +559,7 @@ function readRDFString(aDS,aRes,aProp) {
|
|||||||
function ensureDefaultEnginePrefs(aRDF,aDS)
|
function ensureDefaultEnginePrefs(aRDF,aDS)
|
||||||
{
|
{
|
||||||
|
|
||||||
mPrefs = Components.classes["@mozilla.org/preferences;1"].getService(Components.interfaces.nsIPrefBranch);
|
var mPrefs = Components.classes["@mozilla.org/preferences;1"].getService(Components.interfaces.nsIPrefBranch);
|
||||||
var defaultName = mPrefs.getComplexValue("browser.search.defaultenginename" , Components.interfaces.nsIPrefLocalizedString);
|
var defaultName = mPrefs.getComplexValue("browser.search.defaultenginename" , Components.interfaces.nsIPrefLocalizedString);
|
||||||
kNC_Root = aRDF.GetResource("NC:SearchEngineRoot");
|
kNC_Root = aRDF.GetResource("NC:SearchEngineRoot");
|
||||||
kNC_child = aRDF.GetResource("http://home.netscape.com/NC-rdf#child");
|
kNC_child = aRDF.GetResource("http://home.netscape.com/NC-rdf#child");
|
||||||
@ -579,6 +579,7 @@ function ensureSearchPref() {
|
|||||||
|
|
||||||
var rdf = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
|
var rdf = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
|
||||||
var ds = rdf.GetDataSource("rdf:internetsearch");
|
var ds = rdf.GetDataSource("rdf:internetsearch");
|
||||||
|
var mPrefs = Components.classes["@mozilla.org/preferences;1"].getService(Components.interfaces.nsIPrefBranch);
|
||||||
kNC_Name = rdf.GetResource("http://home.netscape.com/NC-rdf#Name");
|
kNC_Name = rdf.GetResource("http://home.netscape.com/NC-rdf#Name");
|
||||||
try {
|
try {
|
||||||
defaultEngine = mPrefs.getCharPref("browser.search.defaultengine");
|
defaultEngine = mPrefs.getCharPref("browser.search.defaultengine");
|
||||||
@ -593,7 +594,7 @@ function getSearchUrl(attr) {
|
|||||||
var rdf=Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
|
var rdf=Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
|
||||||
var ds = rdf.GetDataSource("rdf:internetsearch");
|
var ds = rdf.GetDataSource("rdf:internetsearch");
|
||||||
kNC_Root = rdf.GetResource("NC:SearchEngineRoot");
|
kNC_Root = rdf.GetResource("NC:SearchEngineRoot");
|
||||||
mPrefs = Components.classes["@mozilla.org/preferences;1"].getService(Components.interfaces.nsIPrefBranch);
|
var mPrefs = Components.classes["@mozilla.org/preferences;1"].getService(Components.interfaces.nsIPrefBranch);
|
||||||
var defaultEngine = mPrefs.getCharPref("browser.search.defaultengine");
|
var defaultEngine = mPrefs.getCharPref("browser.search.defaultengine");
|
||||||
engineRes= rdf.GetResource(defaultEngine);
|
engineRes= rdf.GetResource(defaultEngine);
|
||||||
prop = "http://home.netscape.com/NC-rdf#" + attr;
|
prop = "http://home.netscape.com/NC-rdf#" + attr;
|
||||||
|
Loading…
Reference in New Issue
Block a user