mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-23 15:47:30 +09:00
Issue #991 Part 1: Pale Moon
This commit is contained in:
parent
c64dc935f9
commit
74e02af5af
7 changed files with 16 additions and 73 deletions
|
|
@ -83,10 +83,7 @@ var gSyncUI = {
|
||||||
_wasDelayed: false,
|
_wasDelayed: false,
|
||||||
|
|
||||||
_needsSetup: function SUI__needsSetup() {
|
_needsSetup: function SUI__needsSetup() {
|
||||||
let firstSync = "";
|
let firstSync = Services.prefs.getCharPref("services.sync.firstSync", "");
|
||||||
try {
|
|
||||||
firstSync = Services.prefs.getCharPref("services.sync.firstSync");
|
|
||||||
} catch (e) { }
|
|
||||||
return Weave.Status.checkSetup() == Weave.CLIENT_NOT_CONFIGURED ||
|
return Weave.Status.checkSetup() == Weave.CLIENT_NOT_CONFIGURED ||
|
||||||
firstSync == "notReady";
|
firstSync == "notReady";
|
||||||
},
|
},
|
||||||
|
|
@ -285,11 +282,7 @@ var gSyncUI = {
|
||||||
if (!syncButton)
|
if (!syncButton)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
let lastSync;
|
let lastSync = Services.prefs.getCharPref("services.sync.lastSync");
|
||||||
try {
|
|
||||||
lastSync = Services.prefs.getCharPref("services.sync.lastSync");
|
|
||||||
}
|
|
||||||
catch (e) { };
|
|
||||||
if (!lastSync || this._needsSetup()) {
|
if (!lastSync || this._needsSetup()) {
|
||||||
syncButton.removeAttribute("tooltiptext");
|
syncButton.removeAttribute("tooltiptext");
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -3628,11 +3628,7 @@
|
||||||
window.addEventListener("resize", this, false);
|
window.addEventListener("resize", this, false);
|
||||||
window.addEventListener("load", this, false);
|
window.addEventListener("load", this, false);
|
||||||
|
|
||||||
try {
|
this._tabAnimationLoggingEnabled = Services.prefs.getBoolPref("browser.tabs.animationLogging.enabled", false);
|
||||||
this._tabAnimationLoggingEnabled = Services.prefs.getBoolPref("browser.tabs.animationLogging.enabled");
|
|
||||||
} catch (ex) {
|
|
||||||
this._tabAnimationLoggingEnabled = false;
|
|
||||||
}
|
|
||||||
this._browserNewtabpageEnabled = Services.prefs.getBoolPref("browser.newtabpage.enabled");
|
this._browserNewtabpageEnabled = Services.prefs.getBoolPref("browser.newtabpage.enabled");
|
||||||
]]>
|
]]>
|
||||||
</constructor>
|
</constructor>
|
||||||
|
|
|
||||||
|
|
@ -38,13 +38,7 @@ DistributionCustomizer.prototype = {
|
||||||
},
|
},
|
||||||
|
|
||||||
get _locale() {
|
get _locale() {
|
||||||
let locale;
|
let locale = this._prefs.getCharPref("general.useragent.locale", "en-US");
|
||||||
try {
|
|
||||||
locale = this._prefs.getCharPref("general.useragent.locale");
|
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
locale = "en-US";
|
|
||||||
}
|
|
||||||
this.__defineGetter__("_locale", function() locale);
|
this.__defineGetter__("_locale", function() locale);
|
||||||
return this._locale;
|
return this._locale;
|
||||||
},
|
},
|
||||||
|
|
@ -221,11 +215,7 @@ DistributionCustomizer.prototype = {
|
||||||
this._ini.getString("Global", "id") + ".bookmarksProcessed";
|
this._ini.getString("Global", "id") + ".bookmarksProcessed";
|
||||||
}
|
}
|
||||||
|
|
||||||
let bmProcessed = false;
|
let bmProcessed = this._prefs.getBoolPref(bmProcessedPref, false);
|
||||||
try {
|
|
||||||
bmProcessed = this._prefs.getBoolPref(bmProcessedPref);
|
|
||||||
}
|
|
||||||
catch (e) {}
|
|
||||||
|
|
||||||
if (!bmProcessed) {
|
if (!bmProcessed) {
|
||||||
if (sections["BookmarksMenu"])
|
if (sections["BookmarksMenu"])
|
||||||
|
|
|
||||||
|
|
@ -18,12 +18,7 @@ function LOG(str) {
|
||||||
var prefB = Cc["@mozilla.org/preferences-service;1"].
|
var prefB = Cc["@mozilla.org/preferences-service;1"].
|
||||||
getService(Ci.nsIPrefBranch);
|
getService(Ci.nsIPrefBranch);
|
||||||
|
|
||||||
var shouldLog = false;
|
var shouldLog = prefB.getBoolPref("feeds.log", false);
|
||||||
try {
|
|
||||||
shouldLog = prefB.getBoolPref("feeds.log");
|
|
||||||
}
|
|
||||||
catch (ex) {
|
|
||||||
}
|
|
||||||
|
|
||||||
if (shouldLog)
|
if (shouldLog)
|
||||||
dump("*** Feeds: " + str + "\n");
|
dump("*** Feeds: " + str + "\n");
|
||||||
|
|
@ -874,11 +869,7 @@ FeedWriter.prototype = {
|
||||||
Cc["@mozilla.org/preferences-service;1"].
|
Cc["@mozilla.org/preferences-service;1"].
|
||||||
getService(Ci.nsIPrefBranch);
|
getService(Ci.nsIPrefBranch);
|
||||||
|
|
||||||
var handler = "bookmarks";
|
var handler = prefs.getCharPref(getPrefReaderForType(feedType), "bookmarks");
|
||||||
try {
|
|
||||||
handler = prefs.getCharPref(getPrefReaderForType(feedType));
|
|
||||||
}
|
|
||||||
catch (ex) { }
|
|
||||||
|
|
||||||
switch (handler) {
|
switch (handler) {
|
||||||
case "web": {
|
case "web": {
|
||||||
|
|
@ -1076,11 +1067,7 @@ FeedWriter.prototype = {
|
||||||
.addEventListener("command", this, false);
|
.addEventListener("command", this, false);
|
||||||
|
|
||||||
// first-run ui
|
// first-run ui
|
||||||
var showFirstRunUI = true;
|
var showFirstRunUI = prefs.getBoolPref(PREF_SHOW_FIRST_RUN_UI, true);
|
||||||
try {
|
|
||||||
showFirstRunUI = prefs.getBoolPref(PREF_SHOW_FIRST_RUN_UI);
|
|
||||||
}
|
|
||||||
catch (ex) { }
|
|
||||||
if (showFirstRunUI) {
|
if (showFirstRunUI) {
|
||||||
var textfeedinfo1, textfeedinfo2;
|
var textfeedinfo1, textfeedinfo2;
|
||||||
switch (feedType) {
|
switch (feedType) {
|
||||||
|
|
|
||||||
|
|
@ -436,13 +436,8 @@ WebContentConverterRegistrar.prototype = {
|
||||||
|
|
||||||
// check if it is in the black list
|
// check if it is in the black list
|
||||||
var pb = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch);
|
var pb = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch);
|
||||||
var allowed;
|
var allowed = pb.getBoolPref(PREF_HANDLER_EXTERNAL_PREFIX + "." + aProtocol,
|
||||||
try {
|
pb.getBoolPref(PREF_HANDLER_EXTERNAL_PREFIX + "-default"));
|
||||||
allowed = pb.getBoolPref(PREF_HANDLER_EXTERNAL_PREFIX + "." + aProtocol);
|
|
||||||
}
|
|
||||||
catch (e) {
|
|
||||||
allowed = pb.getBoolPref(PREF_HANDLER_EXTERNAL_PREFIX + "-default");
|
|
||||||
}
|
|
||||||
if (!allowed) {
|
if (!allowed) {
|
||||||
// XXX this should be a "security exception" according to spec
|
// XXX this should be a "security exception" according to spec
|
||||||
throw("Not allowed to register a protocol handler for " + aProtocol);
|
throw("Not allowed to register a protocol handler for " + aProtocol);
|
||||||
|
|
|
||||||
|
|
@ -100,20 +100,14 @@ const OVERRIDE_NEW_BUILD_ID = 3;
|
||||||
* OVERRIDE_NONE otherwise.
|
* OVERRIDE_NONE otherwise.
|
||||||
*/
|
*/
|
||||||
function needHomepageOverride(prefb) {
|
function needHomepageOverride(prefb) {
|
||||||
var savedmstone = null;
|
var savedmstone = prefb.getCharPref("browser.startup.homepage_override.mstone", "");
|
||||||
try {
|
|
||||||
savedmstone = prefb.getCharPref("browser.startup.homepage_override.mstone");
|
|
||||||
} catch (e) {}
|
|
||||||
|
|
||||||
if (savedmstone == "ignore")
|
if (savedmstone == "ignore")
|
||||||
return OVERRIDE_NONE;
|
return OVERRIDE_NONE;
|
||||||
|
|
||||||
var mstone = Services.appinfo.platformVersion;
|
var mstone = Services.appinfo.platformVersion;
|
||||||
|
|
||||||
var savedBuildID = null;
|
var savedBuildID = prefb.getCharPref("browser.startup.homepage_override.buildID", "");
|
||||||
try {
|
|
||||||
savedBuildID = prefb.getCharPref("browser.startup.homepage_override.buildID");
|
|
||||||
} catch (e) {}
|
|
||||||
|
|
||||||
var buildID = Services.appinfo.platformBuildID;
|
var buildID = Services.appinfo.platformBuildID;
|
||||||
|
|
||||||
|
|
@ -550,10 +544,7 @@ nsBrowserContentHandler.prototype = {
|
||||||
// URL if we do end up showing an overridePage. This makes it possible
|
// URL if we do end up showing an overridePage. This makes it possible
|
||||||
// to have the overridePage's content vary depending on the version we're
|
// to have the overridePage's content vary depending on the version we're
|
||||||
// upgrading from.
|
// upgrading from.
|
||||||
let old_mstone = "unknown";
|
let old_mstone = Services.prefs.getCharPref("browser.startup.homepage_override.mstone", "unknown");
|
||||||
try {
|
|
||||||
old_mstone = Services.prefs.getCharPref("browser.startup.homepage_override.mstone");
|
|
||||||
} catch (ex) {}
|
|
||||||
let override = needHomepageOverride(prefb);
|
let override = needHomepageOverride(prefb);
|
||||||
if (override != OVERRIDE_NONE) {
|
if (override != OVERRIDE_NONE) {
|
||||||
switch (override) {
|
switch (override) {
|
||||||
|
|
|
||||||
|
|
@ -990,14 +990,8 @@ BrowserGlue.prototype = {
|
||||||
// An import operation is about to run.
|
// An import operation is about to run.
|
||||||
// Don't try to recreate smart bookmarks if autoExportHTML is true or
|
// Don't try to recreate smart bookmarks if autoExportHTML is true or
|
||||||
// smart bookmarks are disabled.
|
// smart bookmarks are disabled.
|
||||||
var autoExportHTML = false;
|
var autoExportHTML = Services.prefs.getBoolPref("browser.bookmarks.autoExportHTML", false);
|
||||||
try {
|
var smartBookmarksVersion = Services.prefs.getIntPref("browser.places.smartBookmarksVersion", 0);
|
||||||
autoExportHTML = Services.prefs.getBoolPref("browser.bookmarks.autoExportHTML");
|
|
||||||
} catch(ex) {}
|
|
||||||
var smartBookmarksVersion = 0;
|
|
||||||
try {
|
|
||||||
smartBookmarksVersion = Services.prefs.getIntPref("browser.places.smartBookmarksVersion");
|
|
||||||
} catch(ex) {}
|
|
||||||
if (!autoExportHTML && smartBookmarksVersion != -1)
|
if (!autoExportHTML && smartBookmarksVersion != -1)
|
||||||
Services.prefs.setIntPref("browser.places.smartBookmarksVersion", 0);
|
Services.prefs.setIntPref("browser.places.smartBookmarksVersion", 0);
|
||||||
|
|
||||||
|
|
@ -1556,10 +1550,7 @@ BrowserGlue.prototype = {
|
||||||
const MAX_RESULTS = 10;
|
const MAX_RESULTS = 10;
|
||||||
|
|
||||||
// Get current smart bookmarks version. If not set, create them.
|
// Get current smart bookmarks version. If not set, create them.
|
||||||
let smartBookmarksCurrentVersion = 0;
|
let smartBookmarksCurrentVersion = Services.prefs.getIntPref(SMART_BOOKMARKS_PREF, 0);
|
||||||
try {
|
|
||||||
smartBookmarksCurrentVersion = Services.prefs.getIntPref(SMART_BOOKMARKS_PREF);
|
|
||||||
} catch(ex) {}
|
|
||||||
|
|
||||||
// If version is current or smart bookmarks are disabled, just bail out.
|
// If version is current or smart bookmarks are disabled, just bail out.
|
||||||
if (smartBookmarksCurrentVersion == -1 ||
|
if (smartBookmarksCurrentVersion == -1 ||
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue