Changeset 4892

Show
Ignore:
Timestamp:
09/05/07 11:58:39 (11 months ago)
Author:
morris
Message:

Reload view if at bottom and the mounts change

Fix a warning

Files:

Legend:

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

    r4886 r4892  
    504504                           name:FHImageLoaderDidLoadAllFiles]; 
    505505 
     506        [[[NSWorkspace sharedWorkspace] notificationCenter] 
     507                addObserver:self 
     508                   selector:@selector(workspaceDidChangeMounts:) 
     509                           name:NSWorkspaceDidMountNotification]; 
     510         
     511        [[[NSWorkspace sharedWorkspace] notificationCenter] 
     512                addObserver:self 
     513                   selector:@selector(workspaceDidChangeMounts:) 
     514                           name:NSWorkspaceDidUnmountNotification]; 
     515         
    506516        [imageLoader release]; 
    507517 
     
    645655        [_handler release]; 
    646656        _handler = NULL; 
     657} 
     658 
     659 
     660 
     661- (void)workspaceDidChangeMounts:(NSNotification *)notification { 
     662        WIURL   *url; 
     663         
     664        url = [_handler URL]; 
     665         
     666        if([url isFileURL] && [[url path] isEqualToString:@""]) 
     667                [self _reload]; 
    647668} 
    648669 
     
    894915        row = [_tableView selectedRow]; 
    895916         
    896         return (row < 0) ? NSNotFound : row; 
     917        return (row < 0) ? NSNotFound : (NSUInteger) row; 
    897918} 
    898919