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