Changeset 4722

Show
Ignore:
Timestamp:
04/24/07 18:57:41 (1 year ago)
Author:
morris
Message:

Fix some exceptions

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Footagehead/trunk/FHBrowserController.m

    r4721 r4722  
    10231023- (void)slideshowPanelDidEnd:(NSOpenPanel *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo { 
    10241024        FHSlideshowController   *controller; 
     1025        NSUInteger                              index; 
    10251026         
    10261027        [_screenPanel close]; 
     
    10321033                [FHSettings setInt:[_screenAutoSwitchTextField intValue] forKey:FHFullscreenAutoSwitchTime]; 
    10331034                 
     1035                index = [self selectedIndex]; 
     1036                 
     1037                while([[self fileAtIndex:index] isDirectory] && index < [[self files] count]) 
     1038                        index++; 
     1039                 
    10341040                controller = [[FHSlideshowController alloc] initWithImageLoader:_imageLoader 
    1035                                                                                                                                   index:[self selectedIndex] 
     1041                                                                                                                                  index:index 
    10361042                                                                                                                                 images:[_handler numberOfImages]]; 
    10371043                [controller showSlideshowWindow:self]; 
  • Footagehead/trunk/FHWindowController.m

    r4717 r4722  
    145145         
    146146        if(index > 0) { 
    147                 for(i = index - 1; i >= 0; i--) { 
     147                i = index - 1; 
     148                 
     149                do { 
    148150                        if(![[files objectAtIndex:i] isDirectory]) { 
    149151                                newIndex = i; 
     
    151153                                break; 
    152154                        } 
    153                 } 
    154         } 
    155                 
     155                } while(--i != 0); 
     156        } 
     157         
    156158        if(newIndex != NSNotFound) 
    157159                [self selectFileAtIndex:newIndex];