71 |
self = [super initWithFrame: NSZeroRect]; |
self = [super initWithFrame: NSZeroRect]; |
72 |
|
|
73 |
if (self) { |
if (self) { |
|
#ifdef GNUSTEP |
|
|
Class gwclass = [[NSBundle mainBundle] principalClass]; |
|
|
#else |
|
|
Class gwclass = [[NSBundle mainBundle] classNamed: @"GWorkspace"]; |
|
|
#endif |
|
|
|
|
|
gworkspace = (id<GWProtocol>)[gwclass gworkspace]; |
|
74 |
rootPath = nil; |
rootPath = nil; |
75 |
lastPath = nil; |
lastPath = nil; |
76 |
currentPath = nil; |
currentPath = nil; |
246 |
if ((isDir == NO) || ([paths count] > 1)) { |
if ((isDir == NO) || ([paths count] > 1)) { |
247 |
newPath = [newPath stringByDeletingLastPathComponent]; |
newPath = [newPath stringByDeletingLastPathComponent]; |
248 |
} else { |
} else { |
249 |
if (([gworkspace isPakageAtPath: newPath]) && (viewsapps == NO)) { |
if (([GWLib isPakageAtPath: newPath]) && (viewsapps == NO)) { |
250 |
newPath = [newPath stringByDeletingLastPathComponent]; |
newPath = [newPath stringByDeletingLastPathComponent]; |
251 |
} |
} |
252 |
} |
} |
334 |
path = [path stringByDeletingLastPathComponent]; |
path = [path stringByDeletingLastPathComponent]; |
335 |
selection = [NSArray arrayWithArray: selectedPaths]; |
selection = [NSArray arrayWithArray: selectedPaths]; |
336 |
} else { |
} else { |
337 |
if ([gworkspace isPakageAtPath: path] && (viewsapps == NO)) { |
if ([GWLib isPakageAtPath: path] && (viewsapps == NO)) { |
338 |
path = [path stringByDeletingLastPathComponent]; |
path = [path stringByDeletingLastPathComponent]; |
339 |
selection = [NSArray arrayWithArray: selectedPaths]; |
selection = [NSArray arrayWithArray: selectedPaths]; |
340 |
} else { |
} else { |
715 |
|
|
716 |
- (void)setWatcherForPath:(NSString *)path |
- (void)setWatcherForPath:(NSString *)path |
717 |
{ |
{ |
718 |
[gworkspace addWatcherForPath: path]; |
[GWLib addWatcherForPath: path]; |
719 |
} |
} |
720 |
|
|
721 |
- (void)unsetWatcherForPath:(NSString *)path |
- (void)unsetWatcherForPath:(NSString *)path |
722 |
{ |
{ |
723 |
[gworkspace removeWatcherForPath: path]; |
[GWLib removeWatcherForPath: path]; |
724 |
} |
} |
725 |
|
|
726 |
- (void)unsetWatchersFromPath:(NSString *)path |
- (void)unsetWatchersFromPath:(NSString *)path |
763 |
- (void)openCurrentSelection:(NSArray *)paths newViewer:(BOOL)newv |
- (void)openCurrentSelection:(NSArray *)paths newViewer:(BOOL)newv |
764 |
{ |
{ |
765 |
if (newv == YES) { |
if (newv == YES) { |
766 |
[gworkspace openSelectedPaths: paths newViewer: YES]; |
[[GWLib workspaceApp] openSelectedPaths: paths newViewer: YES]; |
767 |
return; |
return; |
768 |
|
|
769 |
} else { |
} else { |
787 |
|
|
788 |
if (([type isEqualToString: NSDirectoryFileType]) |
if (([type isEqualToString: NSDirectoryFileType]) |
789 |
|| ([type isEqualToString: NSFilesystemFileType])) { |
|| ([type isEqualToString: NSFilesystemFileType])) { |
790 |
if ([gworkspace isPakageAtPath: fpath] == NO) { |
if ([GWLib isPakageAtPath: fpath] == NO) { |
791 |
[dirs addObject: fpath]; |
[dirs addObject: fpath]; |
792 |
[allfiles removeObject: fpath]; |
[allfiles removeObject: fpath]; |
793 |
count--; |
count--; |
797 |
} |
} |
798 |
|
|
799 |
if ([allfiles count]) { |
if ([allfiles count]) { |
800 |
[gworkspace openSelectedPaths: allfiles newViewer: newv]; |
[[GWLib workspaceApp] openSelectedPaths: allfiles newViewer: newv]; |
801 |
} |
} |
802 |
|
|
803 |
if ([dirs count] == 1) { |
if ([dirs count] == 1) { |