Changeset 4906
- Timestamp:
- 09/28/07 16:33:14 (9 months ago)
- Files:
-
- Footagehead/trunk/English.lproj/Browser.nib/classes.nib (modified) (1 diff)
- Footagehead/trunk/English.lproj/Inspector.nib/classes.nib (modified) (2 diffs)
- Footagehead/trunk/English.lproj/Inspector.nib/info.nib (modified) (1 diff)
- Footagehead/trunk/English.lproj/Inspector.nib/keyedobjects.nib (modified) (previous)
- Footagehead/trunk/English.lproj/Localizable.strings (modified) (8 diffs)
- Footagehead/trunk/English.lproj/MainMenu.nib/classes.nib (modified) (2 diffs)
- Footagehead/trunk/English.lproj/MainMenu.nib/info.nib (modified) (1 diff)
- Footagehead/trunk/English.lproj/MainMenu.nib/keyedobjects.nib (modified) (previous)
- Footagehead/trunk/English.lproj/Slideshow.nib/classes.nib (modified) (1 diff)
- Footagehead/trunk/FHApplicationController.m (modified) (2 diffs)
- Footagehead/trunk/FHBrowserController.m (modified) (13 diffs)
- Footagehead/trunk/FHImage.h (modified) (3 diffs)
- Footagehead/trunk/FHImage.m (modified) (4 diffs)
- Footagehead/trunk/FHImageView.m (modified) (2 diffs)
- Footagehead/trunk/FHInspectorController.h (modified) (1 diff)
- Footagehead/trunk/FHInspectorController.m (modified) (5 diffs)
- Footagehead/trunk/FHWindowController.h (modified) (2 diffs)
- Footagehead/trunk/FHWindowController.m (modified) (2 diffs)
- Footagehead/trunk/Footagehead.xcodeproj/project.pbxproj (modified) (13 diffs)
- Footagehead/trunk/German.lproj/Browser.nib/classes.nib (modified) (1 diff)
- Footagehead/trunk/German.lproj/Localizable.strings (modified) (4 diffs)
- Footagehead/trunk/German.lproj/MainMenu.nib/classes.nib (modified) (1 diff)
- Footagehead/trunk/German.lproj/MainMenu.nib/info.nib (modified) (1 diff)
- Footagehead/trunk/German.lproj/MainMenu.nib/keyedobjects.nib (modified) (previous)
- Footagehead/trunk/German.lproj/Slideshow.nib/classes.nib (modified) (1 diff)
- Footagehead/trunk/Inspector.tiff (added)
- Footagehead/trunk/Japanese.lproj/Browser.nib/classes.nib (modified) (1 diff)
- Footagehead/trunk/Japanese.lproj/Localizable.strings (modified) (4 diffs)
- Footagehead/trunk/Japanese.lproj/MainMenu.nib/classes.nib (modified) (3 diffs)
- Footagehead/trunk/Japanese.lproj/MainMenu.nib/info.nib (modified) (2 diffs)
- Footagehead/trunk/Japanese.lproj/MainMenu.nib/keyedobjects.nib (modified) (previous)
- Footagehead/trunk/ScaleToFit.tiff (moved) (moved from Footagehead/trunk/ZoomToFit.tiff)
- Footagehead/trunk/localize.sh (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
Footagehead/trunk/English.lproj/Browser.nib/classes.nib
r4896 r4906 159 159 <key>spreadRightToLeft</key> 160 160 <string>id</string> 161 <key> zoomMode</key>161 <key>scalingMode</key> 162 162 <string>id</string> 163 163 </dict> Footagehead/trunk/English.lproj/Inspector.nib/classes.nib
r4904 r4906 13 13 <dict> 14 14 <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>23 15 <string>WIWindowController</string> 24 16 <key>LANGUAGE</key> … … 27 19 <string>NSWindowController</string> 28 20 </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> 29 36 </array> 30 37 <key>IBVersion</key> Footagehead/trunk/English.lproj/Inspector.nib/info.nib
r4904 r4906 10 10 <integer>5</integer> 11 11 <key>IBOpenObjects</key> 12 <array/> 12 <array> 13 <integer>2</integer> 14 </array> 13 15 <key>IBSystem Version</key> 14 16 <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' */ 2 8 "%@ %C %u/%u" = "%1$@ %2$C %3$u/%4$u"; 3 9 … … 5 11 "%@ & %@" = "%1$@ & %2$@"; 6 12 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, '...') */ 11 14 "%@, %u/%u%C" = "%1$@, %2$u/%3$u%4$C"; 12 15 13 16 /* '20 items, 10 images' */ 14 17 "%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%%";21 18 22 19 /* Spotlight query (query) */ … … 26 23 "Actual Size" = "Actual Size"; 27 24 28 /* Move to trashdialog button title29 File existsdialog button title */25 /* File exists dialog button title 26 Move to trash dialog button title */ 30 27 "Cancel" = "Cancel"; 28 29 /* Inspector label */ 30 "Color Model" = "Color Model"; 31 31 32 32 /* Move to trash dialog message */ 33 33 "Could Not Move To Trash" = "Could Not Move To Trash"; 34 35 /* Inspector label */ 36 "Data Size" = "Data Size"; 34 37 35 38 /* Move to trash dialog button title */ … … 42 45 "File Exists" = "File Exists"; 43 46 47 /* Inspector label */ 48 "File Name" = "File Name"; 49 44 50 /* Menu item title */ 45 51 "Hide Status Bar" = "Hide Status Bar"; … … 48 54 "image" = "image"; 49 55 56 /* Inspector label */ 57 "Image DPI" = "Image DPI"; 58 59 /* Inspector label */ 60 "Image Size" = "Image Size"; 61 50 62 /* 'image' plural */ 51 63 "images" = "images"; 64 65 /* Inspector toolbar item 66 Inspector */ 67 "Inspector" = "Inspector"; 52 68 53 69 /* 'item' singular */ … … 69 85 "Parent" = "Parent"; 70 86 87 /* Inspector label */ 88 "Profile Name" = "Profile Name"; 89 71 90 /* Reload toolbar item */ 72 91 "Reload" = "Reload"; … … 80 99 /* Rotate right toolbar item */ 81 100 "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%%"; 82 110 83 111 /* 'Screen 1, 1024x768' */ … … 102 130 "The file \"%@\" already exists. Overwrite?" = "The file “%@” already exists. Overwrite?"; 103 131 104 /* Zoom to fit toolbar item */105 "Zoom To Fit" = "Zoom To Fit";Footagehead/trunk/English.lproj/MainMenu.nib/classes.nib
r4904 r4906 32 32 <key>rotateRight</key> 33 33 <string>id</string> 34 <key>scaleToFit</key> 35 <string>id</string> 36 <key>scalingMode</key> 37 <string>id</string> 34 38 <key>setAsDesktopBackground</key> 35 39 <string>id</string> … … 43 47 <string>id</string> 44 48 <key>toggleStatusBar</key> 45 <string>id</string>46 <key>zoomMode</key>47 <string>id</string>48 <key>zoomToFit</key>49 49 <string>id</string> 50 50 </dict> Footagehead/trunk/English.lproj/MainMenu.nib/info.nib
r4904 r4906 5 5 <key>IBFramework Version</key> 6 6 <string>628</string> 7 <key>IBLastKnownRelativeProjectPath</key>8 <string>../../Footagehead.xcodeproj</string>9 7 <key>IBOldestOS</key> 10 8 <integer>5</integer> 11 9 <key>IBOpenObjects</key> 12 10 <array> 13 <integer> 782</integer>11 <integer>646</integer> 14 12 </array> 15 13 <key>IBSystem Version</key> Footagehead/trunk/English.lproj/Slideshow.nib/classes.nib
r4725 r4906 23 23 rotateLeft = id; 24 24 rotateRight = id; 25 zoomMode = id;25 scalingMode = id; 26 26 }; 27 27 CLASS = FHWindowController; Footagehead/trunk/FHApplicationController.m
r4904 r4906 239 239 [[NSNotificationCenter defaultCenter] 240 240 addObserver:self 241 selector:@selector(windowControllerChanged ZoomMode:)242 name:FHWindowControllerChanged ZoomMode];241 selector:@selector(windowControllerChangedScalingMode:) 242 name:FHWindowControllerChangedScalingMode]; 243 243 244 244 [[NSNotificationCenter defaultCenter] … … 323 323 324 324 325 - (void)windowControllerChanged ZoomMode:(NSNotification *)notification {325 - (void)windowControllerChangedScalingMode:(NSNotification *)notification { 326 326 [self _updateViewMenu]; 327 327 } Footagehead/trunk/FHBrowserController.m
r4904 r4906 45 45 - (void)_resizeTableView; 46 46 - (void)_reloadScreens; 47 - (void)_update ZoomModeToolbarItems;47 - (void)_updateScalingModeToolbarItems; 48 48 - (void)_toggleStatusBar:(BOOL)show; 49 49 … … 88 88 content:[NSImage imageNamed:@"ActualSize"] 89 89 target:self 90 action:@selector( zoomMode:)];90 action:@selector(scalingMode:)]; 91 91 [item setTag:FHScaleNone]; 92 92 [_toolbarItems setObject:item forKey:[item itemIdentifier]]; 93 93 94 item = [NSToolbarItem toolbarItemWithIdentifier:@" ZoomToFit"95 name:NSLS(@" Zoom To Fit", @"Zoomto 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"] 97 97 target:self 98 action:@selector( zoomMode:)];98 action:@selector(scalingMode:)]; 99 99 [item setTag:FHScaleProportionally]; 100 100 [_toolbarItems setObject:item forKey:[item itemIdentifier]]; … … 104 104 content:[NSImage imageNamed:@"StretchToFit"] 105 105 target:self 106 action:@selector( zoomMode:)];106 action:@selector(scalingMode:)]; 107 107 [item setTag:FHScaleStretchedProportionally]; 108 108 [_toolbarItems setObject:item forKey:[item itemIdentifier]]; … … 198 198 199 199 200 - (void)_update ZoomModeToolbarItems {200 - (void)_updateScalingModeToolbarItems { 201 201 switch([_imageView imageScaling]) { 202 202 case FHScaleNone: … … 205 205 206 206 case FHScaleProportionally: 207 [[[self window] toolbar] setSelectedItemIdentifier:@" ZoomToFit"];207 [[[self window] toolbar] setSelectedItemIdentifier:@"ScaleToFit"]; 208 208 break; 209 209 … … 411 411 zoom = [_imageView zoom]; 412 412 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'"), 415 416 imageSize.width, 416 417 imageSize.height]; 417 418 418 419 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%'"), 420 422 zoom]; 421 423 } 422 424 423 425 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'"), 425 428 ABS([_imageView imageRotation])]; 426 429 } … … 543 546 [_imageView setImageRotation:[FHSettings floatForKey:FHImageRotation]]; 544 547 545 [self _update ZoomModeToolbarItems];548 [self _updateScalingModeToolbarItems]; 546 549 547 550 if(![FHSettings boolForKey:FHShowStatusBar]) … … 593 596 [[NSNotificationCenter defaultCenter] 594 597 addObserver:self 595 selector:@selector(windowControllerChanged ZoomMode:)596 name:FHWindowControllerChanged ZoomMode];598 selector:@selector(windowControllerChangedScalingMode:) 599 name:FHWindowControllerChangedScalingMode]; 597 600 598 601 [[NSNotificationCenter defaultCenter] … … 610 613 611 614 612 - (void)windowControllerChanged ZoomMode:(NSNotification *)notification {615 - (void)windowControllerChangedScalingMode:(NSNotification *)notification { 613 616 if([notification object] == _imageView) { 614 617 [_imageView setImageScaling:[FHSettings intForKey:FHImageScalingMethod]]; 615 618 616 [self _update ZoomModeToolbarItems];619 [self _updateScalingModeToolbarItems]; 617 620 618 621 [self _updateRightStatus]; … … 691 694 692 695 [_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, '...')"), 694 697 [file name], _savedFiles, [_handler numberOfFiles], 0x2026]]; 695 698 } … … 783 786 NSToolbarSeparatorItemIdentifier, 784 787 @"ActualSize", 785 @" ZoomToFit",788 @"ScaleToFit", 786 789 @"StretchToFit", 787 790 NSToolbarSeparatorItemIdentifier, … … 805 808 @"Reload", 806 809 @"ActualSize", 807 @" ZoomToFit",810 @"ScaleToFit", 808 811 @"StretchToFit", 809 812 @"RotateLeft", … … 825 828 return [NSArray arrayWithObjects: 826 829 @"ActualSize", 827 @" ZoomToFit",830 @"ScaleToFit", 828 831 @"StretchToFit", 829 832 NULL]; Footagehead/trunk/FHImage.h
r4902 r4906 36 36 37 37 NSSize _size; 38 unsigned long long _dataLength; 38 39 BOOL _flipped; 39 40 CGFloat _orientation; … … 44 45 45 46 - (id)initImageWithImage:(NSImage *)image; 46 - (id)initImageWithURL:(WIURL *)url;47 47 - (id)initImageWithData:(NSData *)data; 48 48 - (id)initThumbnailWithURL:(WIURL *)url preferredSize:(NSSize)size; … … 52 52 - (BOOL)flipped; 53 53 54 - (NSDictionary *)properties; 54 55 - (NSSize)size; 55 56 - (NSUInteger)pixels; 57 - (unsigned long long)dataLength; 56 58 - (CGFloat)orientation; 57 59 Footagehead/trunk/FHImage.m
r4902 r4906 143 143 144 144 145 - (id)initImageWith URL:(WIURL *)url{145 - (id)initImageWithData:(NSData *)data { 146 146 CGImageSourceRef imageSource; 147 147 148 148 self = [super init]; 149 149 150 imageSource = CGImageSourceCreateWith URL((CFURLRef) [url URL], NULL);150 imageSource = CGImageSourceCreateWithData((CFDataRef) data, NULL); 151 151 152 152 if(!imageSource) { … … 164 164 } 165 165 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]; 193 167 194 168 CFRelease(imageSource); … … 283 257 284 258 259 - (NSDictionary *)properties { 260 return _properties; 261 } 262 263 264 285 265 - (NSSize)size { 286 266 return _size; … … 291 271 - (NSUInteger)pixels { 292 272 return _size.width * _size.height; 273 } 274 275 276 277 - (unsigned long long)dataLength { 278 return _dataLength; 293 279 } 294 280 Footagehead/trunk/FHImageView.m
r4902 r4906 425 425 426 426 427 - (void)setImageRotation:( float)imageRotation {427 - (void)setImageRotation:(CGFloat)imageRotation { 428 428 _imageRotation = imageRotation; 429 429 … … 436 436 437 437 438 - ( float)imageRotation {438 - (CGFloat)imageRotation { 439 439 return _imageRotation; 440 440 } Footagehead/trunk/FHInspectorController.h
r4904 r4906 28 28 29 29 @interface FHInspectorController : WIWindowController { 30 30 IBOutlet NSTextField *_nameTextField; 31 IBOutlet NSTextField *_valueTextField; 32 33 NSMutableArray *_sortedKeys; 34 NSMutableDictionary *_allValues; 31 35 } 32 36 Footagehead/trunk/FHInspectorController.m
r4904 r4906 30 30 #import "FHBrowserController.h" 31 31 #import "FHFile.h" 32 #import "FHImage.h" 32 33 #import "FHInspectorController.h" 33 34 … … 35 36 36 37 - (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; 37 42 38 43 @end … … 42 47 43 48 - (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]; 45 197 } 46 198 … … 64 216 - (id)init { 65 217 self = [super initWithWindowNibName:@"Inspector"]; 218 219 _sortedKeys = [[NSMutableArray alloc] init]; 220 _allValues = [[NSMutableDictionary alloc] init]; 66 221 67 222 [[NSNotificationCenter defaultCenter] … … 77 232 78 233 234 - (void)dealloc { 235 [_nameTextField release]; 236 [_valueTextField release]; 237 238 [_sortedKeys release]; 239 [_allValues release]; 240 241 [super dealloc]; 242 } 243 244 245 79 246 #pragma mark - 80 247 81 - (void)awakeFromNib { 248 - (void)windowDidLoad { 249 [[self window] setTitle:NSLS(@"Inspector", @"Inspector")]; 250 251 [[_nameTextField retain] removeFromSuperview]; 252 [[_valueTextField retain] removeFromSuperview]; 82 253 } 83 254 Footagehead/trunk/FHWindowController.h
r4733 r4906 31 31 32 32 @interface FHWindowController : WIWindowController { 33 IBOutlet FHImageView *_imageView;34 IBOutlet NSProgressIndicator *_progressIndicator;33 IBOutlet FHImageView *_imageView; 34 IBOutlet NSProgressIndicator *_progressIndicator; 35 35 36 FHImageLoader *_imageLoader;36 FHImageLoader *_imageLoader; 37 37 38 NSMutableDictionary *_spreads;38 NSMutableDictionary *_spreads; 39 39 } 40 40 41 41 42 #define FHWindowControllerChanged ZoomMode @"FHWindowControllerChangedZoomMode"43 #define FHWindowControllerChangedSpreadMode @"FHWindowControllerChangedSpreadMode"42 #define FHWindowControllerChangedScalingMode @"FHWindowControllerChangedScalingMode" 43 #define FHWindowControllerChangedSpreadMode @"FHWindowControllerChangedSpreadMode" 44 44 45 45 … … 68 68 - (void)nextPage:(id)sender; 69 69 70 - (void) zoomMode:(id)sender;70 - (void)scalingMode:(id)sender; 71 71 - (void)spreadMode:(id)sender; 72 72 - (void)spreadRightToLeft:(id)sender; Footagehead/trunk/FHWindowController.m
r4891 r4906 513 513 #pragma mark - 514 514 515 - (void) zoomMode:(id)sender {515 - (void)scalingMode:(id)sender { 516 516 FHImageScaling scaling; 517 517 … … 522 522 [FHSettings setInt:scaling forKey:FHImageScalingMethod]; 523 523 524 [[NSNotificationCenter defaultCenter] postNotificationName:FHWindowControllerChanged ZoomMode object:_imageView];524 [[NSNotificationCenter defaultCenter] postNotificationName:FHWindowControllerChangedScalingMode object:_imageView]; 525 525 } 526 526 Footagehead/trunk/Footagehead.xcodeproj/project.pbxproj
r4904 r4906 81 81 77B8504C0CAAB289008A53C5 /* FHInspectorController.m in Sources */ = {isa = PBXBuildFile; fileRef = 77B8504B0CAAB289008A53C5 /* FHInspectorController.m */; }; 82 82 77B850700CAAB3C5008A53C5 /* Inspector.nib in Resources */ = {isa = PBXBuildFile; fileRef = 77B8506E0CAAB3C5008A53C5 /* Inspector.nib */; }; 83 77B854880CAD40BA008A53C5 /* Inspector.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 77B854870CAD40BA008A53C5 /* Inspector.tiff */; }; 83 84 77BD99520760B7380007D034 /* FHTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 77BD99500760B7380007D034 /* FHTableView.m */; }; 84 85 77CDAE72083B3515003BE654 /* ReleaseNotes.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 77CDAE70083B3515003BE654 /* ReleaseNotes.rtf */; }; … … 108 109 A5A183F00BDD5231004788EF /* FHWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = A5A183EE0BDD5231004788EF /* FHWindowController.m */; }; 109 110 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 */; }; 111 112 A5A184370BDD5473004788EF /* RotateLeft.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A5A184350BDD5473004788EF /* RotateLeft.tiff */; }; 112 113 A5A184380BDD5473004788EF /* RotateRight.tiff in Resources */ = {isa = PBXBuildFile; fileRef = A5A184360BDD5473004788EF /* RotateRight.tiff */; }; … … 283 284 77B8504B0CAAB289008A53C5 /* FHInspectorController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FHInspectorController.m; sourceTree = "<group>"; }; 284 285 77B8506F0CAAB3C5008A53C5 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/Inspector.nib; sourceTree = "<group>"; }; 286 77B854870CAD40BA008A53C5 /* Inspector.tiff */ = {isa = PBXFileReference;
