From 9520ed474ff0b9e315369957eb7cf156b7677706 Mon Sep 17 00:00:00 2001 From: adamp01 Date: Thu, 11 Aug 2022 10:04:24 +0100 Subject: [PATCH] refactor: simplify overlay loading for about:preferences (cherry picked from commit 02b9daab060d607d9b406725635e089f3a88e3ca) --- waterfox/browser/components/WaterfoxGlue.jsm | 19 ++++--------------- .../content/preferences-home.xhtml | 10 ---------- ...-privacy.xhtml => preferences-other.xhtml} | 8 +++++++- .../browser/components/preferences/jar.mn | 6 ++---- ...home.overlay => preferences-other.overlay} | 2 +- .../preferences/preferences-privacy.overlay | 1 - 6 files changed, 14 insertions(+), 32 deletions(-) delete mode 100644 waterfox/browser/components/preferences/content/preferences-home.xhtml rename waterfox/browser/components/preferences/content/{preferences-privacy.xhtml => preferences-other.xhtml} (94%) rename waterfox/browser/components/preferences/{preferences-home.overlay => preferences-other.overlay} (62%) delete mode 100644 waterfox/browser/components/preferences/preferences-privacy.overlay diff --git a/waterfox/browser/components/WaterfoxGlue.jsm b/waterfox/browser/components/WaterfoxGlue.jsm index 216e0aaaebb6..ce2be8a1e71d 100644 --- a/waterfox/browser/components/WaterfoxGlue.jsm +++ b/waterfox/browser/components/WaterfoxGlue.jsm @@ -52,11 +52,8 @@ const WaterfoxGlue = { case "preferences-general": uri = "resource://waterfox/overlays/preferences-general.overlay"; break; - case "preferences-privacy": - uri = "resource://waterfox/overlays/preferences-privacy.overlay"; - break; - case "preferences-home": - uri = "resource://waterfox/overlays/preferences-home.overlay"; + case "preferences-other": + uri = "resource://waterfox/overlays/preferences-other.overlay"; break; } let chromeManifest = new ChromeManifest(async () => { @@ -123,22 +120,14 @@ const WaterfoxGlue = { ) { subject.setTimeout(async () => { await Overlays.load( - await this.getChromeManifest("preferences-privacy"), - subject - ); - await Overlays.load( - await this.getChromeManifest("preferences-home"), + await this.getChromeManifest("preferences-other"), subject ); subject.privacyInitialized = true; }, 500); } else { await Overlays.load( - await this.getChromeManifest("preferences-privacy"), - subject - ); - await Overlays.load( - await this.getChromeManifest("preferences-home"), + await this.getChromeManifest("preferences-other"), subject ); subject.privacyInitialized = true; diff --git a/waterfox/browser/components/preferences/content/preferences-home.xhtml b/waterfox/browser/components/preferences/content/preferences-home.xhtml deleted file mode 100644 index 5dfd5544782f..000000000000 --- a/waterfox/browser/components/preferences/content/preferences-home.xhtml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/waterfox/browser/components/preferences/content/preferences-privacy.xhtml b/waterfox/browser/components/preferences/content/preferences-other.xhtml similarity index 94% rename from waterfox/browser/components/preferences/content/preferences-privacy.xhtml rename to waterfox/browser/components/preferences/content/preferences-other.xhtml index 20435c1039f8..dd1513eadddd 100644 --- a/waterfox/browser/components/preferences/content/preferences-privacy.xhtml +++ b/waterfox/browser/components/preferences/content/preferences-other.xhtml @@ -6,6 +6,12 @@ + + + + + +