зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1400812 - Removal of containers drawer icon. r=baku,dao
MozReview-Commit-ID: JK2tB0ITRqY --HG-- extra : rebase_source : 26f534fe05e898d8b33cff1b629a84a5c6ae4dff
This commit is contained in:
Родитель
eace06432d
Коммит
3d183512ad
|
@ -21,7 +21,6 @@ XPCOMUtils.defineLazyModuleGetters(this, {
|
|||
CharsetMenu: "resource://gre/modules/CharsetMenu.jsm",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.jsm",
|
||||
SyncedTabs: "resource://services-sync/SyncedTabs.jsm",
|
||||
ContextualIdentityService: "resource://gre/modules/ContextualIdentityService.jsm",
|
||||
});
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "CharsetBundle", function() {
|
||||
|
@ -914,89 +913,6 @@ const CustomizableWidgets = [
|
|||
let win = aEvent.view;
|
||||
win.MailIntegration.sendLinkForBrowser(win.gBrowser.selectedBrowser)
|
||||
}
|
||||
}, {
|
||||
id: "containers-panelmenu",
|
||||
type: "view",
|
||||
viewId: "PanelUI-containers",
|
||||
hasObserver: false,
|
||||
onCreated(aNode) {
|
||||
let doc = aNode.ownerDocument;
|
||||
let win = doc.defaultView;
|
||||
let items = doc.getElementById("PanelUI-containersItems");
|
||||
|
||||
let onItemCommand = function(aEvent) {
|
||||
let item = aEvent.target;
|
||||
if (item.hasAttribute("usercontextid")) {
|
||||
let userContextId = parseInt(item.getAttribute("usercontextid"));
|
||||
win.openUILinkIn(win.BROWSER_NEW_TAB_URL, "tab", {userContextId});
|
||||
}
|
||||
};
|
||||
items.addEventListener("command", onItemCommand);
|
||||
|
||||
if (PrivateBrowsingUtils.isWindowPrivate(win)) {
|
||||
aNode.setAttribute("disabled", "true");
|
||||
}
|
||||
|
||||
this.updateVisibility(aNode);
|
||||
|
||||
if (!this.hasObserver) {
|
||||
Services.prefs.addObserver("privacy.userContext.enabled", this, true);
|
||||
this.hasObserver = true;
|
||||
}
|
||||
},
|
||||
onViewShowing(aEvent) {
|
||||
let doc = aEvent.target.ownerDocument;
|
||||
|
||||
let items = doc.getElementById("PanelUI-containersItems");
|
||||
|
||||
while (items.firstChild) {
|
||||
items.firstChild.remove();
|
||||
}
|
||||
|
||||
let fragment = doc.createDocumentFragment();
|
||||
let bundle = doc.getElementById("bundle_browser");
|
||||
|
||||
ContextualIdentityService.getPublicIdentities().forEach(identity => {
|
||||
let label = ContextualIdentityService.getUserContextLabel(identity.userContextId);
|
||||
|
||||
let item = doc.createElementNS(kNSXUL, "toolbarbutton");
|
||||
item.setAttribute("label", label);
|
||||
item.setAttribute("usercontextid", identity.userContextId);
|
||||
item.setAttribute("class", "subviewbutton");
|
||||
item.setAttribute("data-identity-color", identity.color);
|
||||
item.setAttribute("data-identity-icon", identity.icon);
|
||||
|
||||
fragment.appendChild(item);
|
||||
});
|
||||
|
||||
fragment.appendChild(doc.createElementNS(kNSXUL, "menuseparator"));
|
||||
|
||||
let item = doc.createElementNS(kNSXUL, "toolbarbutton");
|
||||
item.setAttribute("label", bundle.getString("userContext.aboutPage.label"));
|
||||
item.setAttribute("command", "Browser:OpenAboutContainers");
|
||||
item.setAttribute("class", "subviewbutton");
|
||||
fragment.appendChild(item);
|
||||
|
||||
items.appendChild(fragment);
|
||||
},
|
||||
|
||||
updateVisibility(aNode) {
|
||||
aNode.hidden = !Services.prefs.getBoolPref("privacy.userContext.enabled");
|
||||
},
|
||||
|
||||
observe(aSubject, aTopic, aData) {
|
||||
let {instances} = CustomizableUI.getWidget("containers-panelmenu");
|
||||
for (let {node} of instances) {
|
||||
if (node) {
|
||||
this.updateVisibility(node);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
QueryInterface: XPCOMUtils.generateQI([
|
||||
Ci.nsISupportsWeakReference,
|
||||
Ci.nsIObserver
|
||||
]),
|
||||
}];
|
||||
|
||||
let preferencesButton = {
|
||||
|
|
|
@ -76,9 +76,6 @@ paste-button.tooltiptext2 = Paste (%S)
|
|||
feed-button.label = Subscribe
|
||||
feed-button.tooltiptext2 = Subscribe to this page
|
||||
|
||||
containers-panelmenu.label = Open Container Tab
|
||||
containers-panelmenu.tooltiptext = Open Container Tab
|
||||
|
||||
# LOCALIZATION NOTE (characterencoding-button2.label): The \u00ad text at the beginning
|
||||
# of the string is used to disable auto hyphenation on the button text when it is displayed
|
||||
# in the menu panel.
|
||||
|
|
|
@ -92,7 +92,6 @@ XPCOMUtils.defineLazyGetter(this, "PALETTE_ITEMS", function() {
|
|||
"developer-button",
|
||||
"feed-button",
|
||||
"email-link-button",
|
||||
"containers-panelmenu",
|
||||
...LEGACY_PANEL_PLACEMENTS,
|
||||
"characterencoding-button",
|
||||
];
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- 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/. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<path fill="context-fill" fill-opacity="context-fill-opacity" d="M12 4H4v4h8zm-2 2.75a.25.25 0 0 1-.25.25h-3.5A.25.25 0 0 1 6 6.75v-.5A.25.25 0 0 1 6.25 6h3.5a.25.25 0 0 1 .25.25zM12 9H4v4h8zm-2 2.75a.25.25 0 0 1-.25.25h-3.5a.25.25 0 0 1-.25-.25v-.5a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25zm3.854-9.9L13 1H3l-.854.853A.5.5 0 0 0 2 2.207V14a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V2.207a.5.5 0 0 0-.146-.354zM13 14H3V3h10z"/>
|
||||
</svg>
|
До Ширина: | Высота: | Размер: 726 B |
|
@ -128,7 +128,6 @@
|
|||
skin/classic/browser/chevron-animation.svg (../shared/icons/chevron-animation.svg)
|
||||
skin/classic/browser/check.svg (../shared/icons/check.svg)
|
||||
skin/classic/browser/check-animation.svg (../shared/icons/check-animation.svg)
|
||||
skin/classic/browser/containers.svg (../shared/icons/containers.svg)
|
||||
skin/classic/browser/customize.svg (../shared/icons/customize.svg)
|
||||
skin/classic/browser/developer.svg (../shared/icons/developer.svg)
|
||||
skin/classic/browser/device-mobile.svg (../shared/icons/device-mobile.svg)
|
||||
|
|
|
@ -217,10 +217,6 @@ toolbar[brighttext] {
|
|||
list-style-image: url("chrome://browser/skin/synced-tabs.svg");
|
||||
}
|
||||
|
||||
#containers-panelmenu {
|
||||
list-style-image: url("chrome://browser/skin/containers.svg");
|
||||
}
|
||||
|
||||
#feed-button {
|
||||
list-style-image: url("chrome://browser/skin/feed.svg");
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче