[Info Plist] Auto format XML escapes
Automatically format any XML escapes of file type association names. Adjust Info.plist to account for this change. Signed-off-by: Christopher Snowhill <kode54@gmail.com>swiftingly
parent
d59b5335e9
commit
2b8156e86c
|
@ -348,6 +348,16 @@ static PluginController *sharedPluginController = nil;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static NSString *xmlEscapeString(NSString * string) {
|
||||||
|
CFStringRef textXML = CFXMLCreateStringByEscapingEntities(kCFAllocatorDefault, (CFStringRef)string, nil);
|
||||||
|
if(textXML) {
|
||||||
|
NSString *textString = (__bridge NSString *)textXML;
|
||||||
|
CFRelease(textXML);
|
||||||
|
return textString;
|
||||||
|
}
|
||||||
|
return @"";
|
||||||
|
}
|
||||||
|
|
||||||
- (void)printPluginInfo {
|
- (void)printPluginInfo {
|
||||||
ALog(@"Sources: %@", self.sources);
|
ALog(@"Sources: %@", self.sources);
|
||||||
ALog(@"Containers: %@", self.containers);
|
ALog(@"Containers: %@", self.containers);
|
||||||
|
@ -504,7 +514,7 @@ static PluginController *sharedPluginController = nil;
|
||||||
\t\t\t<integer>1</integer>\n\
|
\t\t\t<integer>1</integer>\n\
|
||||||
\t\t\t<key>CFBundleTypeName</key>\n\
|
\t\t\t<key>CFBundleTypeName</key>\n\
|
||||||
\t\t\t<string>"];
|
\t\t\t<string>"];
|
||||||
[stringList addObject:[type objectAtIndex:0]];
|
[stringList addObject:xmlEscapeString([type objectAtIndex:0])];
|
||||||
[stringList addObject:@"</string>\n\
|
[stringList addObject:@"</string>\n\
|
||||||
\t\t\t<key>CFBundleTypeRole</key>\n\
|
\t\t\t<key>CFBundleTypeRole</key>\n\
|
||||||
\t\t\t<string>Viewer</string>\n\
|
\t\t\t<string>Viewer</string>\n\
|
||||||
|
|
|
@ -825,7 +825,7 @@
|
||||||
<key>CFBundleTypeIconSystemGenerated</key>
|
<key>CFBundleTypeIconSystemGenerated</key>
|
||||||
<integer>1</integer>
|
<integer>1</integer>
|
||||||
<key>CFBundleTypeName</key>
|
<key>CFBundleTypeName</key>
|
||||||
<string>Monkey's Audio File</string>
|
<string>Monkey's Audio File</string>
|
||||||
<key>CFBundleTypeRole</key>
|
<key>CFBundleTypeRole</key>
|
||||||
<string>Viewer</string>
|
<string>Viewer</string>
|
||||||
<key>LSHandlerRank</key>
|
<key>LSHandlerRank</key>
|
||||||
|
|
|
@ -185,7 +185,7 @@ static void oneTimeInit(void) {
|
||||||
+ (NSArray *)fileTypeAssociations {
|
+ (NSArray *)fileTypeAssociations {
|
||||||
return @[
|
return @[
|
||||||
@[@"Hively Tracker File", @"song.icns", @"hvl"],
|
@[@"Hively Tracker File", @"song.icns", @"hvl"],
|
||||||
@[@"Abyss' Highest eXperience File", @"song.icns", @"ahx"]
|
@[@"Abyss' Highest eXperience File", @"song.icns", @"ahx"]
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue