diff --git a/mozilla/mailnews/base/resources/content/commandglue.js b/mozilla/mailnews/base/resources/content/commandglue.js index 8f3d60ac283..c0ae68d1040 100644 --- a/mozilla/mailnews/base/resources/content/commandglue.js +++ b/mozilla/mailnews/base/resources/content/commandglue.js @@ -318,7 +318,12 @@ function RerootFolder(uri, newFolder, viewType, viewFlags, sortType, sortOrder) } SetUpToolbarButtons(uri); + UpdateStatusMessageCounts(newFolder); + + // hook for extra toolbar items + var observerService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService); + observerService.notifyObservers(window, "mail:updateToolbarItems", null); } function SwitchView(command) diff --git a/mozilla/mailnews/base/resources/content/msgMail3PaneWindow.js b/mozilla/mailnews/base/resources/content/msgMail3PaneWindow.js index b757c65551a..a1d19778825 100644 --- a/mozilla/mailnews/base/resources/content/msgMail3PaneWindow.js +++ b/mozilla/mailnews/base/resources/content/msgMail3PaneWindow.js @@ -350,9 +350,15 @@ function HandleDeleteOrMoveMsgCompleted(folder) if (treeView) treeView.selectionChanged(); - EnsureRowInThreadTreeIsVisible(gNextMessageViewIndexAfterDelete); gDBView.suppressCommandUpdating = false; + + // hook for extra toolbar items + // XXX I think there is a bug in the suppression code above. + // what if I have two rows selected, and I hit delete, and so we load the next row. + // what if I have commands that only enable where exactly one row is selected? + var observerService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService); + observerService.notifyObservers(window, "mail:updateToolbarItems", null); } } gNextMessageViewIndexAfterDelete = -2;