mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-02-24 12:01:16 +00:00
More fixes for repair mode.
This commit is contained in:
parent
7b02f0b67b
commit
03c6009a4f
1 changed files with 33 additions and 5 deletions
|
@ -153,13 +153,14 @@
|
||||||
*/
|
*/
|
||||||
if ([obj isKindOfClass: [NSWindow class]])
|
if ([obj isKindOfClass: [NSWindow class]])
|
||||||
{
|
{
|
||||||
|
NSWindow *w = (NSWindow *)obj;
|
||||||
NSArray *allViews = allSubviews([obj contentView]);
|
NSArray *allViews = allSubviews([obj contentView]);
|
||||||
NSEnumerator *ven = [allViews objectEnumerator];
|
NSEnumerator *ven = [allViews objectEnumerator];
|
||||||
id v = nil;
|
id v = nil;
|
||||||
|
|
||||||
if ([obj windowLevel] != NSNormalWindowLevel)
|
if ([w windowLevel] != NSNormalWindowLevel)
|
||||||
{
|
{
|
||||||
[obj setLevel: NSNormalWindowLevel];
|
[w setLevel: NSNormalWindowLevel];
|
||||||
[_repairLog addObject:
|
[_repairLog addObject:
|
||||||
[NSString stringWithFormat:
|
[NSString stringWithFormat:
|
||||||
@"ERROR ==> Found window %@ with an invalid level, correcting.\n",
|
@"ERROR ==> Found window %@ with an invalid level, correcting.\n",
|
||||||
|
@ -172,6 +173,7 @@
|
||||||
NSString *name = nil;
|
NSString *name = nil;
|
||||||
id target = nil;
|
id target = nil;
|
||||||
SEL action = NULL;
|
SEL action = NULL;
|
||||||
|
BOOL isAction = NO;
|
||||||
|
|
||||||
// Delete old target action settings if they are directly encoded.
|
// Delete old target action settings if they are directly encoded.
|
||||||
if ([v respondsToSelector: @selector(setTarget:)])
|
if ([v respondsToSelector: @selector(setTarget:)])
|
||||||
|
@ -183,6 +185,8 @@
|
||||||
target, v]];
|
target, v]];
|
||||||
errorCount++;
|
errorCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// delete action...
|
||||||
if ([v respondsToSelector: @selector(setAction:)])
|
if ([v respondsToSelector: @selector(setAction:)])
|
||||||
{
|
{
|
||||||
action = [v action];
|
action = [v action];
|
||||||
|
@ -194,15 +198,39 @@
|
||||||
errorCount++;
|
errorCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (action != NULL && target != nil)
|
NSString *actionName = NSStringFromSelector(action);
|
||||||
|
isAction = [actionName containsString: @":"];
|
||||||
|
|
||||||
|
// create control connector...
|
||||||
|
if (action != NULL && target != nil && isAction)
|
||||||
{
|
{
|
||||||
NSNibControlConnector *con = [[NSNibControlConnector alloc] init];
|
NSNibControlConnector *con = [[NSNibControlConnector alloc] init];
|
||||||
[con setDestination: v];
|
[con setDestination: v];
|
||||||
[con setLabel: NSStringFromSelector(action)];
|
[con setLabel: actionName];
|
||||||
[document addConnector: con];
|
[document addConnector: con];
|
||||||
[document touch];
|
[document touch];
|
||||||
|
|
||||||
|
[_repairLog addObject: [NSString stringWithFormat:
|
||||||
|
@"FIX: Creating outlet connection for %@ on %@.\n",
|
||||||
|
NSStringFromSelector(action),
|
||||||
|
v]];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// create outlet connector...
|
||||||
|
if (action != NULL && target != nil && !isAction)
|
||||||
|
{
|
||||||
|
NSString *actionName = NSStringFromSelector(action);
|
||||||
|
NSNibOutletConnector *con = [[NSNibOutletConnector alloc] init];
|
||||||
|
[con setDestination: v];
|
||||||
|
[con setLabel: actionName];
|
||||||
|
[document addConnector: con];
|
||||||
|
[document touch];
|
||||||
|
|
||||||
|
[_repairLog addObject: [NSString stringWithFormat:
|
||||||
|
@"FIX: Creating control connection for %@ on %@.\n",
|
||||||
|
NSStringFromSelector(action),
|
||||||
|
v]];
|
||||||
|
}
|
||||||
// skip these...
|
// skip these...
|
||||||
if ([v isKindOfClass: [NSMatrix class]])
|
if ([v isKindOfClass: [NSMatrix class]])
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue