Camino only - Bug 363435:Make bookmark keyword case-insensitive. r=murph sr=pink

This commit is contained in:
stridey%gmail.com 2006-12-18 18:18:33 +00:00
Родитель 958d5365e7
Коммит ef0c0c5d31
1 изменённых файлов: 5 добавлений и 2 удалений

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

@ -983,8 +983,11 @@ static int BookmarkItemSort(id firstItem, id secondItem, void* context)
//
- (NSArray*)resolveKeyword:(NSString *)keyword withArgs:(NSString *)args
{
if (!keyword)
return nil;
// see if it's us
if ([[self keyword] isEqualToString:keyword]) {
if ([[self keyword] caseInsensitiveCompare:keyword] == NSOrderedSame) {
NSMutableArray *urlArray = (NSMutableArray *)[self childURLs];
int i, j = [urlArray count];
for (i = 0; i < j; i++) {
@ -998,7 +1001,7 @@ static int BookmarkItemSort(id firstItem, id secondItem, void* context)
id aKid;
while ((aKid = [enumerator nextObject])) {
if ([aKid isKindOfClass:[Bookmark class]]) {
if ([[aKid keyword] isEqualToString:keyword])
if ([[aKid keyword] caseInsensitiveCompare:keyword] == NSOrderedSame)
return [NSArray arrayWithObject:[self expandURL:[aKid url] withString:args]];
}
else if ([aKid isKindOfClass:[BookmarkFolder class]]) {