mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-02-23 19:51:00 +00:00
Corrects problem with actions/palette classes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@21172 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e203f18136
commit
fbb9934b20
1 changed files with 30 additions and 19 deletions
|
@ -115,30 +115,41 @@
|
|||
NSDictionary *importedClasses = [palettesManager importedClasses];
|
||||
NSEnumerator *en = [importedClasses objectEnumerator];
|
||||
NSDictionary *description = nil;
|
||||
|
||||
|
||||
// load the classes, initialize the custom class array and map..
|
||||
[self loadFromFile: path];
|
||||
customClasses = [[NSMutableArray alloc] initWithCapacity: 1];
|
||||
customClassMap = [[NSMutableDictionary alloc] initWithCapacity: 10];
|
||||
categoryClasses = [[NSMutableArray alloc] initWithCapacity: 1];
|
||||
|
||||
// add the imported classes to the class information list...
|
||||
[classInformation addEntriesFromDictionary: importedClasses];
|
||||
|
||||
// add all of the actions to the FirstResponder
|
||||
while((description = [en nextObject]) != nil)
|
||||
if([self loadFromFile: path])
|
||||
{
|
||||
NSArray *actions = [description objectForKey: @"Actions"];
|
||||
NSEnumerator *aen = [actions objectEnumerator];
|
||||
NSString *actionName = nil;
|
||||
NSMutableDictionary *classDict = [classInformation objectForKey: @"FirstResponder"];
|
||||
NSMutableArray *firstResponderActions = [classDict objectForKey: @"Actions"];
|
||||
NSMutableArray *firstResponderAllActions = [classDict objectForKey: @"AllActions"];
|
||||
|
||||
// add the actions to the first responder...
|
||||
while((actionName = [aen nextObject]) != nil)
|
||||
customClasses = [[NSMutableArray alloc] initWithCapacity: 1];
|
||||
customClassMap = [[NSMutableDictionary alloc] initWithCapacity: 10];
|
||||
categoryClasses = [[NSMutableArray alloc] initWithCapacity: 1];
|
||||
|
||||
// add the imported classes to the class information list...
|
||||
[classInformation addEntriesFromDictionary: importedClasses];
|
||||
|
||||
// add all of the actions to the FirstResponder
|
||||
while((description = [en nextObject]) != nil)
|
||||
{
|
||||
[self addAction: actionName forClassNamed: @"FirstResponder"];
|
||||
NSArray *actions = [description objectForKey: @"Actions"];
|
||||
NSEnumerator *aen = [actions objectEnumerator];
|
||||
NSString *actionName = nil;
|
||||
|
||||
// add the actions to the first responder...
|
||||
while((actionName = [aen nextObject]) != nil)
|
||||
{
|
||||
if(![firstResponderActions containsObject: actionName])
|
||||
{
|
||||
[firstResponderActions addObject: [actionName copy]];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// incorporate the added actions into the list and sort.
|
||||
[self allActionsForClassNamed: @"FirstResponder"];
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -705,7 +716,7 @@
|
|||
NSArray *extraActions = [info objectForKey: @"ExtraActions"];
|
||||
NSArray *superActions;
|
||||
|
||||
if (superName == nil)
|
||||
if (superName == nil || [className isEqual: @"FirstResponder"])
|
||||
{
|
||||
superActions = nil;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue