Bug #142748 --> File/Compact Folders disabled until you focus a folder

Porting to thunderbird

Patch by mcow
This commit is contained in:
scott%scott-macgregor.org 2004-03-15 19:31:11 +00:00
Родитель e82af56fb2
Коммит d38de0868d
1 изменённых файлов: 4 добавлений и 17 удалений

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

@ -1625,23 +1625,10 @@ function IsEmptyTrashEnabled()
function IsCompactFolderEnabled()
{
var folderURI = GetSelectedFolderURI();
var server = GetServer(folderURI);
if (!(server && server.canCompactFoldersOnServer))
return false;
var folderTree = GetFolderTree();
var startIndex = {};
var endIndex = {};
folderTree.treeBoxObject.selection.getRangeAt(0, startIndex, endIndex);
if (startIndex.value < 0)
return false;
var folderResource = GetFolderResource(folderTree, startIndex.value);
if (! folderResource)
return false;
return GetFolderAttribute(folderTree, folderResource, "CanCompact") == "true" && isCommandEnabled("cmd_compactFolder");
var server = GetServer(GetSelectedFolderURI());
return (server &&
((server.type != 'imap') || server.canCompactFoldersOnServer) &&
isCommandEnabled("cmd_compactFolder")); // checks e.g. if IMAP is offline
}
var gDeleteButton = null;