Changeset 4828
- Timestamp:
- 06/07/07 13:52:47 (1 year ago)
- Files:
-
- WiredClient/trunk/WCFiles.m (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
WiredClient/trunk/WCFiles.m
r4799 r4828 42 42 - (void)_setCurrentPath:(WCFile *)path; 43 43 - (WCFile *)_currentPath; 44 - (void)_setSelectPath:(NSString *)path; 45 - (NSString *)_selectPath; 44 46 45 47 - (void)_updateMenu; … … 67 69 _listPath = [path retain]; 68 70 _browserPath = [path retain]; 69 _selectPath = [selectPath retain]; 71 72 [self _setSelectPath:selectPath]; 70 73 71 74 _history = [[NSMutableArray alloc] init]; … … 119 122 120 123 return NULL; 124 } 125 126 127 128 - (void)_setSelectPath:(NSString *)path { 129 [path retain]; 130 [_selectPath release]; 131 132 _selectPath = path; 133 } 134 135 136 137 - (NSString *)_selectPath { 138 return _selectPath; 121 139 } 122 140 … … 184 202 [[_filesBrowser matrixInColumn:[_filesBrowser lastColumn]] setMenu:[_filesBrowser menu]]; 185 203 186 if(_selectPath) { 187 [_filesTableView selectRowWithStringValue:[_selectPath lastPathComponent]]; 188 189 [_selectPath release]; 190 _selectPath = NULL; 191 } 204 if([self _selectPath]) 205 [_filesTableView selectRowWithStringValue:[[self _selectPath] lastPathComponent]]; 192 206 193 207 [[self connection] addObserver:self … … 390 404 [_listPath release]; 391 405 [_browserPath release]; 406 [_selectPath release]; 392 407 393 408 [super dealloc]; … … 548 563 549 564 if([path isEqualToString:[[self _currentPath] path]]) { 550 _selectPath = [selectPath retain];565 [self _setSelectPath:selectPath]; 551 566 552 567 [[[self connection] cache] removeFilesForPath:[[self _currentPath] path]]; … … 767 782 - (IBAction)back:(id)sender { 768 783 if([_backButton isEnabled]) { 769 _selectPath = [[[self _currentPath] path] retain];784 [self _setSelectPath:[[self _currentPath] path]]; 770 785 771 786 [self _changeDirectory:[_history objectAtIndex:--_historyPosition]]; … … 904 919 905 920 - (IBAction)reloadFiles:(id)sender { 906 _selectPath = [[[self selectedFile] path] retain];921 [self _setSelectPath:[[self selectedFile] path]]; 907 922 908 923 [[[self connection] cache] removeFilesForPath:[[self _currentPath] path]];
