Changeset 4906

Show
Ignore:
Timestamp:
09/28/07 16:33:14 (9 months ago)
Author:
morris
Message:

Make inspector do stuff

Change zoom to sacle in most places

Update a bit for 10.5 and 64-bit

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Footagehead/trunk/English.lproj/Browser.nib/classes.nib

    r4896 r4906  
    159159                                <key>spreadRightToLeft</key> 
    160160                                <string>id</string> 
    161                                 <key>zoomMode</key> 
     161                                <key>scalingMode</key> 
    162162                                <string>id</string> 
    163163                        </dict> 
  • Footagehead/trunk/English.lproj/Inspector.nib/classes.nib

    r4904 r4906  
    1313                <dict> 
    1414                        <key>CLASS</key> 
    15                         <string>FHInfoController</string> 
    16                         <key>LANGUAGE</key> 
    17                         <string>ObjC</string> 
    18                         <key>SUPERCLASS</key> 
    19                         <string>WIWindowController</string> 
    20                 </dict> 
    21                 <dict> 
    22                         <key>CLASS</key> 
    2315                        <string>WIWindowController</string> 
    2416                        <key>LANGUAGE</key> 
     
    2719                        <string>NSWindowController</string> 
    2820                </dict> 
     21                <dict> 
     22                        <key>CLASS</key> 
     23                        <string>FHInspectorController</string> 
     24                        <key>LANGUAGE</key> 
     25                        <string>ObjC</string> 
     26                        <key>OUTLETS</key> 
     27                        <dict> 
     28                                <key>_nameTextField</key> 
     29                                <string>NSTextField</string> 
     30                                <key>_valueTextField</key> 
     31                                <string>NSTextField</string> 
     32                        </dict> 
     33                        <key>SUPERCLASS</key> 
     34                        <string>WIWindowController</string> 
     35                </dict> 
    2936        </array> 
    3037        <key>IBVersion</key> 
  • Footagehead/trunk/English.lproj/Inspector.nib/info.nib

    r4904 r4906  
    1010        <integer>5</integer> 
    1111        <key>IBOpenObjects</key> 
    12         <array/> 
     12        <array> 
     13                <integer>2</integer> 
     14        </array> 
    1315        <key>IBSystem Version</key> 
    1416        <string>9A559</string> 
  • Footagehead/trunk/English.lproj/Localizable.strings

    r4888 r4906  
    1 /* 'image.jpg - 1/10' */ 
     1/* '640x480' */ 
     2"%.0fx%.0f" = "%1$.0fx%2$.0f"; 
     3 
     4/* '72.00 pixels/inch' */ 
     5"%.2f pixels/inch" = "%.2f pixels/inch"; 
     6 
     7/* 'image.jpg - 1/10' */ 
    28"%@ %C %u/%u" = "%1$@ %2$C %3$u/%4$u"; 
    39 
     
    511"%@ & %@" = "%1$@ & %2$@"; 
    612 
    7 /* 'image.jpg, 640x480' */ 
    8 "%@, %.0fx%.0f" = "%1$@, %2$.0fx%3$.0f"; 
    9  
    10 /* Save status (name, this file, remaining files, '...' */ 
     13/* Save status (name, this file, remaining files, '...') */ 
    1114"%@, %u/%u%C" = "%1$@, %2$u/%3$u%4$C"; 
    1215 
    1316/* '20 items, 10 images' */ 
    1417"%u %@, %u %@" = "%1$u %2$@, %3$u %4$@"; 
    15  
    16 /* ', rotated by 90' */ 
    17 ", rotated by %.0f" = ", rotated by %.0f°"; 
    18  
    19 /* ', scaled to 50%' */ 
    20 ", scaled to %.0f%%" = ", scaled to %.0f%%"; 
    2118 
    2219/* Spotlight query (query) */ 
     
    2623"Actual Size" = "Actual Size"; 
    2724 
    28 /* Move to trash dialog button title 
    29    File exists dialog button title */ 
     25/* File exists dialog button title 
     26   Move to trash dialog button title */ 
    3027"Cancel" = "Cancel"; 
     28 
     29/* Inspector label */ 
     30"Color Model" = "Color Model"; 
    3131 
    3232/* Move to trash dialog message */ 
    3333"Could Not Move To Trash" = "Could Not Move To Trash"; 
     34 
     35/* Inspector label */ 
     36"Data Size" = "Data Size"; 
    3437 
    3538/* Move to trash dialog button title */ 
     
    4245"File Exists" = "File Exists"; 
    4346 
     47/* Inspector label */ 
     48"File Name" = "File Name"; 
     49 
    4450/* Menu item title */ 
    4551"Hide Status Bar" = "Hide Status Bar"; 
     
    4854"image" = "image"; 
    4955 
     56/* Inspector label */ 
     57"Image DPI" = "Image DPI"; 
     58 
     59/* Inspector label */ 
     60"Image Size" = "Image Size"; 
     61 
    5062/* 'image' plural */ 
    5163"images" = "images"; 
     64 
     65/* Inspector toolbar item 
     66   Inspector */ 
     67"Inspector" = "Inspector"; 
    5268 
    5369/* 'item' singular */ 
     
    6985"Parent" = "Parent"; 
    7086 
     87/* Inspector label */ 
     88"Profile Name" = "Profile Name"; 
     89 
    7190/* Reload toolbar item */ 
    7291"Reload" = "Reload"; 
     
    8099/* Rotate right toolbar item */ 
    81100"Rotate Right" = "Rotate Right"; 
     101 
     102/* 'rotated by 90' */ 
     103"rotated by %.0f" = "rotated by %.0f°"; 
     104 
     105/* Scale to fit toolbar item */ 
     106"Scale To Fit" = "Scale To Fit"; 
     107 
     108/* 'scaled to 50%' */ 
     109"scaled to %.0f%%" = "scaled to %.0f%%"; 
    82110 
    83111/* 'Screen 1, 1024x768' */ 
     
    102130"The file \"%@\" already exists. Overwrite?" = "The file “%@” already exists. Overwrite?"; 
    103131 
    104 /* Zoom to fit toolbar item */ 
    105 "Zoom To Fit" = "Zoom To Fit"; 
  • Footagehead/trunk/English.lproj/MainMenu.nib/classes.nib

    r4904 r4906  
    3232                                <key>rotateRight</key> 
    3333                                <string>id</string> 
     34                                <key>scaleToFit</key> 
     35                                <string>id</string> 
     36                                <key>scalingMode</key> 
     37                                <string>id</string> 
    3438                                <key>setAsDesktopBackground</key> 
    3539                                <string>id</string> 
     
    4347                                <string>id</string> 
    4448                                <key>toggleStatusBar</key> 
    45                                 <string>id</string> 
    46                                 <key>zoomMode</key> 
    47                                 <string>id</string> 
    48                                 <key>zoomToFit</key> 
    4949                                <string>id</string> 
    5050                        </dict> 
  • Footagehead/trunk/English.lproj/MainMenu.nib/info.nib

    r4904 r4906  
    55        <key>IBFramework Version</key> 
    66        <string>628</string> 
    7         <key>IBLastKnownRelativeProjectPath</key> 
    8         <string>../../Footagehead.xcodeproj</string> 
    97        <key>IBOldestOS</key> 
    108        <integer>5</integer> 
    119        <key>IBOpenObjects</key> 
    1210        <array> 
    13                 <integer>782</integer> 
     11                <integer>646</integer> 
    1412        </array> 
    1513        <key>IBSystem Version</key> 
  • Footagehead/trunk/English.lproj/Slideshow.nib/classes.nib

    r4725 r4906  
    2323                rotateLeft = id;  
    2424                rotateRight = id;  
    25                 zoomMode = id;  
     25                scalingMode = id;  
    2626            };  
    2727            CLASS = FHWindowController;  
  • Footagehead/trunk/FHApplicationController.m

    r4904 r4906  
    239239        [[NSNotificationCenter defaultCenter] 
    240240                addObserver:self 
    241                    selector:@selector(windowControllerChangedZoomMode:) 
    242                            name:FHWindowControllerChangedZoomMode]; 
     241                   selector:@selector(windowControllerChangedScalingMode:) 
     242                           name:FHWindowControllerChangedScalingMode]; 
    243243         
    244244        [[NSNotificationCenter defaultCenter] 
     
    323323 
    324324 
    325 - (void)windowControllerChangedZoomMode:(NSNotification *)notification { 
     325- (void)windowControllerChangedScalingMode:(NSNotification *)notification { 
    326326        [self _updateViewMenu]; 
    327327} 
  • Footagehead/trunk/FHBrowserController.m

    r4904 r4906  
    4545- (void)_resizeTableView; 
    4646- (void)_reloadScreens; 
    47 - (void)_updateZoomModeToolbarItems; 
     47- (void)_updateScalingModeToolbarItems; 
    4848- (void)_toggleStatusBar:(BOOL)show; 
    4949 
     
    8888                                                                                        content:[NSImage imageNamed:@"ActualSize"] 
    8989                                                                                         target:self 
    90                                                                                          action:@selector(zoomMode:)]; 
     90                                                                                         action:@selector(scalingMode:)]; 
    9191        [item setTag:FHScaleNone]; 
    9292        [_toolbarItems setObject:item forKey:[item itemIdentifier]]; 
    9393 
    94         item = [NSToolbarItem toolbarItemWithIdentifier:@"ZoomToFit" 
    95                                                                                            name:NSLS(@"Zoom To Fit", @"Zoom to fit toolbar item") 
    96                                                                                         content:[NSImage imageNamed:@"ZoomToFit"] 
     94        item = [NSToolbarItem toolbarItemWithIdentifier:@"ScaleToFit" 
     95                                                                                           name:NSLS(@"Scale To Fit", @"Scale to fit toolbar item") 
     96                                                                                        content:[NSImage imageNamed:@"ScaleToFit"] 
    9797                                                                                         target:self 
    98                                                                                          action:@selector(zoomMode:)]; 
     98                                                                                         action:@selector(scalingMode:)]; 
    9999        [item setTag:FHScaleProportionally]; 
    100100        [_toolbarItems setObject:item forKey:[item itemIdentifier]]; 
     
    104104                                                                                        content:[NSImage imageNamed:@"StretchToFit"] 
    105105                                                                                         target:self 
    106                                                                                          action:@selector(zoomMode:)]; 
     106                                                                                         action:@selector(scalingMode:)]; 
    107107        [item setTag:FHScaleStretchedProportionally]; 
    108108        [_toolbarItems setObject:item forKey:[item itemIdentifier]]; 
     
    198198 
    199199 
    200 - (void)_updateZoomModeToolbarItems { 
     200- (void)_updateScalingModeToolbarItems { 
    201201        switch([_imageView imageScaling]) { 
    202202                case FHScaleNone: 
     
    205205                         
    206206                case FHScaleProportionally: 
    207                         [[[self window] toolbar] setSelectedItemIdentifier:@"ZoomToFit"]; 
     207                        [[[self window] toolbar] setSelectedItemIdentifier:@"ScaleToFit"]; 
    208208                        break; 
    209209                         
     
    411411        zoom = [_imageView zoom]; 
    412412         
    413         string = [NSMutableString stringWithFormat:NSLS(@"%@, %.0fx%.0f", @"'image.jpg, 640x480'"), 
    414                 name, 
     413        string = [[name mutableCopy] autorelease]; 
     414        [string appendString:@", "]; 
     415        [string appendFormat:NSLS(@"%.0fx%.0f", @"'640x480'"), 
    415416                imageSize.width, 
    416417                imageSize.height]; 
    417418 
    418419        if(zoom != 100.0) { 
    419                 [string appendFormat:NSLS(@", scaled to %.0f%%", @"', scaled to 50%'"), 
     420                [string appendString:@", "]; 
     421                [string appendFormat:NSLS(@"scaled to %.0f%%", @"'scaled to 50%'"), 
    420422                        zoom]; 
    421423        } 
    422424 
    423425        if([_imageView imageRotation] != 0.0) { 
    424                 [string appendFormat:NSLS(@", rotated by %.0f", @"', rotated by 90'"), 
     426                [string appendString:@", "]; 
     427                [string appendFormat:NSLS(@"rotated by %.0f", @"'rotated by 90'"), 
    425428                        ABS([_imageView imageRotation])]; 
    426429        } 
     
    543546        [_imageView setImageRotation:[FHSettings floatForKey:FHImageRotation]]; 
    544547         
    545         [self _updateZoomModeToolbarItems]; 
     548        [self _updateScalingModeToolbarItems]; 
    546549 
    547550        if(![FHSettings boolForKey:FHShowStatusBar]) 
     
    593596        [[NSNotificationCenter defaultCenter] 
    594597                addObserver:self 
    595                    selector:@selector(windowControllerChangedZoomMode:) 
    596                            name:FHWindowControllerChangedZoomMode]; 
     598                   selector:@selector(windowControllerChangedScalingMode:) 
     599                           name:FHWindowControllerChangedScalingMode]; 
    597600 
    598601        [[NSNotificationCenter defaultCenter] 
     
    610613 
    611614 
    612 - (void)windowControllerChangedZoomMode:(NSNotification *)notification { 
     615- (void)windowControllerChangedScalingMode:(NSNotification *)notification { 
    613616        if([notification object] == _imageView) { 
    614617                [_imageView setImageScaling:[FHSettings intForKey:FHImageScalingMethod]]; 
    615618         
    616                 [self _updateZoomModeToolbarItems]; 
     619                [self _updateScalingModeToolbarItems]; 
    617620 
    618621                [self _updateRightStatus]; 
     
    691694         
    692695        [_saveProgressIndicator setIndeterminate:YES]; 
    693         [_saveProgressTextField setStringValue:[NSSWF:NSLS(@"%@, %u/%u%C", @"Save status (name, this file, remaining files, '...'"), 
     696        [_saveProgressTextField setStringValue:[NSSWF:NSLS(@"%@, %u/%u%C", @"Save status (name, this file, remaining files, '...')"), 
    694697                [file name], _savedFiles, [_handler numberOfFiles], 0x2026]]; 
    695698} 
     
    783786                NSToolbarSeparatorItemIdentifier, 
    784787                @"ActualSize", 
    785                 @"ZoomToFit", 
     788                @"ScaleToFit", 
    786789                @"StretchToFit", 
    787790                NSToolbarSeparatorItemIdentifier, 
     
    805808                @"Reload", 
    806809                @"ActualSize", 
    807                 @"ZoomToFit", 
     810                @"ScaleToFit", 
    808811                @"StretchToFit", 
    809812                @"RotateLeft", 
     
    825828        return [NSArray arrayWithObjects: 
    826829                @"ActualSize", 
    827                 @"ZoomToFit", 
     830                @"ScaleToFit", 
    828831                @"StretchToFit", 
    829832                NULL]; 
  • Footagehead/trunk/FHImage.h

    r4902 r4906  
    3636         
    3737        NSSize                                          _size; 
     38        unsigned long long                      _dataLength; 
    3839        BOOL                                            _flipped; 
    3940        CGFloat                                         _orientation; 
     
    4445 
    4546- (id)initImageWithImage:(NSImage *)image; 
    46 - (id)initImageWithURL:(WIURL *)url; 
    4747- (id)initImageWithData:(NSData *)data; 
    4848- (id)initThumbnailWithURL:(WIURL *)url preferredSize:(NSSize)size; 
     
    5252- (BOOL)flipped; 
    5353 
     54- (NSDictionary *)properties; 
    5455- (NSSize)size; 
    5556- (NSUInteger)pixels; 
     57- (unsigned long long)dataLength; 
    5658- (CGFloat)orientation; 
    5759 
  • Footagehead/trunk/FHImage.m

    r4902 r4906  
    143143 
    144144 
    145 - (id)initImageWithURL:(WIURL *)url
     145- (id)initImageWithData:(NSData *)data
    146146        CGImageSourceRef        imageSource; 
    147147         
    148148        self = [super init]; 
    149149         
    150         imageSource = CGImageSourceCreateWithURL((CFURLRef) [url URL], NULL); 
     150        imageSource = CGImageSourceCreateWithData((CFDataRef) data, NULL); 
    151151         
    152152        if(!imageSource) { 
     
    164164        } 
    165165         
    166         CFRelease(imageSource); 
    167  
    168         return self; 
    169 
    170  
    171  
    172  
    173 - (id)initImageWithData:(NSData *)data { 
    174         CGImageSourceRef        imageSource; 
    175          
    176         self = [super init]; 
    177          
    178         imageSource = CGImageSourceCreateWithData((CFDataRef) data, NULL); 
    179          
    180         if(!imageSource) { 
    181                 [self release]; 
    182                  
    183                 return NULL; 
    184         } 
    185          
    186         if(![self _initImageWithImageSource:imageSource]) { 
    187                 CFRelease(imageSource); 
    188                  
    189                 [self release]; 
    190                  
    191                 return NULL; 
    192         } 
     166        _dataLength = [data length]; 
    193167         
    194168        CFRelease(imageSource); 
     
    283257 
    284258 
     259- (NSDictionary *)properties { 
     260        return _properties; 
     261} 
     262 
     263 
     264 
    285265- (NSSize)size { 
    286266        return _size; 
     
    291271- (NSUInteger)pixels { 
    292272        return _size.width * _size.height; 
     273} 
     274 
     275 
     276 
     277- (unsigned long long)dataLength { 
     278        return _dataLength; 
    293279} 
    294280 
  • Footagehead/trunk/FHImageView.m

    r4902 r4906  
    425425 
    426426 
    427 - (void)setImageRotation:(float)imageRotation { 
     427- (void)setImageRotation:(CGFloat)imageRotation { 
    428428        _imageRotation = imageRotation; 
    429429 
     
    436436 
    437437 
    438 - (float)imageRotation { 
     438- (CGFloat)imageRotation { 
    439439        return _imageRotation; 
    440440} 
  • Footagehead/trunk/FHInspectorController.h

    r4904 r4906  
    2828 
    2929@interface FHInspectorController : WIWindowController { 
    30  
     30        IBOutlet NSTextField                    *_nameTextField; 
     31        IBOutlet NSTextField                    *_valueTextField; 
     32         
     33        NSMutableArray                                  *_sortedKeys; 
     34        NSMutableDictionary                             *_allValues; 
    3135} 
    3236 
  • Footagehead/trunk/FHInspectorController.m

    r4904 r4906  
    3030#import "FHBrowserController.h" 
    3131#import "FHFile.h" 
     32#import "FHImage.h" 
    3233#import "FHInspectorController.h" 
    3334 
     
    3536 
    3637- (void)_updateFromFile:(FHFile *)file; 
     38- (void)_updateValuesFromFile:(FHFile *)file; 
     39- (void)_setValue:(NSString *)value forKey:(NSString *)key; 
     40- (void)_relayoutFields; 
     41- (NSTextField *)_textFieldFromArchetype:(NSTextField *)archetypeTextField; 
    3742 
    3843@end 
     
    4247 
    4348- (void)_updateFromFile:(FHFile *)file { 
    44         NSLog(@"%@", [file name]); 
     49        [_sortedKeys removeAllObjects]; 
     50        [_allValues removeAllObjects]; 
     51         
     52        [self _updateValuesFromFile:file]; 
     53        [self _relayoutFields]; 
     54
     55 
     56 
     57 
     58- (void)_updateValuesFromFile:(FHFile *)file { 
     59        NSEnumerator    *enumerator, *dictionaryEnumerator; 
     60        NSDictionary    *properties, *dictionary; 
     61        FHImage                 *image; 
     62        NSString                *key, *dictionaryKey, *dictionaryValue; 
     63         
     64        image = [file image]; 
     65        properties = [image properties]; 
     66         
     67        [self _setValue:[file name] forKey:NSLS(@"File Name", @"Inspector label")]; 
     68 
     69        if(image) { 
     70                [self _setValue:[NSSWF:NSLS(@"%.0fx%.0f", @"'640x480'"), [image size].width, [image size].height] 
     71                                 forKey:NSLS(@"Image Size", @"Inspector label")]; 
     72        } 
     73         
     74        if(properties) { 
     75                if([properties floatForKey:(id) kCGImagePropertyDPIHeight] > 0.0) { 
     76                        [self _setValue:[NSSWF:NSLS(@"%.2f pixels/inch", @"'72.00 pixels/inch'"), [properties floatForKey:(id) kCGImagePropertyDPIHeight]] 
     77                                         forKey:NSLS(@"Image DPI", @"Inspector label")]; 
     78                } 
     79                 
     80                [self _setValue:[NSString humanReadableStringForSize:[image dataLength]] 
     81                                 forKey:NSLS(@"Data Size", @"Inspector label")]; 
     82                [self _setValue:[properties objectForKey:(id) kCGImagePropertyColorModel] 
     83                                 forKey:NSLS(@"Color Model", @"Inspector label")]; 
     84                [self _setValue:[properties objectForKey:(id) kCGImagePropertyProfileName] 
     85                                 forKey:NSLS(@"Profile Name", @"Inspector label")]; 
     86                 
     87                enumerator = [[NSArray arrayWithObjects: 
     88                        (id) kCGImagePropertyTIFFDictionary, 
     89                        (id) kCGImagePropertyGIFDictionary, 
     90                        (id) kCGImagePropertyJFIFDictionary, 
     91                        (id) kCGImagePropertyExifDictionary, 
     92                        (id) kCGImagePropertyPNGDictionary, 
     93                        (id) kCGImagePropertyIPTCDictionary, 
     94                        (id) kCGImagePropertyGPSDictionary, 
     95                        (id) kCGImagePropertyRawDictionary, 
     96                        (id) kCGImagePropertyCIFFDictionary, 
     97                        (id) kCGImageProperty8BIMDictionary, 
     98                        NULL] objectEnumerator]; 
     99 
     100                while((key = [enumerator nextObject])) { 
     101                        dictionary = [properties objectForKey:key]; 
     102                         
     103                        if([dictionary count] > 0) { 
     104                                [self _setValue:@"-" forKey:@"-"]; 
     105                                dictionaryEnumerator = [dictionary keyEnumerator]; 
     106                         
     107                                while((dictionaryKey = [dictionaryEnumerator nextObject])) { 
     108                                        dictionaryValue = [dictionary objectForKey:dictionaryKey]; 
     109                                         
     110                                        [self _setValue:dictionaryValue forKey:dictionaryKey]; 
     111                                } 
     112                        } 
     113                } 
     114        } 
     115
     116 
     117 
     118 
     119- (void)_setValue:(NSString *)value forKey:(NSString *)key { 
     120        if(key && value) { 
     121                [_sortedKeys addObject:key]; 
     122                [_allValues setObject:value forKey:key]; 
     123        } 
     124
     125 
     126 
     127 
     128- (void)_relayoutFields { 
     129        NSTextField             *nameTextField, *valueTextField; 
     130        NSView                  *contentView; 
     131        NSEnumerator    *enumerator; 
     132        NSString                *key, *value; 
     133        NSRect                  windowFrame; 
     134        NSSize                  nameSize, valueSize; 
     135        CGFloat                 verticalOffset, height; 
     136         
     137        verticalOffset = 18.0; 
     138        contentView = [[self window] contentView]; 
     139        enumerator = [_sortedKeys reverseObjectEnumerator]; 
     140         
     141        [[contentView subviews] makeObjectsPerformSelector:@selector(removeFromSuperview)]; 
     142         
     143        while((key = [enumerator nextObject])) { 
     144                if([key isEqualToString:@"-"]) { 
     145                        verticalOffset += 16.0; 
     146                         
     147                        continue; 
     148                } 
     149                 
     150                value = [_allValues objectForKey:key]; 
     151                 
     152                nameTextField = [self _textFieldFromArchetype:_nameTextField]; 
     153                [nameTextField setStringValue:[key stringByAppendingString:@":"]]; 
     154                 
     155                valueTextField = [self _textFieldFromArchetype:_valueTextField]; 
     156                [valueTextField setStringValue:value]; 
     157                 
     158                nameSize = [[nameTextField cell] cellSizeForBounds:NSMakeRect(0.0, 0.0, [nameTextField frame].size.width, 10000.0)]; 
     159                valueSize = [[valueTextField cell] cellSizeForBounds:NSMakeRect(0.0, 0.0, [valueTextField frame].size.width, 10000.0)]; 
     160                height = MAX(nameSize.height, valueSize.height); 
     161                 
     162                [nameTextField setFrame:NSMakeRect([nameTextField frame].origin.x, verticalOffset, 
     163                                                                                   [nameTextField frame].size.width, height)]; 
     164                [valueTextField setFrame:NSMakeRect([valueTextField frame].origin.x, verticalOffset, 
     165                                                                                        [valueTextField frame].size.width, height)]; 
     166                 
     167                [contentView addSubview:nameTextField]; 
     168                [contentView addSubview:valueTextField]; 
     169                 
     170                verticalOffset += height + 2.0; 
     171        } 
     172         
     173        windowFrame = [[self window] frame]; 
     174        height = windowFrame.size.height; 
     175        windowFrame.size.height = verticalOffset + 28.0; 
     176        windowFrame.origin.y -= windowFrame.size.height - height; 
     177        [[self window] setFrame:windowFrame display:YES animate:YES]; 
     178
     179 
     180 
     181 
     182- (NSTextField *)_textFieldFromArchetype:(NSTextField *)archetypeTextField { 
     183        NSTextField             *textField; 
     184         
     185        textField = [[NSTextField alloc] initWithFrame:[archetypeTextField frame]]; 
     186        [textField setEditable:[archetypeTextField isEditable]]; 
     187        [textField setSelectable:[archetypeTextField isSelectable]]; 
     188        [textField setBordered:[archetypeTextField isBordered]]; 
     189        [textField setBezelStyle:[archetypeTextField bezelStyle]]; 
     190        [textField setFont:[archetypeTextField font]]; 
     191        [textField setAlignment:[archetypeTextField alignment]]; 
     192        [textField setTextColor:[archetypeTextField textColor]]; 
     193        [textField setDrawsBackground:[archetypeTextField drawsBackground]]; 
     194        [textField setBackgroundColor:[archetypeTextField backgroundColor]]; 
     195         
     196        return [textField autorelease]; 
    45197} 
    46198 
     
    64216- (id)init { 
    65217        self = [super initWithWindowNibName:@"Inspector"]; 
     218         
     219        _sortedKeys = [[NSMutableArray alloc] init]; 
     220        _allValues = [[NSMutableDictionary alloc] init]; 
    66221         
    67222         [[NSNotificationCenter defaultCenter] 
     
    77232 
    78233 
     234- (void)dealloc { 
     235        [_nameTextField release]; 
     236        [_valueTextField release]; 
     237 
     238        [_sortedKeys release]; 
     239        [_allValues release]; 
     240         
     241        [super dealloc]; 
     242} 
     243 
     244 
     245 
    79246#pragma mark - 
    80247 
    81 - (void)awakeFromNib { 
     248- (void)windowDidLoad { 
     249        [[self window] setTitle:NSLS(@"Inspector", @"Inspector")]; 
     250         
     251        [[_nameTextField retain] removeFromSuperview]; 
     252        [[_valueTextField retain] removeFromSuperview]; 
    82253} 
    83254 
  • Footagehead/trunk/FHWindowController.h

    r4733 r4906  
    3131 
    3232@interface FHWindowController : WIWindowController { 
    33         IBOutlet FHImageView                    *_imageView; 
    34         IBOutlet NSProgressIndicator    *_progressIndicator; 
     33        IBOutlet FHImageView                                           *_imageView; 
     34        IBOutlet NSProgressIndicator                           *_progressIndicator; 
    3535 
    36         FHImageLoader                                   *_imageLoader; 
     36        FHImageLoader                                                          *_imageLoader; 
    3737         
    38         NSMutableDictionary                             *_spreads; 
     38        NSMutableDictionary                                                    *_spreads; 
    3939} 
    4040 
    4141 
    42 #define FHWindowControllerChangedZoomMode      @"FHWindowControllerChangedZoomMode" 
    43 #define FHWindowControllerChangedSpreadMode     @"FHWindowControllerChangedSpreadMode" 
     42#define FHWindowControllerChangedScalingMode   @"FHWindowControllerChangedScalingMode" 
     43#define FHWindowControllerChangedSpreadMode            @"FHWindowControllerChangedSpreadMode" 
    4444 
    4545 
     
    6868- (void)nextPage:(id)sender; 
    6969 
    70 - (void)zoomMode:(id)sender; 
     70- (void)scalingMode:(id)sender; 
    7171- (void)spreadMode:(id)sender; 
    7272- (void)spreadRightToLeft:(id)sender; 
  • Footagehead/trunk/FHWindowController.m

    r4891 r4906  
    513513#pragma mark - 
    514514 
    515 - (void)zoomMode:(id)sender { 
     515- (void)scalingMode:(id)sender { 
    516516        FHImageScaling          scaling; 
    517517 
     
    522522        [FHSettings setInt:scaling forKey:FHImageScalingMethod]; 
    523523 
    524         [[NSNotificationCenter defaultCenter] postNotificationName:FHWindowControllerChangedZoomMode object:_imageView]; 
     524        [[NSNotificationCenter defaultCenter] postNotificationName:FHWindowControllerChangedScalingMode object:_imageView]; 
    525525} 
    526526 
  • Footagehead/trunk/Footagehead.xcodeproj/project.pbxproj

    r4904 r4906  
    8181                77B8504C0CAAB289008A53C5 /* FHInspectorController.m in Sources */ = {isa = PBXBuildFile; fileRef = 77B8504B0CAAB289008A53C5 /* FHInspectorController.m */; }; 
    8282                77B850700CAAB3C5008A53C5 /* Inspector.nib in Resources */ = {isa = PBXBuildFile; fileRef = 77B8506E0CAAB3C5008A53C5 /* Inspector.nib */; }; 
     83                77B854880CAD40BA008A53C5 /* Inspector.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 77B854870CAD40BA008A53C5 /* Inspector.tiff */; }; 
    8384                77BD99520760B7380007D034 /* FHTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 77BD99500760B7380007D034 /* FHTableView.m */; }; 
    8485                77CDAE72083B3515003BE654 /* ReleaseNotes.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 77CDAE70083B3515003BE654 /* ReleaseNotes.rtf */; }; 
     
    108109                A5A183F00BDD5231004788EF /* FHWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = A5A183EE0BDD5231004788EF /* FHWindowController.m */; }; 
    109110                A5A184320BDD5467004788EF /* ActualSize.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A5A184310BDD5467004788EF /* ActualSize.tiff */; }; 
    110                 A5A184340BDD546D004788EF /* ZoomToFit.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A5A184330BDD546D004788EF /* ZoomToFit.tiff */; }; 
     111                A5A184340BDD546D004788EF /* ScaleToFit.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A5A184330BDD546D004788EF /* ScaleToFit.tiff */; }; 
    111112                A5A184370BDD5473004788EF /* RotateLeft.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A5A184350BDD5473004788EF /* RotateLeft.tiff */; }; 
    112113                A5A184380BDD5473004788EF /* RotateRight.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A5A184360BDD5473004788EF /* RotateRight.tiff */; }; 
     
    283284                77B8504B0CAAB289008A53C5 /* FHInspectorController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FHInspectorController.m; sourceTree = "<group>"; }; 
    284285                77B8506F0CAAB3C5008A53C5 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/Inspector.nib; sourceTree = "<group>"; }; 
     286                77B854870CAD40BA008A53C5 /* Inspector.tiff */ = {isa = PBXFileReference;