summaryrefslogtreecommitdiffstats
path: root/application/basilisk/base
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2019-04-13 06:52:08 -0400
committerMatt A. Tobin <email@mattatobin.com>2019-04-13 06:52:08 -0400
commit0ea4dabdeaa5e3f198bece363fa45c032b9f3cb7 (patch)
tree9055c7791434c8502f7f075bb2a694a57d62e078 /application/basilisk/base
parent8e5056ce2fa45726c5498c04808b7b4b9ee107e0 (diff)
downloadUXP-0ea4dabdeaa5e3f198bece363fa45c032b9f3cb7.tar
UXP-0ea4dabdeaa5e3f198bece363fa45c032b9f3cb7.tar.gz
UXP-0ea4dabdeaa5e3f198bece363fa45c032b9f3cb7.tar.lz
UXP-0ea4dabdeaa5e3f198bece363fa45c032b9f3cb7.tar.xz
UXP-0ea4dabdeaa5e3f198bece363fa45c032b9f3cb7.zip
[BASILISK] Restore Tabs from Other Devices history menu item and Add First Sync Progress
Diffstat (limited to 'application/basilisk/base')
-rw-r--r--application/basilisk/base/content/browser-menubar.inc6
-rw-r--r--application/basilisk/base/content/browser-places.js13
-rw-r--r--application/basilisk/base/jar.mn2
3 files changed, 17 insertions, 4 deletions
diff --git a/application/basilisk/base/content/browser-menubar.inc b/application/basilisk/base/content/browser-menubar.inc
index 0af0cc1c7..042a2e8a8 100644
--- a/application/basilisk/base/content/browser-menubar.inc
+++ b/application/basilisk/base/content/browser-menubar.inc
@@ -314,11 +314,13 @@
key="key_sanitize"
command="Tools:Sanitize"/>
<menuseparator id="sanitizeSeparator"/>
+#ifdef MOZ_SERVICES_SYNC
<menuitem id="sync-tabs-menuitem"
class="syncTabsMenuItem"
- label="&syncTabsMenu3.label;"
+ label="&syncTabsMenu2.label;"
oncommand="BrowserOpenSyncTabs();"
- hidden="true"/>
+ disabled="true"/>
+#endif
<menuitem id="historyRestoreLastSession"
label="&historyRestoreLastSession.label;"
command="Browser:RestoreLastSession"/>
diff --git a/application/basilisk/base/content/browser-places.js b/application/basilisk/base/content/browser-places.js
index 83c737977..87734140f 100644
--- a/application/basilisk/base/content/browser-places.js
+++ b/application/basilisk/base/content/browser-places.js
@@ -804,18 +804,29 @@ HistoryMenu.prototype = {
},
toggleTabsFromOtherComputers: function PHM_toggleTabsFromOtherComputers() {
+ // This is a no-op if MOZ_SERVICES_SYNC isn't defined
+#ifdef MOZ_SERVICES_SYNC
// Enable/disable the Tabs From Other Computers menu. Some of the menus handled
// by HistoryMenu do not have this menuitem.
let menuitem = this._rootElt.getElementsByClassName("syncTabsMenuItem")[0];
if (!menuitem)
return;
- if (!PlacesUIUtils.shouldShowTabsFromOtherComputersMenuitem()) {
+ // If Sync isn't configured yet, then don't show the menuitem.
+ if (Weave.Status.checkSetup() == Weave.CLIENT_NOT_CONFIGURED ||
+ Weave.Svc.Prefs.get("firstSync", "") == "notReady") {
menuitem.setAttribute("hidden", true);
return;
}
+ // The tabs engine might never be inited (if services.sync.registerEngines
+ // is modified), so make sure we avoid undefined errors.
+ let enabled = Weave.Service.isLoggedIn &&
+ Weave.Service.engineManager.get("tabs") &&
+ Weave.Service.engineManager.get("tabs").enabled;
+ menuitem.setAttribute("disabled", !enabled);
menuitem.setAttribute("hidden", false);
+#endif
},
_onPopupShowing: function HM__onPopupShowing(aEvent) {
diff --git a/application/basilisk/base/jar.mn b/application/basilisk/base/jar.mn
index 19c089f37..126312cd5 100644
--- a/application/basilisk/base/jar.mn
+++ b/application/basilisk/base/jar.mn
@@ -65,7 +65,7 @@ browser.jar:
content/browser/browser-fullZoom.js (content/browser-fullZoom.js)
content/browser/browser-gestureSupport.js (content/browser-gestureSupport.js)
* content/browser/browser-media.js (content/browser-media.js)
- content/browser/browser-places.js (content/browser-places.js)
+* content/browser/browser-places.js (content/browser-places.js)
content/browser/browser-plugins.js (content/browser-plugins.js)
content/browser/browser-refreshblocker.js (content/browser-refreshblocker.js)
#ifdef MOZ_SAFE_BROWSING