Revision: 7792
          http://skim-app.svn.sourceforge.net/skim-app/?rev=7792&view=rev
Author:   hofman
Date:     2012-11-05 17:51:55 +0000 (Mon, 05 Nov 2012)
Log Message:
-----------
Remove NSTask category and move implementation to in place at single place it 
was used

Modified Paths:
--------------
    trunk/SKMainDocument.m

Removed Paths:
-------------
    trunk/NSTask_SKExtensions.h
    trunk/NSTask_SKExtensions.m

Deleted: trunk/NSTask_SKExtensions.h
===================================================================
--- trunk/NSTask_SKExtensions.h 2012-11-05 17:46:44 UTC (rev 7791)
+++ trunk/NSTask_SKExtensions.h 2012-11-05 17:51:55 UTC (rev 7792)
@@ -1,44 +0,0 @@
-//
-//  NSTask_SKExtensions.h
-//  Skim
-//
-//  Created by Christiaan Hofman on 9/1/07.
-/*
- This software is Copyright (c) 2007-2012
- Christiaan Hofman. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
-
- - Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in
-    the documentation and/or other materials provided with the
-    distribution.
-
- - Neither the name of Christiaan Hofman nor the names of any
-    contributors may be used to endorse or promote products derived
-    from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import <Cocoa/Cocoa.h>
-
-
-@interface NSTask (SKExtensions)
-+ (NSTask *)launchedTaskWithLaunchPath:(NSString *)launchPath 
arguments:(NSArray *)arguments currentDirectoryPath:(NSString *)directoryPath;
-@end

Deleted: trunk/NSTask_SKExtensions.m
===================================================================
--- trunk/NSTask_SKExtensions.m 2012-11-05 17:46:44 UTC (rev 7791)
+++ trunk/NSTask_SKExtensions.m 2012-11-05 17:51:55 UTC (rev 7792)
@@ -1,65 +0,0 @@
-//
-//  NSTask_SKExtensions.m
-//  Skim
-//
-//  Created by Christiaan Hofman on 9/1/07.
-/*
- This software is Copyright (c) 2007-2012
- Christiaan Hofman. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions
- are met:
-
- - Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in
-    the documentation and/or other materials provided with the
-    distribution.
-
- - Neither the name of Christiaan Hofman nor the names of any
-    contributors may be used to endorse or promote products derived
-    from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "NSTask_SKExtensions.h"
-
-
-@implementation NSTask (SKExtensions) 
-
-+ (NSTask *)launchedTaskWithLaunchPath:(NSString *)launchPath 
arguments:(NSArray *)arguments currentDirectoryPath:(NSString *)directoryPath {
-    NSTask *task = [[[self alloc] init] autorelease];
-    
-    [task setLaunchPath:launchPath];
-    if (directoryPath)
-        [task setCurrentDirectoryPath:directoryPath];
-    [task setArguments:arguments];
-    [task setStandardOutput:[NSFileHandle fileHandleWithNullDevice]];
-    [task setStandardError:[NSFileHandle fileHandleWithNullDevice]];
-    @try {
-        [task launch];
-    }
-    @catch(id exception) {
-        if ([task isRunning])
-            [task terminate];
-        NSLog(@"%@ %@ failed", [task description], [task launchPath]);
-        task = nil;
-    }
-    return task;
-}
-
-@end

Modified: trunk/SKMainDocument.m
===================================================================
--- trunk/SKMainDocument.m      2012-11-05 17:46:44 UTC (rev 7791)
+++ trunk/SKMainDocument.m      2012-11-05 17:51:55 UTC (rev 7792)
@@ -61,7 +61,6 @@
 #import "SKLine.h"
 #import "SKApplicationController.h"
 #import "NSFileManager_SKExtensions.h"
-#import "NSTask_SKExtensions.h"
 #import "SKFDFParser.h"
 #import "NSData_SKExtensions.h"
 #import "SKProgressController.h"
@@ -1431,7 +1430,18 @@
         if ([ws type:theUTI conformsToType:@"com.apple.applescript.script"] || 
[ws type:theUTI conformsToType:@"com.apple.applescript.text"])
             [cmdString insertString:@"/usr/bin/osascript " atIndex:0];
         
-        [NSTask launchedTaskWithLaunchPath:@"/bin/sh" arguments:[NSArray 
arrayWithObjects:@"-c", cmdString, nil] currentDirectoryPath:[file 
stringByDeletingLastPathComponent]];
+        NSTask *task = [[[NSTask alloc] init] autorelease];
+        [task setLaunchPath:@"/bin/sh"];
+        [task setCurrentDirectoryPath:[file 
stringByDeletingLastPathComponent]];
+        [task setArguments:[NSArray arrayWithObjects:@"-c", cmdString, nil]];
+        [task setStandardOutput:[NSFileHandle fileHandleWithNullDevice]];
+        [task setStandardError:[NSFileHandle fileHandleWithNullDevice]];
+        @try {
+            [task launch];
+        }
+        @catch(id exception) {
+            NSLog(@"%@ %@ failed", [task description], [task launchPath]);
+        }
     }
 }
 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to