mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-19 23:07:33 +09:00
[BASILISK] Restore Tabs from Other Devices history menu item and Add First Sync Progress
This commit is contained in:
parent
720e453480
commit
a35c549212
13 changed files with 176 additions and 8 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue