add copy folder location menu item r=naving, sr=sspitzer a=asa 112105

This commit is contained in:
bienvenu%netscape.com 2002-03-06 01:29:56 +00:00
parent b5f916d0df
commit 4ef2e4c499
3 changed files with 28 additions and 1 deletions

View File

@ -201,6 +201,7 @@ function fillFolderPaneContextMenu()
ShowMenuItem("folderPaneContext-subscribe", (numSelected <= 1) && canSubscribeToFolder); ShowMenuItem("folderPaneContext-subscribe", (numSelected <= 1) && canSubscribeToFolder);
EnableMenuItem("folderPaneContext-subscribe", true); EnableMenuItem("folderPaneContext-subscribe", true);
ShowMenuItem("folderPaneContext-sep1", (numSelected <= 1));
// News folder context menu ============================================= // News folder context menu =============================================
ShowMenuItem("folderPaneContext-newsUnsubscribe", (numSelected <= 1) && canSubscribeToFolder && isNewsgroup); ShowMenuItem("folderPaneContext-newsUnsubscribe", (numSelected <= 1) && canSubscribeToFolder && isNewsgroup);
@ -389,6 +390,26 @@ function IsMenuItemShowing(menuID)
return false; return false;
} }
function CopyFolderUrl()
{
try
{
var folderResource = GetSelectedFolderResource();
if (folderResource)
{
var msgFolder = folderResource.QueryInterface(Components.interfaces.nsIMsgFolder);
var contractid = "@mozilla.org/widget/clipboardhelper;1";
var iid = Components.interfaces.nsIClipboardHelper;
var clipboard = Components.classes[contractid].getService(iid);
clipboard.copyString(msgFolder.folderURL);
}
}
catch (ex)
{
dump("ex="+ex+"\n");
}
}
function CopyMessageUrl() function CopyMessageUrl()
{ {
try { try {

View File

@ -556,6 +556,10 @@ Rights Reserved.
label="&folderContextOpenNewWindow.label;" label="&folderContextOpenNewWindow.label;"
accesskey="&folderContextOpenNewWindow.accesskey;" accesskey="&folderContextOpenNewWindow.accesskey;"
oncommand="MsgOpenNewWindowForFolder(null,-1);"/> oncommand="MsgOpenNewWindowForFolder(null,-1);"/>
<menuitem id="folderPaneContext-copy-location"
label="&folderContextCopyLocation.label;"
accesskey="&folderContextCopyLocation.accesskey;"
oncommand="CopyFolderUrl();"/>
<menuitem id="folderPaneContext-subscribe" <menuitem id="folderPaneContext-subscribe"
label="&folderContextSubscribe.label;" label="&folderContextSubscribe.label;"
accesskey="&folderContextSubscribe.accesskey;" accesskey="&folderContextSubscribe.accesskey;"
@ -564,6 +568,7 @@ Rights Reserved.
label="&folderContextUnsubscribe.label;" label="&folderContextUnsubscribe.label;"
accesskey="&folderContextUnsubscribe.accesskey;" accesskey="&folderContextUnsubscribe.accesskey;"
oncommand="MsgUnsubscribe();"/> oncommand="MsgUnsubscribe();"/>
<menuseparator id="folderPaneContext-sep1"/>
<menuitem id="folderPaneContext-getMessages" <menuitem id="folderPaneContext-getMessages"
label="&folderContextGetMessages.label;" label="&folderContextGetMessages.label;"
accesskey="&folderContextGetMessages.accesskey;" accesskey="&folderContextGetMessages.accesskey;"

View File

@ -521,7 +521,8 @@ Rights Reserved.
<!ENTITY folderContextSearchMessages.accesskey "S"> <!ENTITY folderContextSearchMessages.accesskey "S">
<!ENTITY folderContextProperties.label "Properties..."> <!ENTITY folderContextProperties.label "Properties...">
<!ENTITY folderContextProperties.accesskey "o"> <!ENTITY folderContextProperties.accesskey "o">
<!ENTITY folderContextCopyLocation.label "Copy Folder Location">
<!ENTITY folderContextCopyLocation.accesskey "C">
<!-- Message Header View Popup --> <!-- Message Header View Popup -->
<!ENTITY AddToAddressBook.label "Add to Address Book..."> <!ENTITY AddToAddressBook.label "Add to Address Book...">
<!ENTITY AddToAddressBook.accesskey "B"> <!ENTITY AddToAddressBook.accesskey "B">