зеркало из https://github.com/mozilla/pjs.git
Fix failure to refresh calendar pane after adding or deleting a calendar (bug 325476); r=jminta
This commit is contained in:
Родитель
2cade8b522
Коммит
21cf0f2468
|
@ -49,14 +49,34 @@ function updateStyleSheetForCalendar(aCalendar)
|
|||
function addCalendarToTree(aCalendar)
|
||||
{
|
||||
var boxobj = document.getElementById("calendarTree").treeBoxObject;
|
||||
boxobj.rowCountChanged(getCalendars().indexOf(aCalendar), 1);
|
||||
|
||||
// XXXdmose in theory, we should be able to do something along the lines
|
||||
//
|
||||
// var calendarRow = getCalendars().indexOf(aCalendar);
|
||||
// boxobj.rowCountChanged(calendarRow, 1);
|
||||
//
|
||||
// Unfortunately, the indexOf in that statement will currently fail
|
||||
// since it's not possible to compare "interface pointers" for identity
|
||||
// because of XPConnect wrapping vagaries. Bug 325650 covers fixing
|
||||
// this the right way. But for now...
|
||||
boxobj.invalidate();
|
||||
|
||||
updateStyleSheetForCalendar(aCalendar);
|
||||
}
|
||||
|
||||
function removeCalendarFromTree(aCalendar)
|
||||
{
|
||||
var boxobj = document.getElementById("calendarTree").treeBoxObject;
|
||||
boxobj.rowCountChanged(getCalendars().indexOf(aCalendar), -1);
|
||||
|
||||
// XXXdmose in theory, we should be able to do something along the lines
|
||||
//
|
||||
// boxobj.rowCountChanged(getCalendars().indexOf(aCalendar), -1);
|
||||
//
|
||||
// Unfortunately, the indexOf in that statement will currently fail
|
||||
// since it's not possible to compare "interface pointers" for identity
|
||||
// because of XPConnect wrapping vagaries. Bug 325650 covers fixing this
|
||||
// the right way. But for now...
|
||||
boxobj.invalidate();
|
||||
}
|
||||
|
||||
var ltnCalendarManagerObserver = {
|
||||
|
|
Загрузка…
Ссылка в новой задаче