fix for 50803. Enabling disabling problems in threadpane. r=bienvenu.

This commit is contained in:
putterman%netscape.com 2000-09-01 03:28:13 +00:00
Родитель 6fb8187a66
Коммит 1437feb641
2 изменённых файлов: 11 добавлений и 2 удалений

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

@ -504,6 +504,7 @@ function CommandUpdate_Mail()
messagePane.removeAttribute('draw-focus-border');
}*/
goUpdateCommand('button_delete');
goUpdateCommand('cmd_delete');
goUpdateCommand('cmd_nextMsg');
goUpdateCommand('cmd_nextUnreadMsg');
@ -529,7 +530,6 @@ function CommandUpdate_Mail()
function ThreadTreeUpdate_Mail(command)
{
goUpdateCommand('button_delete');
goUpdateCommand('button_reply');
goUpdateCommand('button_replyall');
goUpdateCommand('button_forward');

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

@ -18,6 +18,7 @@
* Rights Reserved.
*/
var gOldNumSelected = 0;
function ThreadPaneOnClick(event)
{
if (event.target.localName != "treecell" &&
@ -215,9 +216,17 @@ function ThreadPaneSelectionChange()
var tree = GetThreadTree();
var selectedMessages = tree.selectedItems;
var numSelected = selectedMessages.length;
if(numSelected == 0 | numSelected == 1)
//If the current selected is 1 or 0 then we know that a change has taken place that might
//cause us to send out threadTree update notifications. We also care about this if the previous
//numSelected was 0 or 1 because we might be involved in something like a SelectAll where we won't
//get notified about the change from 0 to 1.
if(numSelected == 0 || numSelected == 1 || gOldNumSelected == 0 || gOldNumSelected == 1)
{
document.commandDispatcher.updateCommands('threadTree-select');
}
//Store the current number selected.
gOldNumSelected = numSelected;
}
function GetThreadTree()
{