69 |
self = [super initWithFrame: NSZeroRect]; |
self = [super initWithFrame: NSZeroRect]; |
70 |
|
|
71 |
if (self) { |
if (self) { |
|
#ifdef GNUSTEP |
|
|
Class gwclass = [[NSBundle mainBundle] principalClass]; |
|
|
#else |
|
|
Class gwclass = [[NSBundle mainBundle] classNamed: @"GWorkspace"]; |
|
|
#endif |
|
|
|
|
|
gworkspace = (id<GWProtocol>)[gwclass gworkspace]; |
|
72 |
usesShelf = YES; |
usesShelf = YES; |
73 |
rootPath = nil; |
rootPath = nil; |
74 |
lastPath = nil; |
lastPath = nil; |
264 |
if ((isDir == NO) || ([paths count] > 1)) { |
if ((isDir == NO) || ([paths count] > 1)) { |
265 |
newPath = [newPath stringByDeletingLastPathComponent]; |
newPath = [newPath stringByDeletingLastPathComponent]; |
266 |
} else { |
} else { |
267 |
if (([gworkspace isPakageAtPath: newPath]) && (viewsapps == NO)) { |
if (([GWLib isPakageAtPath: newPath]) && (viewsapps == NO)) { |
268 |
newPath = [newPath stringByDeletingLastPathComponent]; |
newPath = [newPath stringByDeletingLastPathComponent]; |
269 |
} |
} |
270 |
} |
} |
346 |
path = [path stringByDeletingLastPathComponent]; |
path = [path stringByDeletingLastPathComponent]; |
347 |
selection = [NSArray arrayWithArray: selectedPaths]; |
selection = [NSArray arrayWithArray: selectedPaths]; |
348 |
} else { |
} else { |
349 |
if ([gworkspace isPakageAtPath: path] && (viewsapps == NO)) { |
if ([GWLib isPakageAtPath: path] && (viewsapps == NO)) { |
350 |
path = [path stringByDeletingLastPathComponent]; |
path = [path stringByDeletingLastPathComponent]; |
351 |
selection = [NSArray arrayWithArray: selectedPaths]; |
selection = [NSArray arrayWithArray: selectedPaths]; |
352 |
} else { |
} else { |
736 |
|
|
737 |
- (void)setWatcherForPath:(NSString *)path |
- (void)setWatcherForPath:(NSString *)path |
738 |
{ |
{ |
739 |
[gworkspace addWatcherForPath: path]; |
[GWLib addWatcherForPath: path]; |
740 |
} |
} |
741 |
|
|
742 |
- (void)unsetWatcherForPath:(NSString *)path |
- (void)unsetWatcherForPath:(NSString *)path |
743 |
{ |
{ |
744 |
[gworkspace removeWatcherForPath: path]; |
[GWLib removeWatcherForPath: path]; |
745 |
} |
} |
746 |
|
|
747 |
- (void)unsetWatchersFromPath:(NSString *)path |
- (void)unsetWatchersFromPath:(NSString *)path |
895 |
[self setSelectedPaths: paths]; |
[self setSelectedPaths: paths]; |
896 |
|
|
897 |
if (newv == YES) { |
if (newv == YES) { |
898 |
[gworkspace openSelectedPaths: paths newViewer: YES]; |
[[GWLib workspaceApp] openSelectedPaths: paths newViewer: YES]; |
899 |
return; |
return; |
900 |
|
|
901 |
} else { |
} else { |
917 |
|
|
918 |
if (([type isEqualToString: NSDirectoryFileType]) |
if (([type isEqualToString: NSDirectoryFileType]) |
919 |
|| ([type isEqualToString: NSFilesystemFileType])) { |
|| ([type isEqualToString: NSFilesystemFileType])) { |
920 |
if ([gworkspace isPakageAtPath: fpath] == NO) { |
if ([GWLib isPakageAtPath: fpath] == NO) { |
921 |
[dirs addObject: fpath]; |
[dirs addObject: fpath]; |
922 |
[allfiles removeObject: fpath]; |
[allfiles removeObject: fpath]; |
923 |
count--; |
count--; |
927 |
} |
} |
928 |
|
|
929 |
if ([allfiles count]) { |
if ([allfiles count]) { |
930 |
[gworkspace openSelectedPaths: allfiles newViewer: newv]; |
[[GWLib workspaceApp] openSelectedPaths: allfiles newViewer: newv]; |
931 |
} |
} |
932 |
|
|
933 |
if ([dirs count] == 1) { |
if ([dirs count] == 1) { |