mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 883390 - Part 1.3 - Move unrelated internal method out of navigation section. r=jimm
--HG-- rename : browser/metro/base/content/bindings/autocomplete.xml => browser/metro/base/content/bindings/urlbar.xml extra : rebase_source : e111ddb2ba4c4e6c95c11ebf063e96c3ecf156c3
This commit is contained in:
parent
2f19e36e3e
commit
36a547693c
@ -316,37 +316,6 @@ var BrowserUI = {
|
||||
return spec;
|
||||
},
|
||||
|
||||
/**
|
||||
* Some prefs that have consequences in both Metro and Desktop such as
|
||||
* app-update prefs, are automatically pulled from Desktop here.
|
||||
*/
|
||||
_pullDesktopControlledPrefs: function() {
|
||||
function pullDesktopControlledPrefType(prefType, prefFunc) {
|
||||
try {
|
||||
registry.create(Ci.nsIWindowsRegKey.ROOT_KEY_CURRENT_USER,
|
||||
"Software\\Mozilla\\Firefox\\Metro\\Prefs\\" + prefType,
|
||||
Ci.nsIWindowsRegKey.ACCESS_ALL);
|
||||
for (let i = 0; i < registry.valueCount; i++) {
|
||||
let prefName = registry.getValueName(i);
|
||||
let prefValue = registry.readStringValue(prefName);
|
||||
if (prefType == Ci.nsIPrefBranch.PREF_BOOL) {
|
||||
prefValue = prefValue == "true";
|
||||
}
|
||||
Services.prefs[prefFunc](prefName, prefValue);
|
||||
}
|
||||
} catch (ex) {
|
||||
Util.dumpLn("Could not pull for prefType " + prefType + ": " + ex);
|
||||
} finally {
|
||||
registry.close();
|
||||
}
|
||||
}
|
||||
let registry = Cc["@mozilla.org/windows-registry-key;1"].
|
||||
createInstance(Ci.nsIWindowsRegKey);
|
||||
pullDesktopControlledPrefType(Ci.nsIPrefBranch.PREF_INT, "setIntPref");
|
||||
pullDesktopControlledPrefType(Ci.nsIPrefBranch.PREF_BOOL, "setBoolPref");
|
||||
pullDesktopControlledPrefType(Ci.nsIPrefBranch.PREF_STRING, "setCharPref");
|
||||
},
|
||||
|
||||
/* Set the location to the current content */
|
||||
updateURI: function(aOptions) {
|
||||
aOptions = aOptions || {};
|
||||
@ -595,6 +564,37 @@ var BrowserUI = {
|
||||
* Internal utils
|
||||
*/
|
||||
|
||||
/**
|
||||
* Some prefs that have consequences in both Metro and Desktop such as
|
||||
* app-update prefs, are automatically pulled from Desktop here.
|
||||
*/
|
||||
_pullDesktopControlledPrefs: function() {
|
||||
function pullDesktopControlledPrefType(prefType, prefFunc) {
|
||||
try {
|
||||
registry.create(Ci.nsIWindowsRegKey.ROOT_KEY_CURRENT_USER,
|
||||
"Software\\Mozilla\\Firefox\\Metro\\Prefs\\" + prefType,
|
||||
Ci.nsIWindowsRegKey.ACCESS_ALL);
|
||||
for (let i = 0; i < registry.valueCount; i++) {
|
||||
let prefName = registry.getValueName(i);
|
||||
let prefValue = registry.readStringValue(prefName);
|
||||
if (prefType == Ci.nsIPrefBranch.PREF_BOOL) {
|
||||
prefValue = prefValue == "true";
|
||||
}
|
||||
Services.prefs[prefFunc](prefName, prefValue);
|
||||
}
|
||||
} catch (ex) {
|
||||
Util.dumpLn("Could not pull for prefType " + prefType + ": " + ex);
|
||||
} finally {
|
||||
registry.close();
|
||||
}
|
||||
}
|
||||
let registry = Cc["@mozilla.org/windows-registry-key;1"].
|
||||
createInstance(Ci.nsIWindowsRegKey);
|
||||
pullDesktopControlledPrefType(Ci.nsIPrefBranch.PREF_INT, "setIntPref");
|
||||
pullDesktopControlledPrefType(Ci.nsIPrefBranch.PREF_BOOL, "setBoolPref");
|
||||
pullDesktopControlledPrefType(Ci.nsIPrefBranch.PREF_STRING, "setCharPref");
|
||||
},
|
||||
|
||||
_adjustDOMforViewState: function() {
|
||||
if (MetroUtils.immersive) {
|
||||
let currViewState = "";
|
||||
|
Loading…
Reference in New Issue
Block a user