Changeset 4723

Show
Ignore:
Timestamp:
04/25/07 00:36:22 (1 year ago)
Author:
morris
Message:

Blarg

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Footagehead/trunk/English.lproj/MainMenu.nib/info.nib

    r4716 r4723  
    88        <dict> 
    99                <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> 
    1111        </dict> 
    1212        <key>IBFramework Version</key> 
     
    1919        </array> 
    2020        <key>IBSystem Version</key> 
    21         <string>8P135</string> 
     21        <string>8P2137</string> 
    2222</dict> 
    2323</plist> 
  • Footagehead/trunk/FHArchiveHandler.m

    r4418 r4723  
    4646        static NSMutableArray   *types; 
    4747        NSArray                                 *classes; 
    48         unsigned int                  i, count; 
     48        NSUInteger                            i, count; 
    4949         
    5050        if(!types) { 
  • Footagehead/trunk/FHBrowserController.m

    r4722 r4723  
    211211- (void)_toggleStatusBar:(BOOL)show { 
    212212        NSRect          frame; 
    213         float         height; 
     213        CGFloat               height; 
    214214         
    215215        frame           = [_contentBox frame]; 
     
    356356        NSMutableString         *string; 
    357357        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) { 
    362361                [_rightStatusTextField setStringValue:@""]; 
    363362                 
     
    365364        } 
    366365         
    367         imageSize = [[_imageView image] size]; 
     366        imageSize = [_imageView imageSize]; 
    368367         
    369368        if(imageSize.width < 1.0 || imageSize.height <= 1.0) { 
     
    662661 
    663662 
    664 - (float)splitView:(NSSplitView *)splitView constrainMinCoordinate:(float)proposedMin ofSubviewAt:(int)offset { 
     663- (CGFloat)splitView:(NSSplitView *)splitView constrainMinCoordinate:(CGFloat)proposedMin ofSubviewAt:(NSInteger)offset { 
    665664        return 49.0; 
    666665} 
     
    668667 
    669668 
    670 - (float)splitView:(NSSplitView *)splitView constrainMaxCoordinate:(float)proposedMax ofSubviewAt:(int)offset { 
     669- (CGFloat)splitView:(NSSplitView *)splitView constrainMaxCoordinate:(CGFloat)proposedMax ofSubviewAt:(NSInteger)offset { 
    671670        return 145.0; 
    672671} 
     
    674673 
    675674 
    676 - (float)splitView:(NSSplitView *)splitView constrainSplitPosition:(float)proposedPosition ofSubviewAt:(int)offset { 
    677         int                   position; 
     675- (CGFloat)splitView:(NSSplitView *)splitView constrainSplitPosition:(CGFloat)proposedPosition ofSubviewAt:(NSInteger)offset { 
     676        CGFloat               position; 
    678677 
    679678        if([[NSApp currentEvent] alternateKeyModifier]) { 
  • Footagehead/trunk/FHCache.m

    r4706 r4723  
    148148        NSArray                 *keys; 
    149149        NSString                *key, *string; 
    150         unsigned int  i, count; 
     150        NSUInteger            i, count; 
    151151         
    152152        keys = [_thumbnails allKeys]; 
  • Footagehead/trunk/FHFeedHandler.m

    r4706 r4723  
    5555        CFXMLNodeRef                    node, itemNode; 
    5656        FHFeedParseMode                 mode; 
    57         unsigned int                  i, count, j, itemCount; 
     57        NSUInteger                            i, count, j, itemCount; 
    5858         
    5959        contentTree = [self contentTree]; 
     
    103103        CFXMLTreeRef    tree; 
    104104        CFXMLNodeRef    node; 
    105         unsigned int  i, count; 
     105        NSUInteger            i, count; 
    106106         
    107107        count = CFTreeGetChildCount(imageTree); 
     
    257257        CFXMLTreeRef    itemTree; 
    258258        CFXMLNodeRef    node; 
    259         unsigned int  i, count; 
     259        NSUInteger            i, count; 
    260260         
    261261        count = CFTreeGetChildCount(tree); 
     
    279279        NSString                        *name; 
    280280        CFXMLNodeRef            node; 
    281         unsigned int          i, count; 
     281        NSUInteger                    i, count; 
    282282         
    283283        value = [NSMutableString string]; 
     
    316316        NSString                *content; 
    317317        FHFile                  *file; 
    318         unsigned int  i, index, count, j, linkCount; 
     318        NSUInteger            i, index, count, j, linkCount; 
    319319         
    320320        if(!_files) { 
  • Footagehead/trunk/FHFileHandler.m

    r4706 r4723  
    131131        OSStatus                        err; 
    132132        BOOL                            isDirectory; 
    133         unsigned int          i, count, index; 
     133        NSUInteger                    i, count, index; 
    134134 
    135135        if(!_files) { 
  • Footagehead/trunk/FHFlickrHandler.m

    r4706 r4723  
    4141        WIURL                   *url; 
    4242        NSRange                 range; 
    43         unsigned int  i, index, count; 
     43        NSUInteger            i, index, count; 
    4444         
    4545        if(!_files) { 
  • Footagehead/trunk/FHHTMLHandler.m

    r4706 r4723  
    5858        NSArray                 *types; 
    5959        FHFile                  *file; 
    60         unsigned int  i, index, count; 
     60        NSUInteger            i, index, count; 
    6161         
    6262        if(!_files) { 
  • Footagehead/trunk/FHHTMLParser.m

    r4706 r4723  
    4242        NSString                *token, *link, *path; 
    4343        WIURL                   *url; 
    44         unsigned int  i, count, length; 
     44        NSUInteger            i, count, length; 
    4545         
    4646        links = [NSMutableArray arrayWithCapacity:50]; 
  • Footagehead/trunk/FHHandler.h

    r4706 r4723  
    3737        id                                                      _delegate; 
    3838 
    39         unsigned int                          _numberOfFiles; 
    40         unsigned int                          _numberOfImages; 
     39        NSUInteger                                    _numberOfFiles; 
     40        NSUInteger                                    _numberOfImages; 
    4141} 
    4242 
     
    5353 
    5454- (NSArray *)files; 
    55 - (unsigned int)numberOfFiles; 
    56 - (unsigned int)numberOfImages; 
     55- (NSUInteger)numberOfFiles; 
     56- (NSUInteger)numberOfImages; 
    5757- (void)removeFile:(FHFile *)file; 
    5858 
  • Footagehead/trunk/FHHandler.m

    r4706 r4723  
    7373        NSArray                 *classes; 
    7474        Class                   class; 
    75         unsigned int  i, count; 
     75        NSUInteger            i, count; 
    7676         
    7777        classes = [self handlerClasses]; 
     
    159159 
    160160 
    161 - (unsigned int)numberOfFiles { 
     161- (NSUInteger)numberOfFiles { 
    162162        return _numberOfFiles; 
    163163} 
     
    165165 
    166166 
    167 - (unsigned int)numberOfImages { 
     167- (NSUInteger)numberOfImages { 
    168168        return _numberOfImages; 
    169169} 
  • Footagehead/trunk/FHImageView.h

    r4716 r4723  
    4545        IBOutlet NSScrollView           *_scrollView; 
    4646         
    47         FHImage                                         *_image; 
     47        NSArray                                         *_images; 
     48        NSSize                                          _imageSize; 
     49         
    4850        FHImageScaling                          _imageScaling; 
    49         float                                         _imageRotation; 
     51        CGFloat                                               _imageRotation; 
    5052         
    5153        NSColor                                         *_backgroundColor; 
     
    5557         
    5658        BOOL                                            _dragging; 
     59        BOOL                                            _adjustingScaling; 
    5760} 
    5861 
    5962 
    60 - (void)setImage:(FHImage *)image; 
    61 - (FHImage *)image; 
     63- (void)setImages:(NSArray *)images; 
     64- (NSArray *)images; 
     65- (NSSize)imageSize; 
    6266- (void)setImageScaling:(FHImageScaling)newScaling; 
    6367- (FHImageScaling)imageScaling; 
    64 - (void)setImageRotation:(float)rotation; 
    65 - (float)imageRotation; 
     68- (void)setImageRotation:(CGFloat)rotation; 
     69- (CGFloat)imageRotation; 
    6670- (void)setBackgroundColor:(NSColor *)color; 
    6771- (NSColor *)backgroundColor; 
  • Footagehead/trunk/FHImageView.m

    r4721 r4723  
    6363 
    6464- (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]; 
    7266                 
    7367        if([_scrollView hasHorizontalScroller] || [_scrollView hasVerticalScroller]) 
     
    8377- (void)_adjustScaling { 
    8478        NSSize      contentSize, imageSize, frameSize; 
    85         float       size; 
     79        CGFloat         size, scrollerWidth; 
     80         
     81        if(_adjustingScaling) 
     82                return; 
     83         
     84        _adjustingScaling = YES; 
    8685         
    8786        if(_scrollView) { 
     
    9392                [self setFrameSize:contentSize]; 
    9493                 
    95                 if(_image && (_imageScaling == FHScaleNone || 
    96                                           _imageScaling == FHScaleWidthProportionally || 
    97                                           _imageScaling == FHScaleHeightProportionally)) { 
     94                if([_images count] > 0 && (_imageScaling == FHScaleNone || 
     95                                                                  _imageScaling == FHScaleWidthProportionally || 
     96                                                                  _imageScaling == FHScaleHeightProportionally)) { 
    9897                        imageSize = [self _scaledImageSizeForBounds:contentSize]; 
    9998                         
     
    106105                        frameSize = NSMakeSize(MAX(contentSize.width, imageSize.width), MAX(contentSize.height, imageSize.height)); 
    107106                         
     107                        scrollerWidth = [NSScroller scrollerWidth]; 
     108                         
    108109                        if(imageSize.width > contentSize.width) { 
    109110                                [_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; 
    112116                        } 
    113117                         
    114118                        if(imageSize.height > contentSize.height) { 
    115119                                [_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; 
    118125                        } 
    119126                         
     
    122129                } 
    123130        } 
     131         
     132        _adjustingScaling = NO; 
    124133} 
    125134 
     
    130139        float           dx, dy, d; 
    131140         
    132         size = [_image size]
     141        size = _imageSize
    133142         
    134143        if(_imageScaling == FHScaleNone) 
     
    187196 
    188197- (void)dealloc { 
    189         [_image release]; 
     198        [_images release]; 
     199 
    190200        [_backgroundColor release]; 
    191201         
     
    200210#pragma mark - 
    201211 
    202 - (void)setImage:(FHImage *)image
     212- (void)setImages:(NSArray *)images
    203213        BOOL    display; 
    204214 
    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        } 
    211228 
    212229        [self _adjustScaling]; 
     
    218235 
    219236 
    220 - (FHImage *)image { 
    221         return _image; 
     237- (NSArray *)images { 
     238        return _images; 
     239
     240 
     241 
     242 
     243- (NSSize)imageSize { 
     244        return _imageSize; 
    222245} 
    223246 
     
    369392 
    370393- (void)drawRect:(NSRect)frame { 
     394        FHImage         *image; 
    371395        NSRect          bounds, rect; 
    372396         
     
    376400        NSRectFill(bounds); 
    377401         
    378         if(_image) { 
     402        if([_images count] > 0) { 
     403                image = [_images objectAtIndex:0]; 
     404 
    379405                rect.size = [self _scaledImageSizeForBounds:bounds.size]; 
    380406                rect.origin.x = floorf((bounds.size.width  - rect.size.width)  / 2.0); 
    381407                rect.origin.y = floorf((bounds.size.height - rect.size.height) / 2.0); 
    382408                 
    383                 [_image drawInRect:rect atAngle:_imageRotation]; 
     409                [image drawInRect:rect atAngle:_imageRotation]; 
    384410                 
    385411                if(_label && [_label length] > 0) 
  • Footagehead/trunk/FHRangeHandler.m

    r4706 r4723  
    4545        NSString                *string, *prefix, *suffix, *rangeString; 
    4646        NSRange                 prefixRange, suffixRange; 
    47         unsigned int  i, length, start, stop; 
     47        NSUInteger            i, length, start, stop; 
    4848         
    4949        string = [url humanReadableString]; 
     
    136136        NSString                *link; 
    137137        FHFile                  *file; 
    138         unsigned int  i = 0; 
     138        NSUInteger            i = 0; 
    139139         
    140140        if(!_files) { 
  • Footagehead/trunk/FHSpotlightHandler.h

    r4706 r4723  
    3030 
    3131@interface FHSpotlightHandler : FHHandler { 
    32         id                                             _query; 
     32        NSMetadataQuery                        *_query; 
    3333 
    34         unsigned int                  _index; 
     34        NSUInteger                            _index; 
    3535        BOOL                                    _finished; 
    3636} 
  • Footagehead/trunk/FHSpotlightHandler.m

    r4721 r4723  
    8585        NSString                *path; 
    8686        FHFile                  *file; 
    87         unsigned int  count; 
     87        NSUInteger            count; 
    8888         
    8989        count = [_query resultCount]; 
  • Footagehead/trunk/FHWindowController.m

    r4722 r4723  
    9090                 
    9191                if(success) 
    92                         [_imageView setImage:image]; 
     92                        [_imageView setImages:[NSArray arrayWithObject:image]]; 
    9393                else 
    94                         [_imageView setImage:[FHImage imageNamed:@"Error"]]; 
     94                        [_imageView setImages:[NSArray arrayWithObject:[FHImage imageNamed:@"Error"]]]; 
    9595        } else { 
    96                 [_imageView setImage:NULL]; 
     96                [_imageView setImages:NULL]; 
    9797        } 
    9898