mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1201331 (part 4) - replace "Tabs from other devices" with "Synced Tabs" on menus and history panel. r=Gijs
This commit is contained in:
parent
937d02b462
commit
13478de0d4
@ -367,9 +367,9 @@
|
||||
<menuseparator id="sanitizeSeparator"/>
|
||||
<menuitem id="sync-tabs-menuitem"
|
||||
class="syncTabsMenuItem"
|
||||
label="&syncTabsMenu2.label;"
|
||||
label="&syncTabsMenu3.label;"
|
||||
oncommand="BrowserOpenSyncTabs();"
|
||||
disabled="true"/>
|
||||
hidden="true"/>
|
||||
<menuitem id="historyRestoreLastSession"
|
||||
label="&historyRestoreLastSession.label;"
|
||||
command="Browser:RestoreLastSession"/>
|
||||
|
@ -309,6 +309,23 @@ var gSyncUI = {
|
||||
gFxAccounts.openSignInAgainPage(entryPoint);
|
||||
},
|
||||
|
||||
openSyncedTabsPanel() {
|
||||
let placement = CustomizableUI.getPlacementOfWidget("sync-button");
|
||||
let area = placement ? placement.area : CustomizableUI.AREA_NAVBAR;
|
||||
let anchor = document.getElementById("sync-button") ||
|
||||
document.getElementById("PanelUI-menu-button");
|
||||
if (area == CustomizableUI.AREA_PANEL) {
|
||||
// The button is in the panel, so we need to show the panel UI, then our
|
||||
// subview.
|
||||
PanelUI.show().then(() => {
|
||||
PanelUI.showSubView("PanelUI-remotetabs", anchor, area);
|
||||
}).catch(Cu.reportError);
|
||||
} else {
|
||||
// It is placed somewhere else - just try and show it.
|
||||
PanelUI.showSubView("PanelUI-remotetabs", anchor, area);
|
||||
}
|
||||
},
|
||||
|
||||
/* Update the tooltip for the sync-status broadcaster (which will update the
|
||||
Sync Toolbar button and the Sync spinner in the FxA hamburger area.)
|
||||
If Sync is configured, the tooltip is when the last sync occurred,
|
||||
|
@ -6471,7 +6471,7 @@ function isTabEmpty(aTab) {
|
||||
}
|
||||
|
||||
function BrowserOpenSyncTabs() {
|
||||
switchToTabHavingURI("about:sync-tabs", true);
|
||||
gSyncUI.openSyncedTabsPanel();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -251,12 +251,6 @@ const CustomizableWidgets = [
|
||||
tabsFromOtherComputers.setAttribute("hidden", true);
|
||||
}
|
||||
|
||||
if (PlacesUIUtils.shouldEnableTabsFromOtherComputersMenuitem()) {
|
||||
tabsFromOtherComputers.removeAttribute("disabled");
|
||||
} else {
|
||||
tabsFromOtherComputers.setAttribute("disabled", true);
|
||||
}
|
||||
|
||||
let utils = RecentlyClosedTabsAndWindowsMenuUtils;
|
||||
let tabsFragment = utils.getTabsFragment(doc.defaultView, "toolbarbutton", true,
|
||||
"menuRestoreAllTabsSubview.label");
|
||||
|
@ -86,7 +86,7 @@
|
||||
command="Tools:Sanitize"/>
|
||||
<toolbarbutton id="sync-tabs-menuitem2"
|
||||
class="syncTabsMenuItem subviewbutton"
|
||||
label="&syncTabsMenu2.label;"
|
||||
label="&syncTabsMenu3.label;"
|
||||
oncommand="BrowserOpenSyncTabs();"
|
||||
disabled="true"/>
|
||||
<toolbarbutton id="appMenuRestoreLastSession"
|
||||
|
@ -1223,16 +1223,7 @@ this.PlacesUIUtils = {
|
||||
shouldShowTabsFromOtherComputersMenuitem: function() {
|
||||
let weaveOK = Weave.Status.checkSetup() != Weave.CLIENT_NOT_CONFIGURED &&
|
||||
Weave.Svc.Prefs.get("firstSync", "") != "notReady";
|
||||
let cloudSyncOK = CloudSync && CloudSync.ready && CloudSync().tabsReady && CloudSync().tabs.hasRemoteTabs();
|
||||
return weaveOK || cloudSyncOK;
|
||||
},
|
||||
|
||||
shouldEnableTabsFromOtherComputersMenuitem: function() {
|
||||
let weaveEnabled = Weave.Service.isLoggedIn &&
|
||||
Weave.Service.engineManager.get("tabs") &&
|
||||
Weave.Service.engineManager.get("tabs").enabled;
|
||||
let cloudSyncEnabled = CloudSync && CloudSync.ready && CloudSync().tabsReady && CloudSync().tabs.hasRemoteTabs();
|
||||
return weaveEnabled || cloudSyncEnabled;
|
||||
return weaveOK;
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -2,7 +2,6 @@
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
|
||||
<!-- LOCALIZATION NOTE (tabs.otherDevices.label): Keep this in sync with syncTabsMenu2.label from browser.dtd -->
|
||||
<!ENTITY tabs.otherDevices.label "Tabs From Other Devices">
|
||||
|
||||
<!ENTITY tabs.searchText.label "Type here to find tabs…">
|
||||
|
@ -787,8 +787,8 @@ you can use these alternative items. Otherwise, their values should be empty. -
|
||||
The word "toolbar" is appended automatically and should not be contained below! -->
|
||||
<!ENTITY tabsToolbar.label "Browser tabs">
|
||||
|
||||
<!-- LOCALIZATION NOTE (syncTabsMenu2.label): This appears in the history menu -->
|
||||
<!ENTITY syncTabsMenu2.label "Tabs From Other Devices">
|
||||
<!-- LOCALIZATION NOTE (syncTabsMenu3.label): This appears in the history menu and history panel -->
|
||||
<!ENTITY syncTabsMenu3.label "Synced Tabs">
|
||||
|
||||
<!ENTITY syncBrand.shortName.label "Sync">
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user