Bug 1088540, fix email link for content processes, r=gijs

This commit is contained in:
Neil Deakin 2015-01-07 20:52:20 -05:00
parent 9f630848f2
commit 6be56d2934
3 changed files with 5 additions and 6 deletions

View File

@ -25,7 +25,7 @@
<command id="Browser:SavePage" oncommand="saveDocument(gBrowser.selectedBrowser.contentDocumentAsCPOW);"/>
<command id="Browser:SendLink"
oncommand="MailIntegration.sendLinkForWindow(window.content);"/>
oncommand="MailIntegration.sendLinkForBrowser(gBrowser.selectedBrowser);"/>
<command id="cmd_pageSetup" oncommand="PrintUtils.showPageSetup();"/>
<command id="cmd_print" oncommand="PrintUtils.print(window.gBrowser.selectedBrowser.contentWindowAsCPOW, window.gBrowser.selectedBrowser);"/>

View File

@ -1738,7 +1738,7 @@ function HandleAppCommandEvent(evt) {
saveDocument(gBrowser.selectedBrowser.contentDocumentAsCPOW);
break;
case "SendMail":
MailIntegration.sendLinkForWindow(window.content);
MailIntegration.sendLinkForBrowser(gBrowser.selectedBrowser);
break;
default:
return;
@ -6524,9 +6524,8 @@ function warnAboutClosingWindow() {
}
var MailIntegration = {
sendLinkForWindow: function (aWindow) {
this.sendMessage(aWindow.location.href,
aWindow.document.title);
sendLinkForBrowser: function (aBrowser) {
this.sendMessage(aBrowser.currentURI.spec, aBrowser.contentTitle);
},
sendMessage: function (aBody, aSubject) {

View File

@ -920,7 +920,7 @@ const CustomizableWidgets = [
tooltiptext: "email-link-button.tooltiptext3",
onCommand: function(aEvent) {
let win = aEvent.view;
win.MailIntegration.sendLinkForWindow(win.content);
win.MailIntegration.sendLinkForBrowser(win.gBrowser.selectedBrowser)
}
}, {
id: "loop-button",