Revision: 4944
http://skim-app.svn.sourceforge.net/skim-app/?rev=4944&view=rev
Author: hofman
Date: 2008-11-11 16:26:32 +0000 (Tue, 11 Nov 2008)
Log Message:
-----------
support texmaker preset
Modified Paths:
--------------
trunk/SKPDFDocument.m
Modified: trunk/SKPDFDocument.m
===================================================================
--- trunk/SKPDFDocument.m 2008-11-11 16:23:56 UTC (rev 4943)
+++ trunk/SKPDFDocument.m 2008-11-11 16:26:32 UTC (rev 4944)
@@ -1444,7 +1444,6 @@
if ([editorCmd isAbsolutePath] == NO) {
NSMutableArray *searchPaths = [NSMutableArray
arrayWithObjects:@"/usr/bin", @"/usr/local/bin", nil];
- NSString *executablePath = nil;
NSEnumerator *pathEnum;
NSString *path;
NSString *toolPath;
@@ -1454,10 +1453,9 @@
if ([editorPreset isEqualToString:@""] == NO) {
if ((path = [[NSWorkspace sharedWorkspace]
fullPathForApplication:editorPreset]) &&
(appBundle = [NSBundle bundleWithPath:path])) {
- executablePath = [appBundle executablePath];
[searchPaths addObject:[appBundle sharedSupportPath]];
[searchPaths addObject:[appBundle resourcePath]];
- [searchPaths addObject:[executablePath
stringByDeletingLastPathComponent]];
+ [searchPaths addObject:[[appBundle executablePath]
stringByDeletingLastPathComponent]];
}
} else {
pathEnum = [[[SKApplicationController
sharedApplicationController] applicationSupportDirectories] objectEnumerator];
@@ -1470,12 +1468,12 @@
pathEnum = [searchPaths objectEnumerator];
while (path = [pathEnum nextObject]) {
toolPath = [path stringByAppendingPathComponent:editorCmd];
- if ([fm isExecutableFileAtPath:toolPath] && [executablePath
caseInsensitiveCompare:toolPath] != NSOrderedSame) {
+ if ([fm isExecutableFileAtPath:toolPath]) {
editorCmd = toolPath;
break;
}
toolPath = [[path stringByAppendingPathComponent:@"bin"]
stringByAppendingPathComponent:editorCmd];
- if ([fm isExecutableFileAtPath:toolPath] && [executablePath
caseInsensitiveCompare:toolPath] != NSOrderedSame) {
+ if ([fm isExecutableFileAtPath:toolPath]) {
editorCmd = toolPath;
break;
}
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