Bug 458527 - Recently closed pages not tracked until History menu is accessed. Patch by Stuart Morgan <stuart.morgan+bugzilla@gmail.com>, r/sr=pink

git-svn-id: svn://10.0.0.236/trunk@254540 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
alqahira%ardisson.org 2008-10-06 17:18:49 +00:00
parent 0c7ed5f821
commit 2d43096d03

View File

@ -578,10 +578,17 @@ static const unsigned int kMaxTitleLength = 50;
// If rootChangedItem is nil, the whole history tree is being rebuilt.
if (!rootChangedItem) {
[mRecentlyClosedMenu release];
mRecentlyClosedMenu = [[NSMenu alloc] initWithTitle:NSLocalizedString(@"RecentlyClosed", nil)];
[mTodayItem release];
mTodayItem = nil;
// We can get here either when the history is being cleared (in which case
// we will already have an mRootItem) or when we are doing the lazy
// construction of the root item as the menu is shown (in which case
// mRootItem is still |nil|). If it's the former, clear the recently closed
// pages as well.
if (mRootItem) {
[mRecentlyClosedMenu release];
mRecentlyClosedMenu = [[NSMenu alloc] initWithTitle:NSLocalizedString(@"RecentlyClosed", nil)];
}
}
else if (mTodayItem == rootChangedItem ||
mTodayItem == [rootChangedItem parentItem])