Author: rmottola Date: Mon May 26 21:09:26 2014 New Revision: 37908 URL: http://svn.gna.org/viewcvs/gnustep?rev=37908&view=rev Log: reindent cleanup
Modified: apps/gworkspace/trunk/Operation/FileOpInfo.m Modified: apps/gworkspace/trunk/Operation/FileOpInfo.m URL: http://svn.gna.org/viewcvs/gnustep/apps/gworkspace/trunk/Operation/FileOpInfo.m?rev=37908&r1=37907&r2=37908&view=diff ============================================================================== --- apps/gworkspace/trunk/Operation/FileOpInfo.m (original) +++ apps/gworkspace/trunk/Operation/FileOpInfo.m Mon May 26 21:09:26 2014 @@ -315,16 +315,19 @@ - (IBAction)pause:(id)sender { - if (paused == NO) { - [pauseButt setTitle: NSLocalizedString(@"Continue", @"")]; - [stopButt setEnabled: NO]; - paused = YES; - } else { - [pauseButt setTitle: NSLocalizedString(@"Pause", @"")]; - [stopButt setEnabled: YES]; - paused = NO; - [executor performOperation]; - } + if (paused == NO) + { + [pauseButt setTitle: NSLocalizedString(@"Continue", @"")]; + [stopButt setEnabled: NO]; + paused = YES; + } + else + { + [pauseButt setTitle: NSLocalizedString(@"Pause", @"")]; + [stopButt setEnabled: YES]; + paused = NO; + [executor performOperation]; + } } - (IBAction)stop:(id)sender @@ -504,12 +507,14 @@ [executor setOperation: opinfo]; samename = [executor checkSameName]; - if (samename) { - NSString *msg = nil; - NSString *title = nil; - int result; - - if ([type isEqual: @"NSWorkspaceMoveOperation"]) { + if (samename) + { + NSString *msg = nil; + NSString *title = nil; + int result; + + if ([type isEqual: @"NSWorkspaceMoveOperation"]) + { msg = @"Some items have the same name;\ndo you want to replace them?"; title = @"Move"; @@ -556,17 +561,18 @@ } - (BOOL)connection:(NSConnection*)ancestor - shouldMakeNewConnection:(NSConnection*)newConn -{ - if (ancestor == execconn) { - [newConn setDelegate: self]; - [nc addObserver: self - selector: @selector(connectionDidDie:) - name: NSConnectionDidDieNotification - object: newConn]; - return YES; - } - +shouldMakeNewConnection:(NSConnection*)newConn +{ + if (ancestor == execconn) + { + [newConn setDelegate: self]; + [nc addObserver: self + selector: @selector(connectionDidDie:) + name: NSConnectionDidDieNotification + object: newConn]; + return YES; + } + return NO; } @@ -853,29 +859,46 @@ - (oneway void)performOperation { - canupdate = YES; - - if ([operation isEqual: @"NSWorkspaceMoveOperation"] - || [operation isEqual: @"GWorkspaceRecycleOutOperation"]) { - [self doMove]; - } else if ([operation isEqual: @"NSWorkspaceCopyOperation"]) { - [self doCopy]; - } else if ([operation isEqual: @"NSWorkspaceLinkOperation"]) { - [self doLink]; - } else if ([operation isEqual: @"NSWorkspaceDestroyOperation"] - || [operation isEqual: @"GWorkspaceEmptyRecyclerOperation"]) { - [self doRemove]; - } else if ([operation isEqual: @"NSWorkspaceDuplicateOperation"]) { - [self doDuplicate]; - } else if ([operation isEqual: @"NSWorkspaceRecycleOperation"]) { - [self doTrash]; - } else if ([operation isEqual: @"GWorkspaceRenameOperation"]) { - [self doRename]; - } else if ([operation isEqual: @"GWorkspaceCreateDirOperation"]) { - [self doNewFolder]; - } else if ([operation isEqual: @"GWorkspaceCreateFileOperation"]) { - [self doNewFile]; - } + canupdate = YES; + + if ([operation isEqual: @"NSWorkspaceMoveOperation"] + || [operation isEqual: @"GWorkspaceRecycleOutOperation"]) + { + [self doMove]; + } + else if ([operation isEqual: @"NSWorkspaceCopyOperation"]) + { + [self doCopy]; + } + else if ([operation isEqual: @"NSWorkspaceLinkOperation"]) + { + [self doLink]; + } + else if ([operation isEqual: @"NSWorkspaceDestroyOperation"] + || [operation isEqual: @"GWorkspaceEmptyRecyclerOperation"]) + { + [self doRemove]; + } + else if ([operation isEqual: @"NSWorkspaceDuplicateOperation"]) + { + [self doDuplicate]; + } + else if ([operation isEqual: @"NSWorkspaceRecycleOperation"]) + { + [self doTrash]; + } + else if ([operation isEqual: @"GWorkspaceRenameOperation"]) + { + [self doRename]; + } + else if ([operation isEqual: @"GWorkspaceCreateDirOperation"]) + { + [self doNewFolder]; + } + else if ([operation isEqual: @"GWorkspaceCreateFileOperation"]) + { + [self doNewFile]; + } } - (NSData *)processedFiles @@ -893,17 +916,19 @@ - (void)doMove { - while (1) { - CHECK_DONE; - GET_FILENAME; - - if ((samename == NO) || (samename && [self removeExisting: fileinfo])) { - NSString *src = [source stringByAppendingPathComponent: filename]; - NSString *dst = [destination stringByAppendingPathComponent: filename]; + while (1) + { + CHECK_DONE; + GET_FILENAME; + + if ((samename == NO) || (samename && [self removeExisting: fileinfo])) + { + NSString *src = [source stringByAppendingPathComponent: filename]; + NSString *dst = [destination stringByAppendingPathComponent: filename]; - if ([fm movePath: src toPath: dst handler: self]) { - [procfiles addObject: filename]; - + if ([fm movePath: src toPath: dst handler: self]) + { + [procfiles addObject: filename]; } else { /* check for broken symlink */ NSDictionary *attributes = [fm fileAttributesAtPath: src traverseLink: NO]; _______________________________________________ Gnustep-cvs mailing list Gnustep-cvs@gna.org https://mail.gna.org/listinfo/gnustep-cvs