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 |
#else |
#else |
33 |
|
#include <GWorkspace/GWLib.h> |
34 |
#include <GWorkspace/GWFunctions.h> |
#include <GWorkspace/GWFunctions.h> |
35 |
#include <GWorkspace/GWNotifications.h> |
#include <GWorkspace/GWNotifications.h> |
36 |
#endif |
#endif |
291 |
|
|
292 |
- (void)setWatcher |
- (void)setWatcher |
293 |
{ |
{ |
294 |
[gw addWatcherForPath: trashPath]; |
[GWLib addWatcherForPath: trashPath]; |
295 |
watching = YES; |
watching = YES; |
296 |
} |
} |
297 |
|
|
300 |
[[NSNotificationCenter defaultCenter] removeObserver: self |
[[NSNotificationCenter defaultCenter] removeObserver: self |
301 |
name: GWFileWatcherFileDidChangeNotification object: nil]; |
name: GWFileWatcherFileDidChangeNotification object: nil]; |
302 |
|
|
303 |
[gw removeWatcherForPath: trashPath]; |
[GWLib removeWatcherForPath: trashPath]; |
304 |
|
|
305 |
watching = NO; |
watching = NO; |
306 |
} |
} |