зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1355323 - Create action menu panel with initial "copy URL" and "email link" items. r=mikedeboer
MozReview-Commit-ID: LpR63K7riho --HG-- rename : browser/themes/shared/page-action.svg => browser/themes/shared/icons/page-action.svg extra : rebase_source : b9ab550ffa6c7941af9a2040a794d3df8d9dd35a
This commit is contained in:
Родитель
f74528187b
Коммит
efa8951e8a
|
@ -28,6 +28,11 @@
|
|||
<command id="Browser:SendLink"
|
||||
oncommand="MailIntegration.sendLinkForBrowser(gBrowser.selectedBrowser);"/>
|
||||
|
||||
<command id="PageAction:copyURL"
|
||||
oncommand="gPageActionButton.copyURL();"/>
|
||||
<command id="PageAction:emailLink"
|
||||
oncommand="gPageActionButton.emailLink();"/>
|
||||
|
||||
<command id="cmd_pageSetup" oncommand="PrintUtils.showPageSetup();"/>
|
||||
<command id="cmd_print" oncommand="PrintUtils.printWindow(window.gBrowser.selectedBrowser.outerWindowID, window.gBrowser.selectedBrowser);"/>
|
||||
<command id="cmd_printPreview" oncommand="PrintUtils.printPreview(PrintPreviewListener);"/>
|
||||
|
|
|
@ -7847,6 +7847,18 @@ var gPageActionButton = {
|
|||
this.panel.hidden = false;
|
||||
this.panel.openPopup(this.button, "bottomcenter topright");
|
||||
},
|
||||
|
||||
copyURL() {
|
||||
this.panel.hidePopup();
|
||||
Cc["@mozilla.org/widget/clipboardhelper;1"]
|
||||
.getService(Ci.nsIClipboardHelper)
|
||||
.copyString(gBrowser.selectedBrowser.currentURI.spec);
|
||||
},
|
||||
|
||||
emailLink() {
|
||||
this.panel.hidePopup();
|
||||
MailIntegration.sendLinkForBrowser(gBrowser.selectedBrowser);
|
||||
},
|
||||
};
|
||||
|
||||
function getNotificationBox(aWindow) {
|
||||
|
|
|
@ -440,13 +440,29 @@
|
|||
</panel>
|
||||
|
||||
<panel id="page-action-panel"
|
||||
class="cui-widget-panel"
|
||||
role="group"
|
||||
type="arrow"
|
||||
hidden="true"
|
||||
flip="slide"
|
||||
position="bottomcenter topright"
|
||||
noautofocus="true">
|
||||
This space intentionally left blank.
|
||||
<photonpanelmultiview id="page-action-multiView"
|
||||
mainViewId="page-action-mainView">
|
||||
<panelview id="page-action-mainView"
|
||||
class="PanelUI-subView">
|
||||
<vbox class="panel-subview-body">
|
||||
<toolbarbutton id="page-action-copy-url-button"
|
||||
class="subviewbutton subviewbutton-iconic"
|
||||
label="©URLCmd.label;"
|
||||
command="PageAction:copyURL"/>
|
||||
<toolbarbutton id="page-action-email-link-button"
|
||||
class="subviewbutton subviewbutton-iconic"
|
||||
label="&emailPageCmd.label;"
|
||||
command="PageAction:emailLink"/>
|
||||
</vbox>
|
||||
</panelview>
|
||||
</photonpanelmultiview>
|
||||
</panel>
|
||||
|
||||
<!-- Bookmarks and history tooltip -->
|
||||
|
|
|
@ -530,6 +530,7 @@ These should match what Safari and other Apple applications use on OS X Lion. --
|
|||
<!ENTITY bookmarkThisLinkCmd.accesskey "L">
|
||||
<!ENTITY bookmarkThisFrameCmd.label "Bookmark This Frame">
|
||||
<!ENTITY bookmarkThisFrameCmd.accesskey "m">
|
||||
<!ENTITY copyURLCmd.label "Copy URL">
|
||||
<!ENTITY emailPageCmd.label "Email Link…">
|
||||
<!ENTITY emailPageCmd.accesskey "E">
|
||||
<!ENTITY savePageCmd.label "Save Page As…">
|
||||
|
|
|
@ -87,3 +87,15 @@
|
|||
#urlbar-page-action-button > .toolbarbutton-icon {
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
#page-action-copy-url-button {
|
||||
list-style-image: url("chrome://browser/skin/copy-url.svg");
|
||||
-moz-context-properties: fill;
|
||||
fill: currentColor;
|
||||
}
|
||||
|
||||
#page-action-email-link-button {
|
||||
list-style-image: url("chrome://browser/skin/email-link.svg");
|
||||
-moz-context-properties: fill;
|
||||
fill: currentColor;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.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">
|
||||
<path fill="context-fill" d="M14.707 8.293l-3-3A1 1 0 0 0 11 5h-1V4a1 1 0 0 0-.293-.707l-3-3A1 1 0 0 0 6 0H3a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h3v3a2 2 0 0 0 2 2h5a2 2 0 0 0 2-2V9a1 1 0 0 0-.293-.707zM12.586 9H11V7.414zm-5-5H6V2.414zM6 7v2H3V2h2v2.5a.5.5 0 0 0 .5.5H8a2 2 0 0 0-2 2zm2 7V7h2v2.5a.5.5 0 0 0 .5.5H13v4z"/>
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 622 B |
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.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">
|
||||
<path fill="context-fill" d="M13 2H3a3.013 3.013 0 0 0-3 3v6a3.013 3.013 0 0 0 3 3h10a3.013 3.013 0 0 0 3-3V5a3.013 3.013 0 0 0-3-3zm1 9a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1z"/>
|
||||
<path fill="context-fill" d="M8 9a.5.5 0 0 1-.294-.1l-5.5-4a.5.5 0 1 1 .588-.8L8 7.882 13.207 4.1a.5.5 0 0 1 .588.809l-5.5 4A.5.5 0 0 1 8 9z"/>
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 657 B |
До Ширина: | Высота: | Размер: 439 B После Ширина: | Высота: | Размер: 439 B |
|
@ -194,7 +194,9 @@
|
|||
skin/classic/browser/compacttheme/urlbar-history-dropmarker.svg (../shared/compacttheme/urlbar-history-dropmarker.svg)
|
||||
skin/classic/browser/urlbar-star.svg (../shared/urlbar-star.svg)
|
||||
skin/classic/browser/urlbar-tab.svg (../shared/urlbar-tab.svg)
|
||||
skin/classic/browser/page-action.svg (../shared/page-action.svg)
|
||||
skin/classic/browser/page-action.svg (../shared/icons/page-action.svg)
|
||||
skin/classic/browser/copy-url.svg (../shared/icons/copy-url.svg)
|
||||
skin/classic/browser/email-link.svg (../shared/icons/email-link.svg)
|
||||
skin/classic/browser/menu-icons/back.svg (../shared/menu-icons/back.svg)
|
||||
skin/classic/browser/menu-icons/back-small.svg (../shared/menu-icons/back-small.svg)
|
||||
skin/classic/browser/menu-icons/addons.svg (../shared/menu-icons/addons.svg)
|
||||
|
|
Загрузка…
Ссылка в новой задаче