Changeset 4723
- Timestamp:
- 04/25/07 00:36:22 (1 year ago)
- Files:
-
- Footagehead/trunk/English.lproj/MainMenu.nib/info.nib (modified) (2 diffs)
- Footagehead/trunk/English.lproj/MainMenu.nib/keyedobjects.nib (modified) (previous)
- Footagehead/trunk/English.lproj/MainMenu.nib/objects.nib (modified) (previous)
- Footagehead/trunk/FHArchiveHandler.m (modified) (1 diff)
- Footagehead/trunk/FHBrowserController.m (modified) (6 diffs)
- Footagehead/trunk/FHCache.m (modified) (1 diff)
- Footagehead/trunk/FHFeedHandler.m (modified) (5 diffs)
- Footagehead/trunk/FHFileHandler.m (modified) (1 diff)
- Footagehead/trunk/FHFlickrHandler.m (modified) (1 diff)
- Footagehead/trunk/FHHTMLHandler.m (modified) (1 diff)
- Footagehead/trunk/FHHTMLParser.m (modified) (1 diff)
- Footagehead/trunk/FHHandler.h (modified) (2 diffs)
- Footagehead/trunk/FHHandler.m (modified) (3 diffs)
- Footagehead/trunk/FHImageView.h (modified) (2 diffs)
- Footagehead/trunk/FHImageView.m (modified) (11 diffs)
- Footagehead/trunk/FHRangeHandler.m (modified) (2 diffs)
- Footagehead/trunk/FHSpotlightHandler.h (modified) (1 diff)
- Footagehead/trunk/FHSpotlightHandler.m (modified) (1 diff)
- Footagehead/trunk/FHWindowController.m (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
Footagehead/trunk/English.lproj/MainMenu.nib/info.nib
r4716 r4723 8 8 <dict> 9 9 <key>29</key> 10 <string> 973 944 400 44 0 0 1920 1178 </string>10 <string>433 614 400 44 0 0 1280 778 </string> 11 11 </dict> 12 12 <key>IBFramework Version</key> … … 19 19 </array> 20 20 <key>IBSystem Version</key> 21 <string>8P 135</string>21 <string>8P2137</string> 22 22 </dict> 23 23 </plist> Footagehead/trunk/FHArchiveHandler.m
r4418 r4723 46 46 static NSMutableArray *types; 47 47 NSArray *classes; 48 unsigned inti, count;48 NSUInteger i, count; 49 49 50 50 if(!types) { Footagehead/trunk/FHBrowserController.m
r4722 r4723 211 211 - (void)_toggleStatusBar:(BOOL)show { 212 212 NSRect frame; 213 float height;213 CGFloat height; 214 214 215 215 frame = [_contentBox frame]; … … 356 356 NSMutableString *string; 357 357 NSSize imageSize, frameSize; 358 double zoom; 359 float size; 360 361 if(![_imageView image]) { 358 CGFloat zoom, size; 359 360 if(![[_imageView images] count] > 0) { 362 361 [_rightStatusTextField setStringValue:@""]; 363 362 … … 365 364 } 366 365 367 imageSize = [ [_imageView image] size];366 imageSize = [_imageView imageSize]; 368 367 369 368 if(imageSize.width < 1.0 || imageSize.height <= 1.0) { … … 662 661 663 662 664 - ( float)splitView:(NSSplitView *)splitView constrainMinCoordinate:(float)proposedMin ofSubviewAt:(int)offset {663 - (CGFloat)splitView:(NSSplitView *)splitView constrainMinCoordinate:(CGFloat)proposedMin ofSubviewAt:(NSInteger)offset { 665 664 return 49.0; 666 665 } … … 668 667 669 668 670 - ( float)splitView:(NSSplitView *)splitView constrainMaxCoordinate:(float)proposedMax ofSubviewAt:(int)offset {669 - (CGFloat)splitView:(NSSplitView *)splitView constrainMaxCoordinate:(CGFloat)proposedMax ofSubviewAt:(NSInteger)offset { 671 670 return 145.0; 672 671 } … … 674 673 675 674 676 - ( float)splitView:(NSSplitView *)splitView constrainSplitPosition:(float)proposedPosition ofSubviewAt:(int)offset {677 intposition;675 - (CGFloat)splitView:(NSSplitView *)splitView constrainSplitPosition:(CGFloat)proposedPosition ofSubviewAt:(NSInteger)offset { 676 CGFloat position; 678 677 679 678 if([[NSApp currentEvent] alternateKeyModifier]) { Footagehead/trunk/FHCache.m
r4706 r4723 148 148 NSArray *keys; 149 149 NSString *key, *string; 150 unsigned inti, count;150 NSUInteger i, count; 151 151 152 152 keys = [_thumbnails allKeys]; Footagehead/trunk/FHFeedHandler.m
r4706 r4723 55 55 CFXMLNodeRef node, itemNode; 56 56 FHFeedParseMode mode; 57 unsigned inti, count, j, itemCount;57 NSUInteger i, count, j, itemCount; 58 58 59 59 contentTree = [self contentTree]; … … 103 103 CFXMLTreeRef tree; 104 104 CFXMLNodeRef node; 105 unsigned inti, count;105 NSUInteger i, count; 106 106 107 107 count = CFTreeGetChildCount(imageTree); … … 257 257 CFXMLTreeRef itemTree; 258 258 CFXMLNodeRef node; 259 unsigned inti, count;259 NSUInteger i, count; 260 260 261 261 count = CFTreeGetChildCount(tree); … … 279 279 NSString *name; 280 280 CFXMLNodeRef node; 281 unsigned inti, count;281 NSUInteger i, count; 282 282 283 283 value = [NSMutableString string]; … … 316 316 NSString *content; 317 317 FHFile *file; 318 unsigned inti, index, count, j, linkCount;318 NSUInteger i, index, count, j, linkCount; 319 319 320 320 if(!_files) { Footagehead/trunk/FHFileHandler.m
r4706 r4723 131 131 OSStatus err; 132 132 BOOL isDirectory; 133 unsigned inti, count, index;133 NSUInteger i, count, index; 134 134 135 135 if(!_files) { Footagehead/trunk/FHFlickrHandler.m
r4706 r4723 41 41 WIURL *url; 42 42 NSRange range; 43 unsigned inti, index, count;43 NSUInteger i, index, count; 44 44 45 45 if(!_files) { Footagehead/trunk/FHHTMLHandler.m
r4706 r4723 58 58 NSArray *types; 59 59 FHFile *file; 60 unsigned inti, index, count;60 NSUInteger i, index, count; 61 61 62 62 if(!_files) { Footagehead/trunk/FHHTMLParser.m
r4706 r4723 42 42 NSString *token, *link, *path; 43 43 WIURL *url; 44 unsigned inti, count, length;44 NSUInteger i, count, length; 45 45 46 46 links = [NSMutableArray arrayWithCapacity:50]; Footagehead/trunk/FHHandler.h
r4706 r4723 37 37 id _delegate; 38 38 39 unsigned int_numberOfFiles;40 unsigned int_numberOfImages;39 NSUInteger _numberOfFiles; 40 NSUInteger _numberOfImages; 41 41 } 42 42 … … 53 53 54 54 - (NSArray *)files; 55 - ( unsigned int)numberOfFiles;56 - ( unsigned int)numberOfImages;55 - (NSUInteger)numberOfFiles; 56 - (NSUInteger)numberOfImages; 57 57 - (void)removeFile:(FHFile *)file; 58 58 Footagehead/trunk/FHHandler.m
r4706 r4723 73 73 NSArray *classes; 74 74 Class class; 75 unsigned inti, count;75 NSUInteger i, count; 76 76 77 77 classes = [self handlerClasses]; … … 159 159 160 160 161 - ( unsigned int)numberOfFiles {161 - (NSUInteger)numberOfFiles { 162 162 return _numberOfFiles; 163 163 } … … 165 165 166 166 167 - ( unsigned int)numberOfImages {167 - (NSUInteger)numberOfImages { 168 168 return _numberOfImages; 169 169 } Footagehead/trunk/FHImageView.h
r4716 r4723 45 45 IBOutlet NSScrollView *_scrollView; 46 46 47 FHImage *_image; 47 NSArray *_images; 48 NSSize _imageSize; 49 48 50 FHImageScaling _imageScaling; 49 float _imageRotation;51 CGFloat _imageRotation; 50 52 51 53 NSColor *_backgroundColor; … … 55 57 56 58 BOOL _dragging; 59 BOOL _adjustingScaling; 57 60 } 58 61 59 62 60 - (void)setImage:(FHImage *)image; 61 - (FHImage *)image; 63 - (void)setImages:(NSArray *)images; 64 - (NSArray *)images; 65 - (NSSize)imageSize; 62 66 - (void)setImageScaling:(FHImageScaling)newScaling; 63 67 - (FHImageScaling)imageScaling; 64 - (void)setImageRotation:( float)rotation;65 - ( float)imageRotation;68 - (void)setImageRotation:(CGFloat)rotation; 69 - (CGFloat)imageRotation; 66 70 - (void)setBackgroundColor:(NSColor *)color; 67 71 - (NSColor *)backgroundColor; Footagehead/trunk/FHImageView.m
r4721 r4723 63 63 64 64 - (void)_FH_viewFrameDidChange:(NSNotification *)notification { 65 static BOOL recursive; 66 67 if(!recursive) { 68 recursive = YES; 69 [self _adjustScaling]; 70 recursive = NO; 71 } 65 [self _adjustScaling]; 72 66 73 67 if([_scrollView hasHorizontalScroller] || [_scrollView hasVerticalScroller]) … … 83 77 - (void)_adjustScaling { 84 78 NSSize contentSize, imageSize, frameSize; 85 float size; 79 CGFloat size, scrollerWidth; 80 81 if(_adjustingScaling) 82 return; 83 84 _adjustingScaling = YES; 86 85 87 86 if(_scrollView) { … … 93 92 [self setFrameSize:contentSize]; 94 93 95 if( _image&& (_imageScaling == FHScaleNone ||96 _imageScaling == FHScaleWidthProportionally ||97 _imageScaling == FHScaleHeightProportionally)) {94 if([_images count] > 0 && (_imageScaling == FHScaleNone || 95 _imageScaling == FHScaleWidthProportionally || 96 _imageScaling == FHScaleHeightProportionally)) { 98 97 imageSize = [self _scaledImageSizeForBounds:contentSize]; 99 98 … … 106 105 frameSize = NSMakeSize(MAX(contentSize.width, imageSize.width), MAX(contentSize.height, imageSize.height)); 107 106 107 scrollerWidth = [NSScroller scrollerWidth]; 108 108 109 if(imageSize.width > contentSize.width) { 109 110 [_scrollView setHasHorizontalScroller:YES]; 110 frameSize.height -= [NSScroller scrollerWidth]; 111 frameSize.width -= (contentSize.width / imageSize.width) * [NSScroller scrollerWidth]; 111 112 frameSize.height -= scrollerWidth; 113 114 if(imageSize.height > contentSize.height - scrollerWidth) 115 frameSize.width -= (contentSize.width / imageSize.width) * scrollerWidth; 112 116 } 113 117 114 118 if(imageSize.height > contentSize.height) { 115 119 [_scrollView setHasVerticalScroller:YES]; 116 frameSize.width -= [NSScroller scrollerWidth]; 117 frameSize.height -= (contentSize.height / imageSize.height) * [NSScroller scrollerWidth]; 120 121 frameSize.width -= scrollerWidth; 122 123 if(imageSize.width > contentSize.width - scrollerWidth) 124 frameSize.height -= (contentSize.height / imageSize.height) * scrollerWidth; 118 125 } 119 126 … … 122 129 } 123 130 } 131 132 _adjustingScaling = NO; 124 133 } 125 134 … … 130 139 float dx, dy, d; 131 140 132 size = [_image size];141 size = _imageSize; 133 142 134 143 if(_imageScaling == FHScaleNone) … … 187 196 188 197 - (void)dealloc { 189 [_image release]; 198 [_images release]; 199 190 200 [_backgroundColor release]; 191 201 … … 200 210 #pragma mark - 201 211 202 - (void)setImage :(FHImage *)image{212 - (void)setImages:(NSArray *)images { 203 213 BOOL display; 204 214 205 display = (image != NULL || _image != NULL); 206 207 [image retain]; 208 [_image release]; 209 210 _image = image; 215 display = ([images count] != 0 || [_images count] != 0); 216 217 [images retain]; 218 [_images release]; 219 220 _images = images; 221 222 if([_images count] > 0) { 223 _imageSize = [[_images objectAtIndex:0] size]; 224 } else { 225 _imageSize.width = 0.0; 226 _imageSize.height = 0.0; 227 } 211 228 212 229 [self _adjustScaling]; … … 218 235 219 236 220 - (FHImage *)image { 221 return _image; 237 - (NSArray *)images { 238 return _images; 239 } 240 241 242 243 - (NSSize)imageSize { 244 return _imageSize; 222 245 } 223 246 … … 369 392 370 393 - (void)drawRect:(NSRect)frame { 394 FHImage *image; 371 395 NSRect bounds, rect; 372 396 … … 376 400 NSRectFill(bounds); 377 401 378 if(_image) { 402 if([_images count] > 0) { 403 image = [_images objectAtIndex:0]; 404 379 405 rect.size = [self _scaledImageSizeForBounds:bounds.size]; 380 406 rect.origin.x = floorf((bounds.size.width - rect.size.width) / 2.0); 381 407 rect.origin.y = floorf((bounds.size.height - rect.size.height) / 2.0); 382 408 383 [ _image drawInRect:rect atAngle:_imageRotation];409 [image drawInRect:rect atAngle:_imageRotation]; 384 410 385 411 if(_label && [_label length] > 0) Footagehead/trunk/FHRangeHandler.m
r4706 r4723 45 45 NSString *string, *prefix, *suffix, *rangeString; 46 46 NSRange prefixRange, suffixRange; 47 unsigned inti, length, start, stop;47 NSUInteger i, length, start, stop; 48 48 49 49 string = [url humanReadableString]; … … 136 136 NSString *link; 137 137 FHFile *file; 138 unsigned inti = 0;138 NSUInteger i = 0; 139 139 140 140 if(!_files) { Footagehead/trunk/FHSpotlightHandler.h
r4706 r4723 30 30 31 31 @interface FHSpotlightHandler : FHHandler { 32 id_query;32 NSMetadataQuery *_query; 33 33 34 unsigned int_index;34 NSUInteger _index; 35 35 BOOL _finished; 36 36 } Footagehead/trunk/FHSpotlightHandler.m
r4721 r4723 85 85 NSString *path; 86 86 FHFile *file; 87 unsigned intcount;87 NSUInteger count; 88 88 89 89 count = [_query resultCount]; Footagehead/trunk/FHWindowController.m
r4722 r4723 90 90 91 91 if(success) 92 [_imageView setImage :image];92 [_imageView setImages:[NSArray arrayWithObject:image]]; 93 93 else 94 [_imageView setImage :[FHImage imageNamed:@"Error"]];94 [_imageView setImages:[NSArray arrayWithObject:[FHImage imageNamed:@"Error"]]]; 95 95 } else { 96 [_imageView setImage :NULL];96 [_imageView setImages:NULL]; 97 97 } 98 98
