fix for #148078. context menu problems in stand alone msg window.

use GetLoadedMsgFolder() instead of GetSelectedFolderResource().
regression caused by #138018.  r/sr=bienvenu.
This commit is contained in:
sspitzer%netscape.com 2002-06-04 07:28:52 +00:00
Родитель ed8e670065
Коммит 3e8138e699
1 изменённых файлов: 3 добавлений и 7 удалений

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

@ -157,14 +157,10 @@ function SetupForwardAsAttachmentMenuItem(menuID, numSelected, forceHide)
function SetupMoveMenuItem(menuID, numSelected, isNewsgroup, forceHide) function SetupMoveMenuItem(menuID, numSelected, isNewsgroup, forceHide)
{ {
ShowMenuItem(menuID, !isNewsgroup && !forceHide); ShowMenuItem(menuID, !isNewsgroup && !forceHide);
var folderResource = GetSelectedFolderResource();
var enableMenuItem = numSelected > 0; var msgFolder = GetLoadedMsgFolder();
// disable move if we can't delete message(s) from this folder // disable move if we can't delete message(s) from this folder
if (folderResource) var enableMenuItem = (numSelected > 0) && msgFolder && msgFolder.canDeleteMessages;
{
var msgFolder = folderResource.QueryInterface(Components.interfaces.nsIMsgFolder);
enableMenuItem = enableMenuItem && msgFolder && msgFolder.canDeleteMessages;
}
EnableMenuItem(menuID, enableMenuItem); EnableMenuItem(menuID, enableMenuItem);
} }