diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-04-17 20:22:59 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-04-17 20:22:59 +0200 |
commit | 3eb4310cd889e6c8d22c27f0326273acf0a3e8bf (patch) | |
tree | 508827a64a5ad5c2d465535afea68eee39775a11 /application/basilisk/base/content/browser-places.js | |
parent | 07381c3edad8ec24b5d820ec0592e0cafa7d73fa (diff) | |
parent | 1e868fadf94935bcb4a49ea5eec776d84fe2d1e7 (diff) | |
download | UXP-3eb4310cd889e6c8d22c27f0326273acf0a3e8bf.tar UXP-3eb4310cd889e6c8d22c27f0326273acf0a3e8bf.tar.gz UXP-3eb4310cd889e6c8d22c27f0326273acf0a3e8bf.tar.lz UXP-3eb4310cd889e6c8d22c27f0326273acf0a3e8bf.tar.xz UXP-3eb4310cd889e6c8d22c27f0326273acf0a3e8bf.zip |
Merge branch 'Sync-weave'
Diffstat (limited to 'application/basilisk/base/content/browser-places.js')
-rw-r--r-- | application/basilisk/base/content/browser-places.js | 13 |
1 files changed, 12 insertions, 1 deletions
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) { |