rem: var folderList = tree.selectedItems; if (folderList) { var folder; folder = folderList[0]; if (folder) { var trashUri = GetSelectTrashUri(folder); if (trashUri) { var trashElement = document.getElementById(trashUri); if (trashElement) { dump ('found trash folder\n'); trashElement.setAttribute('open',''); } var trashSelected = IsSpecialFolderSelected(MSG_FOLDER_FLAG_TRASH); if(trashSelected) { tree.clearItemSelection(); } try { messenger.EmptyTrash(tree.database, folder.resource); } catch(e) { dump ("Exception : messenger.EmptyTrash \n"); } if (trashSelected) { trashElement = document.getElementById(trashUri); if (trashElement) ChangeSelection(tree, trashElement); } } } 
add: var folderResource = GetFolderResource(folderOutliner, startIndex.value); try { messenger.EmptyTrash(GetFolderDatasource(), folderResource); } catch(e) { dump ("Exception : messenger.EmptyTrash \n"); 
context: function MsgEmptyTrash() {    var tree = GetFolderTree();    if (tree)    {        var folderList = tree.selectedItems;        if (folderList)        {            var folder;            folder = folderList[0];            if (folder)			{                var trashUri = GetSelectTrashUri(folder);                if (trashUri)                {                    var trashElement = document.getElementById(trashUri);                    if (trashElement)                    {                        dump ('found trash folder\n');                        trashElement.setAttribute('open','');                    }                    var trashSelected = IsSpecialFolderSelected(MSG_FOLDER_FLAG_TRASH);                    if(trashSelected)                    {                        tree.clearItemSelection();                    }                    try {                          messenger.EmptyTrash(tree.database, folder.resource);                      }                      catch(e)                       {                            dump ("Exception : messenger.EmptyTrash \n");                       }                    if (trashSelected)                    {                        trashElement = document.getElementById(trashUri);                        if (trashElement)                            ChangeSelection(tree, trashElement);                    }                }			}        }    }}
meta: 5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5872/1e0e99191d9d4f4f04fb4061b0ba91f347b8986f/widgetglue.js/clean/mailnews/base/resources/content/widgetglue.js