Fixed a bug in APL plugin with image files containing # in name
parent
e063790e93
commit
f9f0891f6c
|
@ -755,6 +755,7 @@
|
||||||
|
|
||||||
|
|
||||||
bool modifier1_pressed = ((mods & kCGEventFlagMaskCommand)!=0)&((mods & kCGEventFlagMaskControl)!=0);
|
bool modifier1_pressed = ((mods & kCGEventFlagMaskCommand)!=0)&((mods & kCGEventFlagMaskControl)!=0);
|
||||||
|
modifier1_pressed |= ((mods & kCGEventFlagMaskShift)!=0);
|
||||||
bool should_clean = false;
|
bool should_clean = false;
|
||||||
|
|
||||||
if (src >= OpenFinder_Related && src <= OpenFinder_Related_end)
|
if (src >= OpenFinder_Related && src <= OpenFinder_Related_end)
|
||||||
|
@ -775,6 +776,7 @@
|
||||||
CFRelease(event);
|
CFRelease(event);
|
||||||
|
|
||||||
bool modifier1_pressed = ((mods & kCGEventFlagMaskCommand)!=0)&((mods & kCGEventFlagMaskControl)!=0);
|
bool modifier1_pressed = ((mods & kCGEventFlagMaskCommand)!=0)&((mods & kCGEventFlagMaskControl)!=0);
|
||||||
|
modifier1_pressed |= ((mods & kCGEventFlagMaskShift)!=0);
|
||||||
bool should_autoplay = false;
|
bool should_autoplay = false;
|
||||||
|
|
||||||
if (src >= OpenFinder_Related && src <= OpenFinder_Related_end)
|
if (src >= OpenFinder_Related && src <= OpenFinder_Related_end)
|
||||||
|
|
|
@ -1,11 +1,3 @@
|
||||||
//
|
|
||||||
// CueSheetDecoder.m
|
|
||||||
// CueSheet
|
|
||||||
//
|
|
||||||
// Created by Zaphod Beeblebrox on 10/8/07.
|
|
||||||
// Copyright 2007 __MyCompanyName__. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import "APLDecoder.h"
|
#import "APLDecoder.h"
|
||||||
#import "APLFile.h"
|
#import "APLFile.h"
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,3 @@
|
||||||
//
|
|
||||||
// APLFile.h
|
|
||||||
// APL
|
|
||||||
//
|
|
||||||
// Created by ??????? ???????? on 10/18/07.
|
|
||||||
// Copyright 2007 __MyCompanyName__. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
//
|
|
||||||
// APLFile.m
|
|
||||||
// APL
|
|
||||||
//
|
|
||||||
// Created by ??????? ???????? on 10/18/07.
|
|
||||||
// Copyright 2007 __MyCompanyName__. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import "APLFile.h"
|
#import "APLFile.h"
|
||||||
#import "ApeTag.h"
|
#import "ApeTag.h"
|
||||||
|
@ -33,33 +27,17 @@
|
||||||
{
|
{
|
||||||
NSRange protocolRange = [path rangeOfString:@"://"];
|
NSRange protocolRange = [path rangeOfString:@"://"];
|
||||||
if (protocolRange.location != NSNotFound)
|
if (protocolRange.location != NSNotFound)
|
||||||
{
|
|
||||||
return [NSURL URLWithString:path];
|
return [NSURL URLWithString:path];
|
||||||
}
|
|
||||||
|
|
||||||
NSMutableString *unixPath = [path mutableCopy];
|
NSMutableString *unixPath = [path mutableCopy];
|
||||||
|
|
||||||
NSString *fragment = @"";
|
|
||||||
NSRange fragmentRange = [path rangeOfString:@"#"];
|
|
||||||
if (fragmentRange.location != NSNotFound)
|
|
||||||
{
|
|
||||||
fragmentRange = NSMakeRange(fragmentRange.location, [unixPath length] - fragmentRange.location);
|
|
||||||
|
|
||||||
fragment = [unixPath substringWithRange:fragmentRange];
|
|
||||||
[unixPath deleteCharactersInRange:fragmentRange];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (![unixPath hasPrefix:@"/"]) {
|
if (![unixPath hasPrefix:@"/"]) {
|
||||||
//Only relative paths would have windows backslashes.
|
//Only relative paths would have windows backslashes.
|
||||||
[unixPath replaceOccurrencesOfString:@"\\" withString:@"/" options:0 range:NSMakeRange(0, [unixPath length])];
|
[unixPath replaceOccurrencesOfString:@"\\" withString:@"/" options:0 range:NSMakeRange(0, [unixPath length])];
|
||||||
|
|
||||||
NSString *basePath = [[[baseFilename stringByStandardizingPath] stringByDeletingLastPathComponent] stringByAppendingString:@"/"];
|
NSString *basePath = [[[baseFilename stringByStandardizingPath] stringByDeletingLastPathComponent] stringByAppendingString:@"/"];
|
||||||
|
|
||||||
[unixPath insertString:basePath atIndex:0];
|
[unixPath insertString:basePath atIndex:0];
|
||||||
}
|
}
|
||||||
|
return [NSURL URLWithString:[[NSURL fileURLWithPath:unixPath] absoluteString]];
|
||||||
//Append the fragment
|
|
||||||
return [NSURL URLWithString:[[[NSURL fileURLWithPath:unixPath] absoluteString] stringByAppendingString: fragment]];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
-initWithFile:(NSString*)filename {
|
-initWithFile:(NSString*)filename {
|
||||||
|
@ -100,7 +78,7 @@
|
||||||
{
|
{
|
||||||
[file release];
|
[file release];
|
||||||
file = [self urlForPath:value relativeTo:filename];
|
file = [self urlForPath:value relativeTo:filename];
|
||||||
//NSLog(@"APL refers to file '%@'", file);
|
NSLog(@"APL refers to file '%@' read '%@'", file, value);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (![field compare:@"Start Block" options:NSCaseInsensitiveSearch])
|
if (![field compare:@"Start Block" options:NSCaseInsensitiveSearch])
|
||||||
|
|
|
@ -1,10 +1,3 @@
|
||||||
//
|
|
||||||
// CueSheetMetadataReader.h
|
|
||||||
// CueSheet
|
|
||||||
//
|
|
||||||
// Created by Vincent Spader on 10/12/07.
|
|
||||||
// Copyright 2007 __MyCompanyName__. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,3 @@
|
||||||
//
|
|
||||||
// ApeTag.h
|
|
||||||
// MacApl
|
|
||||||
//
|
|
||||||
// Created by ??????? ???????? on 10/15/07.
|
|
||||||
// Copyright 2007 Vasfed. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
|
|
||||||
//not full support!! and even may have not enougth checks to find a non-supported data!
|
//not full support!! and even may have not enougth checks to find a non-supported data!
|
||||||
|
|
|
@ -1,10 +1,3 @@
|
||||||
//
|
|
||||||
// ApeTag.mm
|
|
||||||
// MacApl
|
|
||||||
//
|
|
||||||
// Created by ??????? ???????? on 10/15/07.
|
|
||||||
// Copyright 2007 __MyCompanyName__. All rights reserved.
|
|
||||||
//
|
|
||||||
|
|
||||||
// as simple as it can be - just write a readable tag, no options etc.
|
// as simple as it can be - just write a readable tag, no options etc.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue