correct problem where flag not set on toolbar bookmarks and schmear out

the loading of site icons to improve immediate startup (bug 223205)
This commit is contained in:
pinkerton%netscape.com 2003-10-29 19:43:51 +00:00
parent 2afcacc1f3
commit 6ce65b23b1
2 changed files with 17 additions and 4 deletions

View File

@ -47,8 +47,10 @@
#import "BookmarkManager.h"
#import "Bookmark.h"
#import "BookmarkFolder.h"
#import "BookmarkToolbar.h"
#import "BookmarkImportDlgController.h"
#import "KindaSmartFolderManager.h"
#import "BrowserWindowController.h"
#import "MainController.h"
@interface BookmarkManager (Private)
@ -145,6 +147,9 @@ static unsigned gFirstUserCollection = 0;
// setup special folders
[self setupSmartCollections];
mSmartFolderManager = [[KindaSmartFolderManager alloc] initWithBookmarkManager:self];
// at some point, f'd up setting the bookmark toolbar folder special flag.
// this'll handle that little boo-boo for the time being
[[self toolbarFolder] setIsToolbar:YES];
// don't do this until after we've read in the bookmarks
mUndoManager = [[NSUndoManager alloc] init];
// Generic notifications for Bookmark Client
@ -178,9 +183,17 @@ static unsigned gFirstUserCollection = 0;
// check update status of 1 bookmark every 2 minutes.
mUpdateTimer = [NSTimer scheduledTimerWithTimeInterval:kTimeToCheckAnotherBookmark target:self selector:@selector(checkForUpdates:) userInfo:nil repeats:YES];
[mSmartFolderManager postStartupInitialization:self];
[[[self toolbarFolder] objectAtIndex:0] itemUpdatedNote];//makes sure we have toolbar on 1st window
if ([[PreferenceManager sharedInstance] getBooleanPref:"browser.chrome.favicons" withSuccess:NULL])
[mRootBookmarks refreshIcon];
// make sure bookmark toolbar was built (only a concern on startup from apple event)
[[[[[NSApp delegate] getFrontmostBrowserWindow] windowController] bookmarkToolbar] buildButtonList];
if ([[PreferenceManager sharedInstance] getBooleanPref:"browser.chrome.favicons" withSuccess:NULL]) {
[[self toolbarFolder] refreshIcon];
[[self bookmarkMenuFolder] performSelector:@selector(refreshIcon) withObject:nil afterDelay:3.0];
[[self rendezvousFolder] performSelector:@selector(refreshIcon) withObject:nil afterDelay:10.0];
[[self addressBookFolder] performSelector:@selector(refreshIcon) withObject:nil afterDelay:12.0];
unsigned count = [mRootBookmarks count];
for (unsigned i = gFirstUserCollection;i<count;i++)
[[mRootBookmarks objectAtIndex:i] performSelector:@selector(refreshIcon) withObject:nil afterDelay:i];
}
}
- (void)shutdown;

View File

@ -528,7 +528,7 @@ const long kMinSearchPaneHeight = 80;
NSString *searchString = [mSearchField stringValue];
if ([searchString length] > 0) {
[self setSearchResultArray:[[BookmarkManager sharedBookmarkManager] searchBookmarksForString:searchString]];
// display if it's hidden
// display if it's hidden
NSArray *subviews = [mItemSearchSplit subviews];
NSRect bookmarkFrame = [[subviews objectAtIndex:0] frame];
NSRect searchFrame = [[subviews objectAtIndex:1] frame];