1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-22 12:33:29 +00:00

Windows have titles again. Also I've owned up to not knowing how to edit UEFs right now.

This commit is contained in:
Thomas Harte 2016-09-12 22:15:38 -04:00
parent 40660fe680
commit c3a795328d
4 changed files with 6 additions and 1 deletions

View File

@ -14,6 +14,7 @@ class DocumentController: NSDocumentController {
if let documentClass = analyser.documentClass as? NSDocument.Type {
let document = documentClass.init()
if let machineDocument = document as? MachineDocument {
machineDocument.setDisplayName(analyser.displayName)
machineDocument.configureAs(analyser)
return machineDocument
}

View File

@ -35,7 +35,7 @@
<key>CFBundleTypeName</key>
<string>Electron/BBC Tape Image</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<string>Viewer</string>
<key>LSItemContentTypes</key>
<array/>
<key>LSTypeIsPackage</key>

View File

@ -15,6 +15,7 @@
- (instancetype)initWithFileAtURL:(NSURL *)url;
@property(nonatomic, readonly) Class documentClass;
@property(nonatomic, readonly) NSString *displayName;
- (void)applyToMachine:(CSMachine *)machine;
@end

View File

@ -27,6 +27,9 @@
std::list<StaticAnalyser::Target> targets = StaticAnalyser::GetTargets([url fileSystemRepresentation]);
if(!targets.size()) return nil;
_target = targets.front();
// TODO: can this better be supplied by the analyser?
_displayName = [[url pathComponents] lastObject];
}
return self;
}