This commit is contained in:
rfm 2024-06-03 16:55:33 +01:00
parent 51ed6a9608
commit d312fbe168
2 changed files with 29 additions and 24 deletions

View file

@ -650,7 +650,6 @@ static Class imageClass;
NSString *action;
NSString *key;
BOOL isSeparator = NO;
NSNumber *keyMask;
if ([aDecoder containsValueForKey: @"NSIsSeparator"])
{
@ -703,13 +702,13 @@ static Class imageClass;
[self setSubmenu: submenu];
}
// Set the key mask when it is present; or default to NSCommandKeyMask
// when not specified
keyMask = (NSNumber*)[aDecoder decodeObjectForKey: @"NSKeyEquivModMask"];
if (keyMask != nil)
{
[self setKeyEquivalentModifierMask: [keyMask intValue]];
/* Set the key mask when it is present; or default to NSCommandKeyMask
* when not specified
*/
if ([aDecoder containsValueForKey: @"NSKeyEquivModMask"])
{
[self setKeyEquivalentModifierMask:
[aDecoder decodeIntegerForKey: @"NSKeyEquivModMask"]];
}
else
{

View file

@ -16,24 +16,27 @@
int main()
{
NSAutoreleasePool *arp = [NSAutoreleasePool new];
NSArray **testObjects;
BOOL success = NO;
NSFileManager *mgr = [NSFileManager defaultManager];
NSString *path = [mgr currentDirectoryPath];
NSBundle *bundle = [[NSBundle alloc] initWithPath: path];
NSAutoreleasePool *arp = [NSAutoreleasePool new];
NSArray **testObjects = NULL;
BOOL success = NO;
NSFileManager *mgr = [NSFileManager defaultManager];
NSString *path = [mgr currentDirectoryPath];
NSBundle *bundle = [[NSBundle alloc] initWithPath: path];
START_SET("NSNibLoading GNUstep basic")
NS_DURING
{
[NSApplication sharedApplication];
}
{
[NSApplication sharedApplication];
}
NS_HANDLER
{
if ([[localException name] isEqualToString: NSInternalInconsistencyException ])
SKIP("It looks like GNUstep backend is not yet installed")
}
{
if ([[localException name]
isEqualToString: NSInternalInconsistencyException])
{
SKIP("It looks like GNUstep backend is not yet installed")
}
}
NS_ENDHANDLER
if ([[path lastPathComponent] isEqualToString: @"obj"])
@ -49,19 +52,22 @@ int main()
owner: [NSApplication sharedApplication]
topLevelObjects: testObjects];
PASS(success == YES, ".gorm file was loaded properly using loadNibNamed:owner:topLevelObjects:");
PASS(success == YES, ".gorm file was loaded properly"
" using loadNibNamed:owner:topLevelObjects:");
success = [bundle loadNibNamed: @"Test-xib"
owner: [NSApplication sharedApplication]
topLevelObjects: testObjects];
PASS(success == YES, ".xib file was loaded properly using loadNibNamed:owner:topLevelObjects:");
PASS(success == YES, ".xib file was loaded properly"
" using loadNibNamed:owner:topLevelObjects:");
success = [bundle loadNibNamed: @"Test-nib"
owner: [NSApplication sharedApplication]
topLevelObjects: testObjects];
PASS(success == YES, ".nib file was loaded properly using loadNibNamed:owner:topLevelObjects:");
PASS(success == YES, ".nib file was loaded properly"
" using loadNibNamed:owner:topLevelObjects:");
}
NS_HANDLER
{