Cocoa Port:
- Show the ROM icon and ROM name in the main window's title bar. - Support OS X's standard document handling UI in the main window's title bar.
This commit is contained in:
parent
d0c70eccb3
commit
fa17fa0554
|
@ -249,6 +249,7 @@
|
||||||
|
|
||||||
//Bring the application to the front
|
//Bring the application to the front
|
||||||
[NSApp activateIgnoringOtherApps:TRUE];
|
[NSApp activateIgnoringOtherApps:TRUE];
|
||||||
|
[mainWindow setTitle:(NSString *)[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleName"]];
|
||||||
[mainWindow makeKeyAndOrderFront:nil];
|
[mainWindow makeKeyAndOrderFront:nil];
|
||||||
[mainWindow makeMainWindow];
|
[mainWindow makeMainWindow];
|
||||||
|
|
||||||
|
|
|
@ -1286,6 +1286,16 @@
|
||||||
[[NSDocumentController sharedDocumentController] noteNewRecentDocumentURL:[theRom fileURL]];
|
[[NSDocumentController sharedDocumentController] noteNewRecentDocumentURL:[theRom fileURL]];
|
||||||
|
|
||||||
// Update the UI to indicate that a ROM has indeed been loaded.
|
// Update the UI to indicate that a ROM has indeed been loaded.
|
||||||
|
#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4
|
||||||
|
[window setRepresentedFilename:[[theRom fileURL] path]];
|
||||||
|
#else
|
||||||
|
[window setRepresentedURL:[theRom fileURL]];
|
||||||
|
#endif
|
||||||
|
[[window standardWindowButton:NSWindowDocumentIconButton] setImage:[theRom icon]];
|
||||||
|
|
||||||
|
NSString *newWindowTitle = [theRom internalName];
|
||||||
|
[window setTitle:newWindowTitle];
|
||||||
|
|
||||||
[dispViewDelegate setViewToWhite];
|
[dispViewDelegate setViewToWhite];
|
||||||
[self setStatus:NSSTRING_STATUS_ROM_LOADED];
|
[self setStatus:NSSTRING_STATUS_ROM_LOADED];
|
||||||
[bindings setValue:[NSNumber numberWithBool:NO] forKey:@"isWorking"];
|
[bindings setValue:[NSNumber numberWithBool:NO] forKey:@"isWorking"];
|
||||||
|
@ -1341,6 +1351,15 @@
|
||||||
[CocoaDSCheatManager setMasterCheatList:dummyCheatList];
|
[CocoaDSCheatManager setMasterCheatList:dummyCheatList];
|
||||||
|
|
||||||
// Update the UI to indicate that the ROM has finished unloading.
|
// Update the UI to indicate that the ROM has finished unloading.
|
||||||
|
#if MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4
|
||||||
|
[window setRepresentedFilename:nil];
|
||||||
|
#else
|
||||||
|
[window setRepresentedURL:nil];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
NSString *newWindowTitle = (NSString *)[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleName"];
|
||||||
|
[window setTitle:newWindowTitle];
|
||||||
|
|
||||||
[dispViewDelegate setViewToBlack];
|
[dispViewDelegate setViewToBlack];
|
||||||
[self setStatus:NSSTRING_STATUS_ROM_UNLOADED];
|
[self setStatus:NSSTRING_STATUS_ROM_UNLOADED];
|
||||||
[bindings setValue:[NSNumber numberWithBool:NO] forKey:@"isWorking"];
|
[bindings setValue:[NSNumber numberWithBool:NO] forKey:@"isWorking"];
|
||||||
|
|
Loading…
Reference in New Issue