mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-02-23 11:41:05 +00:00
Update to handle GormNSPanel which overrides panel when in the app
This commit is contained in:
parent
dc69034c54
commit
13507ab8d7
1 changed files with 28 additions and 3 deletions
|
@ -69,6 +69,25 @@ static NSDictionary *_valueMapping = nil;
|
|||
|
||||
static NSUInteger _count = INT_MAX;
|
||||
|
||||
/*
|
||||
NSString* XIBStringFromClass(Class cls)
|
||||
{
|
||||
NSString *className = NSStringFromClass(cls);
|
||||
|
||||
if (className != nil)
|
||||
{
|
||||
NSString *newClassName = [_mappedClassNames objectForKey: className];
|
||||
|
||||
if (newClassName != nil)
|
||||
{
|
||||
className = newClassName;
|
||||
}
|
||||
}
|
||||
|
||||
return className;
|
||||
}
|
||||
*/
|
||||
|
||||
@interface NSButtonCell (_Private_)
|
||||
|
||||
- (NSButtonType) buttonType;
|
||||
|
@ -496,12 +515,12 @@ static NSUInteger _count = INT_MAX;
|
|||
{
|
||||
NSString *className = name;
|
||||
|
||||
NSLog(@"Name = %@", name);
|
||||
// NSLog(@"Name = %@", name);
|
||||
|
||||
if ([_mappedClassNames objectForKey: name])
|
||||
{
|
||||
className = [_mappedClassNames objectForKey: name];
|
||||
NSLog(@"%@ => %@", name, className);
|
||||
// NSLog(@"%@ => %@", name, className);
|
||||
}
|
||||
|
||||
NSString *result = [className stringByReplacingOccurrencesOfString: @"NS"
|
||||
|
@ -522,7 +541,7 @@ static NSUInteger _count = INT_MAX;
|
|||
result = @"customObject";
|
||||
}
|
||||
|
||||
NSLog(@"Result = %@", result);
|
||||
// NSLog(@"Result = %@", result);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -1732,6 +1751,12 @@ static NSUInteger _count = INT_MAX;
|
|||
if ([obj isKindOfClass: [NSPanel class]])
|
||||
{
|
||||
NSString *className = NSStringFromClass([obj class]);
|
||||
|
||||
if ([className isEqualToString: @"GormNSPanel"])
|
||||
{
|
||||
className = @"NSPanel";
|
||||
}
|
||||
|
||||
NSXMLNode *attr = [NSXMLNode attributeWithName: @"customClass" stringValue: className];
|
||||
[elem addAttribute: attr];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue