Changeset 4716
- Timestamp:
- 04/24/07 13:37:46 (1 year ago)
- Files:
-
- Footagehead/trunk/English.lproj/Browser.nib/classes.nib (modified) (3 diffs)
- Footagehead/trunk/English.lproj/Browser.nib/info.nib (modified) (2 diffs)
- Footagehead/trunk/English.lproj/Browser.nib/keyedobjects.nib (modified) (previous)
- 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/MainMenu.nib/objects.nib (modified) (previous)
- Footagehead/trunk/English.lproj/ReleaseNotes.rtf (modified) (1 diff)
- Footagehead/trunk/English.lproj/Slideshow.nib/classes.nib (modified) (2 diffs)
- Footagehead/trunk/English.lproj/Slideshow.nib/keyedobjects.nib (modified) (previous)
- Footagehead/trunk/FHApplicationController.h (moved) (moved from Footagehead/trunk/FHController.h) (2 diffs)
- Footagehead/trunk/FHApplicationController.m (moved) (moved from Footagehead/trunk/FHController.m) (6 diffs)
- Footagehead/trunk/FHBrowserController.h (modified) (4 diffs)
- Footagehead/trunk/FHBrowserController.m (modified) (33 diffs)
- Footagehead/trunk/FHImageLoader.h (modified) (2 diffs)
- Footagehead/trunk/FHImageLoader.m (modified) (10 diffs)
- Footagehead/trunk/FHImageView.h (modified) (1 diff)
- Footagehead/trunk/FHImageView.m (modified) (3 diffs)
- Footagehead/trunk/FHSlideshowController.h (modified) (1 diff)
- Footagehead/trunk/FHSlideshowController.m (modified) (6 diffs)
- Footagehead/trunk/FHSlideshowWindow.m (modified) (5 diffs)
- Footagehead/trunk/FHWindowController.h (modified) (1 diff)
- Footagehead/trunk/FHWindowController.m (modified) (1 diff)
- Footagehead/trunk/Footagehead.xcodeproj/project.pbxproj (modified) (11 diffs)
- Footagehead/trunk/Parent.tiff (added)
- Footagehead/trunk/StretchToFit.tiff (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
Footagehead/trunk/English.lproj/Browser.nib/classes.nib
r4715 r4716 19 19 "_contentBox" = NSBox; 20 20 "_fileTableColumn" = NSTableColumn; 21 "_imageView" = FHImageView;22 21 "_leftStatusTextField" = NSTextField; 23 22 "_leftView" = NSView; … … 47 46 CLASS = FHImageView; 48 47 LANGUAGE = ObjC; 49 OUTLETS = {"_ scrollView" = NSScrollView; };48 OUTLETS = {"_delegate" = id; "_scrollView" = NSScrollView; }; 50 49 SUPERCLASS = NSView; 51 50 }, … … 65 64 CLASS = FHWindowController; 66 65 LANGUAGE = ObjC; 66 OUTLETS = {"_imageView" = FHImageView; }; 67 67 SUPERCLASS = WIWindowController; 68 68 }, Footagehead/trunk/English.lproj/Browser.nib/info.nib
r4715 r4716 4 4 <dict> 5 5 <key>IBDocumentLocation</key> 6 <string>10 63 138403 407 0 0 1920 1178 </string>6 <string>1075 123 403 407 0 0 1920 1178 </string> 7 7 <key>IBEditorPositions</key> 8 8 <dict> … … 14 14 <key>IBOpenObjects</key> 15 15 <array> 16 <integer>52</integer> 16 17 <integer>82</integer> 17 18 <integer>65</integer> 18 <integer>52</integer>19 19 <integer>7</integer> 20 20 </array> Footagehead/trunk/English.lproj/MainMenu.nib/classes.nib
r4709 r4716 1 1 { 2 2 IBClasses = ( 3 {CLASS = FHBrowserView; LANGUAGE = ObjC; SUPERCLASS = NSMatrix; },4 3 { 5 CLASS = FH Controller;4 CLASS = FHApplicationController; 6 5 LANGUAGE = ObjC; 7 6 OUTLETS = { 8 "_contentBox" = NSBox;9 "_fileTableColumn" = NSTableColumn;10 "_fullscreenImageView" = FHImageView;11 "_fullscreenPanel" = NSPanel;12 7 "_goMenu" = NSMenu; 13 "_imageView" = FHImageView;14 "_leftStatusTextField" = NSTextField;15 "_leftView" = NSView;16 "_menu" = NSPopUpButton;17 "_moveToTrashButton" = NSButton;18 "_openSpotlightMenuItem" = NSMenuItem;19 "_openSpotlightPanel" = NSPanel;20 "_openSpotlightTextView" = NSTextView;21 "_openURLPanel" = NSPanel;22 "_openURLPopUpButton" = NSPopUpButton;23 "_openURLTextView" = NSTextView;24 "_progressIndicator" = NSProgressIndicator;25 "_revealInFinderButton" = NSButton;26 "_rightStatusTextField" = NSTextField;27 "_rightView" = NSView;28 "_screenAutoSwitchButton" = NSButton;29 "_screenAutoSwitchTextField" = NSTextField;30 "_screenBackgroundPopUpButton" = NSPopUpButton;31 "_screenPanel" = NSPanel;32 "_screenPopUpButton" = NSPopUpButton;33 "_scrollView" = NSScrollView;34 "_splitView" = WISplitView;35 "_statusBox" = NSBox;36 "_tableView" = WITableView;37 8 "_toggleStatusBarMenuItem" = NSMenuItem; 38 9 "_viewMenu" = NSMenu; 39 "_zoomButton" = NSButton;40 10 }; 41 SUPERCLASS = NSObject;11 SUPERCLASS = WIObject; 42 12 }, 13 {CLASS = FHBrowserView; LANGUAGE = ObjC; SUPERCLASS = NSMatrix; }, 43 14 { 44 15 CLASS = FHImageView; … … 85 56 SUPERCLASS = NSApplication; 86 57 }, 58 {CLASS = WIObject; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 87 59 {CLASS = WISplitView; LANGUAGE = ObjC; SUPERCLASS = NSSplitView; }, 88 60 { Footagehead/trunk/English.lproj/MainMenu.nib/info.nib
r4709 r4716 19 19 </array> 20 20 <key>IBSystem Version</key> 21 <string>8P 2137</string>21 <string>8P135</string> 22 22 </dict> 23 23 </plist> Footagehead/trunk/English.lproj/ReleaseNotes.rtf
r4714 r4716 1 {\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf4 201 {\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf410 2 2 {\fonttbl\f0\fswiss\fcharset77 Helvetica-Bold;\f1\fswiss\fcharset77 Helvetica;\f2\fswiss\fcharset77 Helvetica-Oblique; 3 3 \f3\fnil\fcharset77 LucidaGrande;} Footagehead/trunk/English.lproj/Slideshow.nib/classes.nib
r4715 r4716 10 10 CLASS = FHSlideshowController; 11 11 LANGUAGE = ObjC; 12 OUTLETS = {"_imageView" = FHImageView; };13 12 SUPERCLASS = FHWindowController; 14 13 }, … … 17 16 CLASS = FHWindowController; 18 17 LANGUAGE = ObjC; 18 OUTLETS = {"_imageView" = FHImageView; }; 19 19 SUPERCLASS = WIWindowController; 20 20 }, Footagehead/trunk/FHApplicationController.h
r4715 r4716 28 28 29 29 @class FHBrowserController; 30 @class FHImageView, FHSlideshowWindow;31 @class FHHandler, FHFile;32 30 33 @interface FHController : NSObject { 34 IBOutlet NSMenuItem *_openSpotlightMenuItem; 35 31 @interface FHApplicationController : WIObject { 36 32 IBOutlet NSMenu *_goMenu; 37 33 … … 39 35 IBOutlet NSMenuItem *_toggleStatusBarMenuItem; 40 36 41 IBOutlet NSBox *_contentBox; 42 IBOutlet NSBox *_statusBox; 43 44 IBOutlet WISplitView *_splitView; 45 IBOutlet NSView *_leftView; 46 IBOutlet WITableView *_tableView; 47 IBOutlet NSTableColumn *_fileTableColumn; 48 IBOutlet NSView *_rightView; 49 IBOutlet FHImageView *_imageView; 50 IBOutlet NSScrollView *_scrollView; 51 52 IBOutlet NSButton *_zoomButton; 53 IBOutlet NSButton *_revealInFinderButton; 54 IBOutlet NSButton *_moveToTrashButton; 55 IBOutlet NSProgressIndicator *_progressIndicator; 56 IBOutlet NSPopUpButton *_menu; 57 58 IBOutlet NSTextField *_leftStatusTextField; 59 IBOutlet NSTextField *_rightStatusTextField; 60 61 IBOutlet NSPanel *_fullscreenPanel; 62 IBOutlet FHImageView *_fullscreenImageView; 63 64 IBOutlet NSPanel *_screenPanel; 65 IBOutlet NSPopUpButton *_screenPopUpButton; 66 IBOutlet NSPopUpButton *_screenBackgroundPopUpButton; 67 IBOutlet NSButton *_screenAutoSwitchButton; 68 IBOutlet NSTextField *_screenAutoSwitchTextField; 69 70 IBOutlet NSPanel *_openURLPanel; 71 IBOutlet NSTextView *_openURLTextView; 72 IBOutlet NSPopUpButton *_openURLPopUpButton; 73 74 IBOutlet NSPanel *_openSpotlightPanel; 75 IBOutlet NSTextView *_openSpotlightTextView; 76 77 FHBrowserController *_browserController; 78 79 FHSlideshowWindow *_fullscreenWindow; 80 FHHandler *_handler; 81 82 NSMutableDictionary *_toolbarItems; 83 84 NSTimer *_loadImageTimer; 85 NSConditionLock *_loadImageLock; 86 NSConditionLock *_loadThumbnailsLock; 87 unsigned int _selectedRow; 88 unsigned int _imageCounter; 89 unsigned int _thumbnailsCounter; 90 91 WIEventQueue *_queue; 92 93 NSSize _lastTableViewSize; 37 FHBrowserController *_browserController; 94 38 95 39 BOOL _openLastURL; 96 BOOL _switchingURL;97 BOOL _deletingFile;98 unsigned int _spinners;99 40 100 41 NSUInteger _menuItems, _initialMenuItems; 101 42 } 102 43 103 104 //- (IBAction)open:(id)sender;105 //- (IBAction)openURL:(id)sender;106 //- (IBAction)openSpotlight:(id)sender;107 108 /*- (IBAction)openMenu:(id)sender;109 - (IBAction)openFile:(id)sender;110 - (IBAction)firstFile:(id)sender;111 - (IBAction)lastFile:(id)sender;112 - (IBAction)previousImage:(id)sender;113 - (IBAction)nextImage:(id)sender;114 - (IBAction)previousPage:(id)sender;115 - (IBAction)nextPage:(id)sender;116 - (IBAction)slideshow:(id)sender;117 - (IBAction)autoSwitch:(id)sender;118 */119 44 @end Footagehead/trunk/FHApplicationController.m
r4715 r4716 27 27 */ 28 28 29 #import " NSImage-FHAdditions.h"29 #import "FHApplicationController.h" 30 30 #import "FHBrowserController.h" 31 #import "FHCache.h"32 #import "FHController.h"33 #import "FHFile.h"34 #import "FHFileCell.h"35 #import "FHSlideshowWindow.h"36 31 #import "FHHandler.h" 37 #import "FHImage.h"38 32 #import "FHImageView.h" 39 33 #import "FHSettings.h" 40 34 41 @interface FH Controller(Private)35 @interface FHApplicationController(Private) 42 36 43 37 - (void)_buildGoMenu; … … 46 40 - (void)_reloadPathsInGoMenuForHandler:(FHHandler *)handler; 47 41 48 - (void)_startSpinning;49 - (void)_stopSpinning;50 - (void)_updateFullscreenStatus;51 52 42 @end 53 43 54 44 55 @implementation FH Controller(Private)45 @implementation FHApplicationController(Private) 56 46 57 47 - (void)_buildGoMenu { … … 180 170 } 181 171 182 183 184 #pragma mark -185 186 - (void)_loadFileTimer:(NSTimer *)timer {187 NSArray *files;188 int i, count;189 BOOL next = NO;190 191 // [self nextImage:self];192 193 i = [_tableView selectedRow];194 files = [_handler files];195 count = [files count];196 197 while(i < count - 1) {198 if(![[files objectAtIndex:i] isDirectory]) {199 next = YES;200 201 break;202 }203 }204 205 if(!next)206 [timer invalidate];207 }208 209 210 211 #pragma mark -212 213 - (void)_startSpinning {214 if(_spinners == 0)215 [_progressIndicator startAnimation:self];216 217 _spinners++;218 }219 220 221 222 - (void)_stopSpinning {223 _spinners--;224 225 if(_spinners == 0)226 [_progressIndicator stopAnimation:self];227 }228 229 230 231 - (void)_updateFullscreenStatus {232 /* NSArray *files;233 FHFile *file;234 unsigned int i, count, index;235 236 file = [self _selectedFile];237 files = [_handler files];238 count = [files count];239 240 for(i = index = 0; i < count; i++) {241 if(![[files objectAtIndex:i] isDirectory])242 index++;243 244 if([files objectAtIndex:i] == file)245 break;246 }247 248 [_fullscreenImageView setLabel:[NSSWF:NSLS(@"%@ %C %u/%u", @"'image.jpg - 1/10'"),249 [file name],250 0x2014,251 index,252 [_handler numberOfImages]]];*/253 }254 255 172 @end 256 173 257 174 258 @implementation FHController 175 @implementation FHApplicationController 176 177 - (void)dealloc { 178 [_browserController release]; 179 180 [super dealloc]; 181 } 182 183 259 184 260 185 - (void)awakeFromNib { … … 325 250 - (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)application { 326 251 return YES; 327 }328 329 330 331 - (void)applicationDidChangeScreenParameters:(NSNotification *)notification {332 // [self _reloadScreens];333 252 } 334 253 … … 368 287 369 288 370 - (void)windowWillClose:(NSNotification *)notification {371 /* if([notification object] == _fullscreenWindow) {372 [_loadImageTimer invalidate];373 [_loadImageTimer release];374 _loadImageTimer = NULL;375 376 // [self showWindow:self];377 378 _fullscreenWindow = NULL;379 380 [self _updateImage];381 }*/382 }383 384 385 386 289 - (void)windowControllerDidLoadHandler:(NSNotification *)notification { 387 290 [self _reloadPathsInGoMenuForHandler:[notification object]]; … … 412 315 } 413 316 414 415 416 #pragma mark -417 418 - (IBAction)slideshow:(id)sender {419 /* [NSApp beginSheet:_screenPanel420 modalForWindow:[self window]421 modalDelegate:self422 didEndSelector:@selector(slideshowPanelDidEnd:returnCode:contextInfo:)423 contextInfo:NULL];*/424 }425 426 427 428 - (void)slideshowPanelDidEnd:(NSOpenPanel *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo {429 /* NSScreen *screen;430 NSRect screenRect;431 int screenNumber;432 433 [_screenPanel close];434 435 if(returnCode == NSAlertDefaultReturn) {436 // --- save in prefs437 [FHSettings setInt:[_screenPopUpButton indexOfSelectedItem] forKey:FHFullscreenScreen];438 [FHSettings setInt:[_screenBackgroundPopUpButton tagOfSelectedItem] forKey:FHFullscreenBackground];439 [FHSettings setBool:[_screenAutoSwitchButton state] forKey:FHFullscreenAutoSwitch];440 [FHSettings setInt:[_screenAutoSwitchTextField intValue] forKey:FHFullscreenAutoSwitchTime];441 442 // --- get screen443 screenNumber = [FHSettings intForKey:FHFullscreenScreen];444 445 if((unsigned int) screenNumber > [[NSScreen screens] count])446 screenNumber = 0;447 448 screen = [[NSScreen screens] objectAtIndex:screenNumber];449 screenRect = [screen frame];450 screenRect.origin.x = screenRect.origin.y = 0;451 452 // --- create fullscreen window453 _fullscreenWindow = [[FHSlideshowWindow alloc]454 initWithContentRect:screenRect455 styleMask:NSBorderlessWindowMask456 backing:NSBackingStoreBuffered457 defer:YES458 screen:screen];459 460 [_fullscreenWindow setLevel:NSScreenSaverWindowLevel];461 [_fullscreenWindow setDelegate:self];462 [_fullscreenWindow setReleasedWhenClosed:YES];463 [_fullscreenWindow setTitle:[[self window] title]];464 [_fullscreenImageView setBackgroundColor:[_screenBackgroundPopUpButton representedObjectOfSelectedItem]];465 [_fullscreenImageView setImageScaling:[FHSettings intForKey:FHFullscreenImageScalingMethod]];466 [_fullscreenImageView setImageRotation:[_imageView imageRotation]];467 [_fullscreenPanel setFrame:screenRect display:NO];468 [_fullscreenWindow setContentView:[[_fullscreenPanel contentView] retain]];469 [[self window] orderOut:self];470 [_fullscreenWindow makeKeyAndOrderFront:self];471 [self _updateImage];472 473 if([FHSettings boolForKey:FHFullscreenAutoSwitch]) {474 _loadImageTimer = [[NSTimer scheduledTimerWithTimeInterval:[FHSettings intForKey:FHFullscreenAutoSwitchTime]475 target:self476 selector:@selector(_loadFileTimer:)477 userInfo:NULL478 repeats:YES] retain];479 }480 }*/481 }482 483 484 485 - (IBAction)autoSwitch:(id)sender {486 [_screenAutoSwitchTextField setEnabled:[_screenAutoSwitchButton state]];487 }488 489 317 @end Footagehead/trunk/FHBrowserController.h
r4715 r4716 29 29 #import "FHWindowController.h" 30 30 31 @class FHTableView, FHImageView; 32 @class FHImageLoader, FHHandler; 31 @class FHTableView; 33 32 34 33 @interface FHBrowserController : FHWindowController { … … 39 38 IBOutlet NSTableColumn *_fileTableColumn; 40 39 IBOutlet NSView *_rightView; 41 IBOutlet FHImageView *_imageView;42 40 IBOutlet NSScrollView *_scrollView; 43 41 … … 62 60 IBOutlet NSTextField *_screenAutoSwitchTextField; 63 61 64 FHImageLoader *_imageLoader;65 FHHandler *_handler;66 67 62 NSMutableDictionary *_toolbarItems; 68 63 69 64 NSSize _tableViewSize; 70 65 BOOL _deletingFile; 66 BOOL _switchingURL; 67 NSInteger _previousRow; 71 68 } 72 69 … … 79 76 - (IBAction)openFile:(id)sender; 80 77 - (IBAction)openDirectory:(id)sender; 81 - (IBAction)firstFile:(id)sender;82 - (IBAction)lastFile:(id)sender;83 - (IBAction)previousImage:(id)sender;84 - (IBAction)nextImage:(id)sender;85 - (IBAction)previousPage:(id)sender;86 - (IBAction)nextPage:(id)sender;87 78 88 79 - (IBAction)autoSwitch:(id)sender; Footagehead/trunk/FHBrowserController.m
r4715 r4716 43 43 - (void)_resizeTableView; 44 44 - (void)_reloadScreens; 45 - (void)_updateZoomModeToolbarItems; 45 46 - (void)_toggleStatusBar:(BOOL)show; 46 47 … … 54 55 - (void)_updateRightStatus; 55 56 56 - (void)_showFile:(FHFile *)file;57 - (void)_selectFileAtIndex:(NSUInteger)index;58 - (FHFile *)_fileAtIndex:(NSUInteger)index;59 - (FHFile *)_selectedFile;60 61 57 @end 62 58 … … 70 66 _toolbarItems = [[NSMutableDictionary alloc] init]; 71 67 72 item = [NSToolbarItem toolbarItemWithIdentifier:@" OpenParent"73 name:NSLS(@" Open Parent", @"Open parent toolbar item")74 content:[NSImage imageNamed:@" OpenParent"]68 item = [NSToolbarItem toolbarItemWithIdentifier:@"Parent" 69 name:NSLS(@"Parent", @"Parent toolbar item") 70 content:[NSImage imageNamed:@"Parent"] 75 71 target:self 76 72 action:@selector(openParent:)]; … … 100 96 [_toolbarItems setObject:item forKey:[item itemIdentifier]]; 101 97 98 item = [NSToolbarItem toolbarItemWithIdentifier:@"StretchToFit" 99 name:NSLS(@"Stretch To Fit", @"Stretch to fit toolbar item") 100 content:[NSImage imageNamed:@"StretchToFit"] 101 target:self 102 action:@selector(zoomMode:)]; 103 [item setTag:FHScaleStretchedProportionally]; 104 [_toolbarItems setObject:item forKey:[item itemIdentifier]]; 105 102 106 item = [NSToolbarItem toolbarItemWithIdentifier:@"RotateLeft" 103 107 name:NSLS(@"Rotate Left", @"Rotate left toolbar item") … … 183 187 184 188 189 - (void)_updateZoomModeToolbarItems { 190 switch([_imageView imageScaling]) { 191 case FHScaleNone: 192 [[[self window] toolbar] setSelectedItemIdentifier:@"ActualSize"]; 193 break; 194 195 case FHScaleProportionally: 196 [[[self window] toolbar] setSelectedItemIdentifier:@"ZoomToFit"]; 197 break; 198 199 case FHScaleStretchedProportionally: 200 [[[self window] toolbar] setSelectedItemIdentifier:@"StretchToFit"]; 201 break; 202 203 default: 204 [[[self window] toolbar] setSelectedItemIdentifier:NULL]; 205 break; 206 } 207 } 208 209 210 185 211 - (void)_toggleStatusBar:(BOOL)show { 186 212 NSRect frame; … … 232 258 BOOL select; 233 259 234 // [self _startSpinning];260 _switchingURL = YES; 235 261 236 262 handler = [[FHHandler alloc] initHandlerWithURL:url]; 237 263 238 if(!handler) { 239 // [self _stopSpinning]; 240 264 if(!handler) 241 265 return; 242 }243 266 244 267 if(_handler) { 245 // if(![_handler isSynchronous] && ![_handler isFinished])246 // [self _stopSpinning];247 248 268 if([[_handler URL] isFileURL]) 249 269 [[WIEventQueue sharedQueue] removePath:[[_handler URL] path]]; … … 291 311 if([_handler isLocal]) 292 312 [_imageLoader startLoadingThumbnails]; 293 294 // if([_handler isSynchronous]) 295 // [self _stopSpinning]; 313 314 _switchingURL = NO; 296 315 } 297 316 … … 305 324 306 325 url = [[_handler URL] retain]; 307 file = [[[self _selectedFile] name] retain];326 file = [[[self selectedFile] name] retain]; 308 327 309 328 [[FHCache cache] dropThumbnailsForURL:url]; … … 374 393 375 394 string = [NSMutableString stringWithFormat:NSLS(@"%@, %.0fx%.0f", @"'image.jpg, 640x480'"), 376 [[self _selectedFile] name],395 [[self selectedFile] name], 377 396 imageSize.width, 378 397 imageSize.height]; … … 391 410 } 392 411 393 394 395 #pragma mark -396 397 - (void)_showFile:(FHFile *)file {398 FHImage *image;399 BOOL success;400 401 if([file isLoaded]) {402 image = [file image];403 success = (image && [image size].width > 0.0);404 405 if(success) {406 [NSCursor setHiddenUntilMouseMoves:YES];407 [_imageView setImage:image];408 [self _updateRightStatus];409 } else {410 [_imageView setImage:[FHImage imageNamed:@"Error"]];411 [_rightStatusTextField setStringValue:[NSSWF:NSLS(@"error opening image", @"Error message")]];412 }413 } else {414 [_imageView setImage:NULL];415 [self _updateRightStatus];416 }417 }418 419 420 421 - (void)_selectFileAtIndex:(NSUInteger)index {422 [_tableView selectRow:index byExtendingSelection:NO];423 [_tableView scrollRowToVisible:index];424 }425 426 427 428 - (FHFile *)_fileAtIndex:(NSUInteger)index {429 return [[_handler files] objectAtIndex:index];430 }431 432 433 434 435 - (FHFile *)_selectedFile {436 NSInteger row;437 438 row = [_tableView selectedRow];439 440 if(row < 0)441 return NULL;442 443 return [self _fileAtIndex:row];444 }445 446 412 @end 447 413 … … 453 419 self = [super initWithWindowNibName:@"Browser"]; 454 420 455 _imageLoader = [[FHImageLoader alloc] init];456 [_imageLoader setDelegate:self];457 458 421 [self window]; 459 422 … … 464 427 465 428 - (void)dealloc { 466 [_imageLoader release];467 429 [_toolbarItems release]; 468 469 [_handler release];470 430 471 431 [super dealloc]; … … 479 439 [[self window] setToolbar:[self _toolbar]]; 480 440 441 [self _updateZoomModeToolbarItems]; 442 481 443 [self setShouldCascadeWindows:NO]; 482 444 [self setWindowFrameAutosaveName:@"Footagehead"]; … … 584 546 585 547 - (void)handlerDidFinishLoading:(FHHandler *)handler { 586 // [self _stopSpinning];587 548 } 588 549 … … 590 551 591 552 - (void)imageLoaderDidLoadImageForFile:(FHFile *)file { 592 if(file == [self _selectedFile])593 [self _showFile:file];553 if(file == [self selectedFile]) 554 [self showFile:file]; 594 555 } 595 556 … … 627 588 - (NSArray *)toolbarDefaultItemIdentifiers:(NSToolbar *)toolbar { 628 589 return [NSArray arrayWithObjects: 629 @"OpenParent", 630 @"Slideshow", 590 @"Parent", 631 591 @"Reload", 592 NSToolbarSeparatorItemIdentifier, 593 @"ActualSize", 594 @"ZoomToFit", 595 @"StretchToFit", 632 596 NSToolbarSeparatorItemIdentifier, 633 597 @"RotateLeft", 634 598 @"RotateRight", 635 599 NSToolbarSeparatorItemIdentifier, 636 @"ActualSize", 637 @"ZoomToFit", 638 NSToolbarSeparatorItemIdentifier, 600 @"Slideshow", 639 601 @"RevealInFinder", 640 602 @"MoveToTrash", … … 648 610 - (NSArray *)toolbarAllowedItemIdentifiers:(NSToolbar *)toolbar { 649 611 return [NSArray arrayWithObjects: 650 @" OpenParent",612 @"Parent", 651 613 @"Reload", 652 614 @"ActualSize", 653 615 @"ZoomToFit", 616 @"StretchToFit", 654 617 @"RotateLeft", 655 618 @"RotateRight", 619 @"Slideshow", 656 620 @"RevealInFinder", 657 621 @"MoveToTrash", 658 @"Slideshow",659 622 NSToolbarSeparatorItemIdentifier, 660 623 NSToolbarSpaceItemIdentifier, 661 624 NSToolbarFlexibleSpaceItemIdentifier, 662 625 NSToolbarCustomizeToolbarItemIdentifier, 626 NULL]; 627 } 628 629 630 631 - (NSArray *)toolbarSelectableItemIdentifiers:(NSToolbar *)toolbar { 632 return [NSArray arrayWithObjects: 633 @"ActualSize", 634 @"ZoomToFit", 635 @"StretchToFit", 663 636 NULL]; 664 637 } … … 726 699 #pragma mark - 727 700 701 - (NSUInteger)selectedIndex { 702 NSInteger row; 703 704 row = [_tableView selectedRow]; 705 706 return (row < 0) ? NSNotFound : row; 707 } 708 709 710 711 - (void)selectFileAtIndex:(NSUInteger)index { 712 [_tableView selectRow:index byExtendingSelection:NO]; 713 [_tableView scrollRowToVisible:index]; 714 } 715 716 717 718 - (void)updateFileStatus { 719 [NSCursor setHiddenUntilMouseMoves:YES]; 720 721 [self _updateRightStatus]; 722 } 723 724 725 726 #pragma mark - 727 728 728 - (BOOL)validateSelector:(SEL)selector { 729 729 if(selector == @selector(openParent:)) { … … 733 733 &n
