зеркало из https://github.com/mozilla/pjs.git
Bug #142748 --> File/Compact Folders disabled until you focus a folder
Porting to thunderbird Patch by mcow
This commit is contained in:
Родитель
e82af56fb2
Коммит
d38de0868d
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче