mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 716271 - Add "Tabs From Other Computers" to the Firefox button's History menu. r=dietrich
This commit is contained in:
parent
a64064f7b5
commit
20df52c6bb
@ -341,6 +341,13 @@
|
||||
key="key_sanitize"
|
||||
command="Tools:Sanitize"/>
|
||||
<menuseparator class="hide-if-empty-places-result"/>
|
||||
#ifdef MOZ_SERVICES_SYNC
|
||||
<menuitem id="appmenu_sync-tabs"
|
||||
class="syncTabsMenuItem"
|
||||
label="&syncTabsMenu.label;"
|
||||
oncommand="BrowserOpenSyncTabs();"
|
||||
disabled="true"/>
|
||||
#endif
|
||||
<menuitem id="appmenu_restoreLastSession"
|
||||
class="restoreLastSession"
|
||||
label="&historyRestoreLastSession.label;"
|
||||
|
@ -90,16 +90,8 @@ let gSyncUI = {
|
||||
Services.obs.addObserver(this, topic, true);
|
||||
}, this);
|
||||
|
||||
// Find the alltabs-popup, only if there is a gBrowser
|
||||
if (gBrowser) {
|
||||
let popup = document.getElementById("alltabs-popup");
|
||||
if (popup) {
|
||||
popup.addEventListener(
|
||||
"popupshowing", this.alltabsPopupShowing.bind(this), true);
|
||||
}
|
||||
|
||||
if (Weave.Notifications.notifications.length)
|
||||
this.initNotifications();
|
||||
if (gBrowser && Weave.Notifications.notifications.length) {
|
||||
this.initNotifications();
|
||||
}
|
||||
this.updateUI();
|
||||
},
|
||||
@ -149,34 +141,6 @@ let gSyncUI = {
|
||||
button.removeAttribute("tooltiptext");
|
||||
},
|
||||
|
||||
alltabsPopupShowing: function(event) {
|
||||
// Should we show the menu item?
|
||||
//XXXphilikon We should remove the check for isLoggedIn here and have
|
||||
// about:sync-tabs auto-login (bug 583344)
|
||||
if (!Weave.Service.isLoggedIn || !Weave.Engines.get("tabs").enabled)
|
||||
return;
|
||||
|
||||
let label = this._stringBundle.GetStringFromName("tabs.fromOtherComputers.label");
|
||||
|
||||
let popup = document.getElementById("alltabs-popup");
|
||||
if (!popup)
|
||||
return;
|
||||
|
||||
let menuitem = document.createElement("menuitem");
|
||||
menuitem.setAttribute("id", "sync-tabs-menuitem");
|
||||
menuitem.setAttribute("label", label);
|
||||
menuitem.setAttribute("class", "alltabs-item");
|
||||
menuitem.setAttribute("oncommand", "BrowserOpenSyncTabs();");
|
||||
|
||||
// Fake the tab object on the menu entries, so that we don't have to worry
|
||||
// about removing them ourselves. They will just get cleaned up by popup
|
||||
// binding.
|
||||
menuitem.tab = { "linkedBrowser": { "currentURI": { "spec": label } } };
|
||||
|
||||
let sep = document.getElementById("alltabs-popup-separator");
|
||||
popup.insertBefore(menuitem, sep);
|
||||
},
|
||||
|
||||
|
||||
// Functions called by observers
|
||||
onActivityStart: function SUI_onActivityStart() {
|
||||
|
@ -36,5 +36,3 @@ error.sync.quota.label = Server Quota Exceeded
|
||||
error.sync.quota.description = Sync failed because it exceeded the server quota. Please review which data to sync.
|
||||
error.sync.viewQuotaButton.label = View Quota
|
||||
error.sync.viewQuotaButton.accesskey = V
|
||||
|
||||
tabs.fromOtherComputers.label = Tabs From Other Computers
|
||||
|
Loading…
Reference in New Issue
Block a user