mirror of
https://github.com/microtherion/VocalEasel.git
synced 2025-01-08 19:24:00 +00:00
Import flat MusicXML files
This commit is contained in:
parent
b048f76565
commit
c54aa45bee
|
@ -56,24 +56,27 @@
|
||||||
|
|
||||||
- (BOOL)readFromXMLFileWrapper:(NSFileWrapper *)wrapper error:(NSError **)outError
|
- (BOOL)readFromXMLFileWrapper:(NSFileWrapper *)wrapper error:(NSError **)outError
|
||||||
{
|
{
|
||||||
NSDictionary * wrappers = [wrapper fileWrappers];
|
if ([wrapper isDirectory]) {
|
||||||
if ((vcsWrapper = [wrappers objectForKey:@"CVS"])
|
NSDictionary * wrappers = [wrapper fileWrappers];
|
||||||
|| (vcsWrapper = [wrappers objectForKey:@".svn"])
|
if ((vcsWrapper = [wrappers objectForKey:@"CVS"])
|
||||||
)
|
|| (vcsWrapper = [wrappers objectForKey:@".svn"])
|
||||||
[vcsWrapper retain];
|
)
|
||||||
NSFileWrapper * prop = [wrappers objectForKey:@"Properties"];
|
[vcsWrapper retain];
|
||||||
if (prop) {
|
NSFileWrapper * prop = [wrappers objectForKey:@"Properties"];
|
||||||
NSUndoManager * undoMgr = [self undoManager];
|
if (prop) {
|
||||||
[undoMgr disableUndoRegistration];
|
NSUndoManager * undoMgr = [self undoManager];
|
||||||
[self setValuesForKeysWithDictionary:
|
[undoMgr disableUndoRegistration];
|
||||||
[NSPropertyListSerialization
|
[self setValuesForKeysWithDictionary:
|
||||||
propertyListFromData:[prop regularFileContents]
|
[NSPropertyListSerialization
|
||||||
mutabilityOption:NSPropertyListImmutable
|
propertyListFromData:[prop regularFileContents]
|
||||||
format:nil errorDescription:nil]];
|
mutabilityOption:NSPropertyListImmutable
|
||||||
[undoMgr enableUndoRegistration];
|
format:nil errorDescription:nil]];
|
||||||
}
|
[undoMgr enableUndoRegistration];
|
||||||
return [self readFromFileWrapper:[wrappers objectForKey:@"Song"] withFilter:@"VLMusicXMLType"
|
}
|
||||||
error:outError];
|
return [self readFromFileWrapper:[wrappers objectForKey:@"Song"] withFilter:@"VLMusicXMLType"
|
||||||
|
error:outError];
|
||||||
|
} else
|
||||||
|
return [self readFromFileWrapper:wrapper withFilter:@"VLMusicXMLType" error:outError];
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user