26 |
#include <Foundation/Foundation.h> |
#include <Foundation/Foundation.h> |
27 |
#include <AppKit/AppKit.h> |
#include <AppKit/AppKit.h> |
28 |
#ifdef GNUSTEP |
#ifdef GNUSTEP |
29 |
|
#include "GWLib.h" |
30 |
#include "GWFunctions.h" |
#include "GWFunctions.h" |
31 |
#include "GWNotifications.h" |
#include "GWNotifications.h" |
32 |
#include "GWProtocol.h" |
#include "GWProtocol.h" |
33 |
#include "Browser2.h" |
#include "Browser2.h" |
34 |
#else |
#else |
35 |
|
#include <GWorkspace/GWLib.h> |
36 |
#include <GWorkspace/GWFunctions.h> |
#include <GWorkspace/GWFunctions.h> |
37 |
#include <GWorkspace/GWNotifications.h> |
#include <GWorkspace/GWNotifications.h> |
38 |
#include <GWorkspace/GWProtocol.h> |
#include <GWorkspace/GWProtocol.h> |
65 |
self = [super initWithFrame: NSZeroRect]; |
self = [super initWithFrame: NSZeroRect]; |
66 |
|
|
67 |
if (self) { |
if (self) { |
|
#ifdef GNUSTEP |
|
|
Class gwclass = [[NSBundle mainBundle] principalClass]; |
|
|
#else |
|
|
Class gwclass = [[NSBundle mainBundle] classNamed: @"GWorkspace"]; |
|
|
#endif |
|
|
|
|
|
gworkspace = (id<GWProtocol>)[gwclass gworkspace]; |
|
68 |
usesShelf = YES; |
usesShelf = YES; |
69 |
cellsIcons = NO; |
cellsIcons = NO; |
70 |
browser = nil; |
browser = nil; |
235 |
if ((isDir == NO) || ([paths count] > 1)) { |
if ((isDir == NO) || ([paths count] > 1)) { |
236 |
newPath = [newPath stringByDeletingLastPathComponent]; |
newPath = [newPath stringByDeletingLastPathComponent]; |
237 |
} else { |
} else { |
238 |
if (([gworkspace isPakageAtPath: newPath]) && (viewsapps == NO)) { |
if (([GWLib isPakageAtPath: newPath]) && (viewsapps == NO)) { |
239 |
newPath = [newPath stringByDeletingLastPathComponent]; |
newPath = [newPath stringByDeletingLastPathComponent]; |
240 |
} |
} |
241 |
} |
} |
681 |
|
|
682 |
- (void)setWatcherForPath:(NSString *)path |
- (void)setWatcherForPath:(NSString *)path |
683 |
{ |
{ |
684 |
[gworkspace addWatcherForPath: path]; |
[GWLib addWatcherForPath: path]; |
685 |
} |
} |
686 |
|
|
687 |
- (void)unsetWatcherForPath:(NSString *)path |
- (void)unsetWatcherForPath:(NSString *)path |
688 |
{ |
{ |
689 |
[gworkspace removeWatcherForPath: path]; |
[GWLib removeWatcherForPath: path]; |
690 |
} |
} |
691 |
|
|
692 |
- (void)unsetWatchersFromPath:(NSString *)path |
- (void)unsetWatchersFromPath:(NSString *)path |
782 |
- (void)openSelectedPaths:(NSArray *)paths newViewer:(BOOL)isnew |
- (void)openSelectedPaths:(NSArray *)paths newViewer:(BOOL)isnew |
783 |
{ |
{ |
784 |
[self setSelectedPaths: paths]; |
[self setSelectedPaths: paths]; |
785 |
[gworkspace openSelectedPaths: paths newViewer: isnew]; |
[[GWLib workspaceApp] openSelectedPaths: paths newViewer: isnew]; |
786 |
} |
} |
787 |
|
|
788 |
@end |
@end |