/[gnustep]/gnustep/usr-apps/gworkspace/GWorkspace/GWorkspace.m
ViewVC logotype

Diff of /gnustep/usr-apps/gworkspace/GWorkspace/GWorkspace.m

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.16 by esersale, Tue Sep 30 15:38:05 2003 UTC revision 1.17 by esersale, Sat Oct 4 14:45:18 2003 UTC
# Line 649  return [ws openFile: fullPath withApplic Line 649  return [ws openFile: fullPath withApplic
649          [defaults synchronize];          [defaults synchronize];
650    
651    [[NSDistributedNotificationCenter defaultCenter] addObserver: self    [[NSDistributedNotificationCenter defaultCenter] addObserver: self
652                                                  selector: @selector(fileSystemWillChangeNotification:)                                                  selector: @selector(fileSystemWillChange:)
653                                                            name: GWFileSystemWillChangeNotification                                                            name: GWFileSystemWillChangeNotification
654                                                          object: nil];                                                          object: nil];
655    
656    [[NSDistributedNotificationCenter defaultCenter] addObserver: self    [[NSDistributedNotificationCenter defaultCenter] addObserver: self
657                                                  selector: @selector(fileSystemDidChangeNotification:)                                                  selector: @selector(fileSystemDidChange:)
658                                                            name: GWFileSystemDidChangeNotification                                                            name: GWFileSystemDidChangeNotification
659                                                          object: nil];                                                          object: nil];
660    
# Line 1244  NSLocalizedString(@"OK", @""), nil, nil) Line 1244  NSLocalizedString(@"OK", @""), nil, nil)
1244    }    }
1245  }  }
1246    
1247  - (void)fileSystemWillChangeNotification:(NSNotification *)notif  - (void)fileSystemWillChange:(NSNotification *)notif
1248  {  {
1249    NSDictionary *info = [notif userInfo];    NSDictionary *info = [notif userInfo];
1250    NSString *operation = [info objectForKey: @"operation"];    NSString *operation = [info objectForKey: @"operation"];
# Line 1303  NSLocalizedString(@"OK", @""), nil, nil) Line 1303  NSLocalizedString(@"OK", @""), nil, nil)
1303                                                                                  object: dict];                                                                                  object: dict];
1304  }  }
1305    
1306  - (void)fileSystemDidChangeNotification:(NSNotification *)notif  - (void)fileSystemDidChange:(NSNotification *)notif
1307  {  {
1308    NSDictionary *info = [notif userInfo];    NSDictionary *info = [notif userInfo];
1309    NSString *operation = [info objectForKey: @"operation"];    NSString *operation = [info objectForKey: @"operation"];
1310    NSString *source = [info objectForKey: @"source"];    NSString *source = [info objectForKey: @"source"];
1311    NSString *destination = [info objectForKey: @"destination"];    NSString *destination = [info objectForKey: @"destination"];
1312    NSArray *files = [info objectForKey: @"files"];    NSArray *files = [info objectForKey: @"files"];
1313      NSArray *origfiles = [info objectForKey: @"origfiles"];
1314          NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithCapacity: 1];                      NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithCapacity: 1];            
1315    NSString *opPtr = nil;    NSString *opPtr = nil;
1316    
# Line 1337  NSLocalizedString(@"OK", @""), nil, nil) Line 1338  NSLocalizedString(@"OK", @""), nil, nil)
1338             || opPtr == NSWorkspaceDuplicateOperation             || opPtr == NSWorkspaceDuplicateOperation
1339                                                   || opPtr == NSWorkspaceRecycleOperation                                                   || opPtr == NSWorkspaceRecycleOperation
1340                                                           || opPtr == GWorkspaceRecycleOutOperation) {                                                           || opPtr == GWorkspaceRecycleOutOperation) {
1341                  [GWLib unLockFiles: files inDirectoryAtPath: destination];                        [GWLib unLockFiles: origfiles inDirectoryAtPath: destination];  
1342    }    }
1343    
1344    if (opPtr == NSWorkspaceMoveOperation    if (opPtr == NSWorkspaceMoveOperation
# Line 1345  NSLocalizedString(@"OK", @""), nil, nil) Line 1346  NSLocalizedString(@"OK", @""), nil, nil)
1346                                  || opPtr == NSWorkspaceRecycleOperation                                  || opPtr == NSWorkspaceRecycleOperation
1347                                  || opPtr == GWorkspaceRecycleOutOperation                                  || opPtr == GWorkspaceRecycleOutOperation
1348                                  || opPtr == GWorkspaceEmptyRecyclerOperation) {                                  || opPtr == GWorkspaceEmptyRecyclerOperation) {
1349      [GWLib unLockFiles: files inDirectoryAtPath: source];      [GWLib unLockFiles: origfiles inDirectoryAtPath: source];
1350    }    }
1351    
1352          [dict setObject: opPtr forKey: @"operation"];            [dict setObject: opPtr forKey: @"operation"];  
# Line 1355  NSLocalizedString(@"OK", @""), nil, nil) Line 1356  NSLocalizedString(@"OK", @""), nil, nil)
1356    
1357          [[NSNotificationCenter defaultCenter]          [[NSNotificationCenter defaultCenter]
1358                                  postNotificationName: GWFileSystemDidChangeNotification                                  postNotificationName: GWFileSystemDidChangeNotification
1359                                                                                  object: dict];                                                                              object: dict];
1360  }  }
1361    
1362  - (void)setSelectedPaths:(NSArray *)paths  - (void)setSelectedPaths:(NSArray *)paths
# Line 1469  NSLocalizedString(@"OK", @""), nil, nil) Line 1470  NSLocalizedString(@"OK", @""), nil, nil)
1470    [notifObj setObject: @"" forKey: @"source"];      [notifObj setObject: @"" forKey: @"source"];  
1471    [notifObj setObject: basePath forKey: @"destination"];            [notifObj setObject: basePath forKey: @"destination"];        
1472    [notifObj setObject: [NSArray arrayWithObjects: fileName, nil] forKey: @"files"];        [notifObj setObject: [NSArray arrayWithObjects: fileName, nil] forKey: @"files"];    
1473      [notifObj setObject: [NSArray arrayWithObjects: fileName, nil] forKey: @"origfiles"];
1474    
1475          [[NSNotificationCenter defaultCenter]          [[NSNotificationCenter defaultCenter]
1476                                   postNotificationName: GWFileSystemWillChangeNotification                                   postNotificationName: GWFileSystemWillChangeNotification
# Line 1552  NSLocalizedString(@"OK", @""), nil, nil) Line 1554  NSLocalizedString(@"OK", @""), nil, nil)
1554          [notifObj setObject: basePath forKey: @"source"];                [notifObj setObject: basePath forKey: @"source"];      
1555          [notifObj setObject: basePath forKey: @"destination"];            [notifObj setObject: basePath forKey: @"destination"];  
1556          [notifObj setObject: [NSArray arrayWithObjects: path, nil] forKey: @"files"];            [notifObj setObject: [NSArray arrayWithObjects: path, nil] forKey: @"files"];  
1557            [notifObj setObject: [NSArray arrayWithObjects: path, nil] forKey: @"origfiles"];      
1558    
1559                  [[NSNotificationCenter defaultCenter]                  [[NSNotificationCenter defaultCenter]
1560                                           postNotificationName: GWFileSystemWillChangeNotification                                           postNotificationName: GWFileSystemWillChangeNotification

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26