- Timestamp:
- Aug 30, 2006, 9:40:36 PM (16 years ago)
- Location:
- trunk/macosx
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/StringAdditions.m
r777 r839 162 162 if ([self isEqualToString: string]) 163 163 return NSOrderedSame; 164 165 NSArray * selfSections = [self componentsSeparatedByString: @"."], 166 * newSections = [string componentsSeparatedByString: @"."]; 167 168 if ([selfSections count] != [newSections count]) 169 return [[NSNumber numberWithUnsignedInt: [selfSections count]] compare: 170 [NSNumber numberWithUnsignedInt: [newSections count]]]; 164 171 165 NSEnumerator * selfSections = [[self componentsSeparatedByString: @"."] objectEnumerator], 166 * newSections = [[string componentsSeparatedByString: @"."] objectEnumerator]; 167 172 NSEnumerator * selfSectionsEnum = [selfSections objectEnumerator], * newSectionsEnum = [newSections objectEnumerator]; 173 NSString * selfString, * newString; 168 174 NSComparisonResult result; 169 NSString * selfString = [selfSections nextObject], * newString = [newSections nextObject]; 170 while (selfString && newString) 171 { 175 while ((selfString = [selfSectionsEnum nextObject]) && (newString = [newSectionsEnum nextObject])) 172 176 if ((result = [selfString compare: newString options: NSNumericSearch]) != NSOrderedSame) 173 177 return result; 174 175 selfString = [selfSections nextObject];176 newString = [newSections nextObject];177 }178 178 179 if (selfString) 180 return NSOrderedDescending; 181 else if (newString) 182 return NSOrderedAscending; 183 else 184 return NSOrderedSame; 179 return NSOrderedSame; 185 180 } 186 181 -
trunk/macosx/TorrentCell.m
r836 r839 107 107 [barImage setSize: NSMakeSize(width * 1.5, BAR_HEIGHT)]; 108 108 109 [barImage compositeToPoint: point fromRect: NSMakeRect(0, 0, width, BAR_HEIGHT) 110 operation: NSCompositeSourceOver]; 109 [barImage compositeToPoint: point fromRect: NSMakeRect(0, 0, width, BAR_HEIGHT) operation: NSCompositeSourceOver]; 111 110 } 112 111
Note: See TracChangeset
for help on using the changeset viewer.