Revision: 4744
http://skim-app.svn.sourceforge.net/skim-app/?rev=4744&view=rev
Author: hofman
Date: 2008-10-06 16:48:11 +0000 (Mon, 06 Oct 2008)
Log Message:
-----------
Remove deprecated applescript support for extra tex line arguments of open
command
Modified Paths:
--------------
trunk/SKApplication.m
trunk/Skim.sdef
Modified: trunk/SKApplication.m
===================================================================
--- trunk/SKApplication.m 2008-10-06 11:25:00 UTC (rev 4743)
+++ trunk/SKApplication.m 2008-10-06 16:48:11 UTC (rev 4744)
@@ -38,7 +38,6 @@
#import "SKApplication.h"
#import "SKPDFDocument.h"
-#import "SKPDFSynchronizer.h"
#import "SKPDFView.h"
#import "NSString_SKExtensions.h"
#import "NSMenu_SKExtensions.h"
@@ -245,52 +244,4 @@
return orderedDocuments;
}
-- (id)handleOpenScriptCommand:(NSScriptCommand *)command {
- NSDictionary *args = [command evaluatedArguments];
- id file = [command directParameter];
- id lineNumber = [args objectForKey:@"line"];
- id source = [args objectForKey:@"source"];
-
- if (lineNumber == nil || ([file isKindOfClass:[NSArray class]] && [file
count] != 1)) {
- if ([[SKApplication superclass] instancesRespondToSelector:_cmd])
- [super handleOpenScriptCommand:command];
- return nil;
- }
-
- if ([file isKindOfClass:[NSArray class]])
- file = [file lastObject];
- if ([file isKindOfClass:[NSString class]])
- file = [NSURL fileURLWithPath:file];
-
- if (source == nil)
- source = file;
- if ([source isKindOfClass:[NSString class]])
- source = [NSURL fileURLWithPath:source];
-
- if ([file isKindOfClass:[NSURL class]] && [source isKindOfClass:[NSURL
class]]) {
-
- source = [[source path] stringByReplacingPathExtension:@"tex"];
-
- if ([[NSFileManager defaultManager] fileExistsAtPath:[file path]]) {
-
- NSError *error = nil;
- SKPDFDocument *document = [[NSDocumentController
sharedDocumentController] openDocumentWithContentsOfURL:file display:YES
error:&error];
- if (document == nil)
- [self presentError:error];
-
- if ([[NSFileManager defaultManager] fileExistsAtPath:source] &&
[document respondsToSelector:@selector(synchronizer)])
- [[document synchronizer] findPageAndLocationForLine:MAX(0,
[lineNumber intValue] - 1) inFile:source];
-
- } else {
- [command setScriptErrorNumber:NSArgumentsWrongScriptError];
- [command setScriptErrorString:@"File does not exist."];
- }
- } else {
- [command setScriptErrorNumber:NSArgumentsWrongScriptError];
- [command setScriptErrorString:@"File argument is not a file."];
- }
-
- return nil;
-}
-
@end
Modified: trunk/Skim.sdef
===================================================================
--- trunk/Skim.sdef 2008-10-06 11:25:00 UTC (rev 4743)
+++ trunk/Skim.sdef 2008-10-06 16:48:11 UTC (rev 4744)
@@ -260,14 +260,6 @@
-->
<type type="file" list="yes"/>
</direct-parameter>
- <parameter name="at TeX line" code="Line" type="integer"
optional="yes" hidden="yes"
- description="Go to a location in the PDF corresponding to the
line in a TeX source file.">
- <cocoa key="line"/>
- </parameter>
- <parameter name="from source" type="file" code="SrcF"
optional="yes" hidden="yes"
- description="The TeX source file. By default
this is derived from the file.">
- <cocoa key="source"/>
- </parameter>
<!--
According to TN2106, 'open' should return the
resulting document
object. However, the Cocoa implementation does
not do this yet.
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit