This commit is contained in:
Dão Gottwald 2010-01-27 13:27:14 +01:00
Родитель 2670bbca38 37ad477734
Коммит 3d584b7528
4 изменённых файлов: 2 добавлений и 20 удалений

Просмотреть файл

@ -77,10 +77,6 @@
label="&copyLinkCmd.label;" label="&copyLinkCmd.label;"
accesskey="&copyLinkCmd.accesskey;" accesskey="&copyLinkCmd.accesskey;"
oncommand="goDoCommand('cmd_copyLink');"/> oncommand="goDoCommand('cmd_copyLink');"/>
<menuitem id="context-copylinktext"
label="&copyLinkText2Cmd.label;"
accesskey="&copyLinkText2Cmd.accesskey;"
oncommand="gContextMenu.copyLinkText();"/>
<menuseparator id="context-sep-copylink"/> <menuseparator id="context-sep-copylink"/>
<menuitem id="context-media-play" <menuitem id="context-media-play"
label="&mediaPlay.label;" label="&mediaPlay.label;"

Просмотреть файл

@ -438,8 +438,6 @@ nsContextMenu.prototype = {
// Copy link location depends on whether we're on a non-mailto link. // Copy link location depends on whether we're on a non-mailto link.
this.showItem("context-copylink", this.onLink && !this.onMailtoLink); this.showItem("context-copylink", this.onLink && !this.onMailtoLink);
this.showItem("context-copylinktext",
this.onLink && !this.onImage && !this.isTextSelected);
this.showItem("context-sep-copylink", this.onLink && this.showItem("context-sep-copylink", this.onLink &&
(this.onImage || this.onVideo || this.onAudio)); (this.onImage || this.onVideo || this.onAudio));
@ -1180,14 +1178,6 @@ nsContextMenu.prototype = {
clipboard.copyString(addresses); clipboard.copyString(addresses);
}, },
copyLinkText: function() {
let text = this.linkText();
let clipboard = Cc["@mozilla.org/widget/clipboardhelper;1"].
getService(Ci.nsIClipboardHelper);
clipboard.copyString(text);
},
/////////////// ///////////////
// Utilities // // Utilities //
/////////////// ///////////////

Просмотреть файл

@ -173,16 +173,14 @@ function runTest(testNum) {
"context-bookmarklink", true, "context-bookmarklink", true,
"context-savelink", true, "context-savelink", true,
"context-sendlink", true, "context-sendlink", true,
"context-copylink", true, "context-copylink", true]);
"context-copylinktext", true]);
closeContextMenu(); closeContextMenu();
openContextMenuFor(mailto); // Invoke context menu for next test. openContextMenuFor(mailto); // Invoke context menu for next test.
break; break;
case 4: case 4:
// Context menu for text mailto-link // Context menu for text mailto-link
checkContextMenu(["context-copyemail", true, checkContextMenu(["context-copyemail", true]);
"context-copylinktext", true]);
closeContextMenu(); closeContextMenu();
openContextMenuFor(input); // Invoke context menu for next test. openContextMenuFor(input); // Invoke context menu for next test.
break; break;

Просмотреть файл

@ -308,8 +308,6 @@
<!ENTITY sendAudioCmd.accesskey "n"> <!ENTITY sendAudioCmd.accesskey "n">
<!ENTITY copyLinkCmd.label "Copy Link Location"> <!ENTITY copyLinkCmd.label "Copy Link Location">
<!ENTITY copyLinkCmd.accesskey "a"> <!ENTITY copyLinkCmd.accesskey "a">
<!ENTITY copyLinkText2Cmd.label "Copy Link Text">
<!ENTITY copyLinkText2Cmd.accesskey "x">
<!ENTITY copyImageCmd.label "Copy Image Location"> <!ENTITY copyImageCmd.label "Copy Image Location">
<!ENTITY copyImageCmd.accesskey "o"> <!ENTITY copyImageCmd.accesskey "o">
<!ENTITY copyImageContentsCmd.label "Copy Image"> <!ENTITY copyImageContentsCmd.label "Copy Image">