mirror of
https://github.com/gnustep/apps-projectcenter.git
synced 2025-02-19 01:51:09 +00:00
fix in the bundle project related to the principal class.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@8587 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
6edda48f03
commit
240173b8d4
3 changed files with 13 additions and 3 deletions
|
@ -84,7 +84,8 @@ static PCBundleMakefileFactory *_factory = nil;
|
|||
if ((tmp = [prDict objectForKey:PCPrincipalClass]) &&
|
||||
[tmp isEqualToString:@""] == NO) {
|
||||
}
|
||||
else if ((tmp = [[prDict objectForKey:PCClasses] objectAtIndex:0])) {
|
||||
else if (([[prDict objectForKey:PCClasses] count])) {
|
||||
tmp = [[[prDict objectForKey:PCClasses] objectAtIndex:0] stringByDeletingPathExtension];
|
||||
}
|
||||
else {
|
||||
tmp = [NSString string];
|
||||
|
|
|
@ -212,7 +212,9 @@ static PCFileManager *_mgr = nil;
|
|||
NSString *title = nil;
|
||||
NSArray *types = nil;
|
||||
|
||||
if (delegate && [delegate respondsToSelector:@selector(fileManagerWillAddFiles:)]) {
|
||||
if (delegate &&
|
||||
[delegate respondsToSelector:@selector(fileManagerWillAddFiles:)]) {
|
||||
|
||||
if (!(project = [delegate fileManagerWillAddFiles:self])) {
|
||||
NSLog(@"No project to add files available...");
|
||||
return;
|
||||
|
@ -220,9 +222,14 @@ static PCFileManager *_mgr = nil;
|
|||
}
|
||||
|
||||
key = [project selectedRootCategory];
|
||||
|
||||
NSLog(@"Key: %@",key);
|
||||
|
||||
title = [[[project rootCategories] allKeysForObject:key] objectAtIndex:0];
|
||||
title = [NSString stringWithFormat:@"Add to %@...",title];
|
||||
|
||||
NSLog(@"Title is %@ (Key %@)",title,key);
|
||||
|
||||
types = [project fileExtensionsForCategory:key];
|
||||
|
||||
openPanel = [NSOpenPanel openPanel];
|
||||
|
|
|
@ -453,7 +453,9 @@
|
|||
|
||||
- (NSString *)selectedRootCategory
|
||||
{
|
||||
return [self projectKeyForKeyPath:[browserController pathOfSelectedFile]];
|
||||
NSString *_path = [browserController pathOfSelectedFile];
|
||||
|
||||
return [self projectKeyForKeyPath:_path];
|
||||
}
|
||||
|
||||
- (NSArray *)fileExtensionsForCategory:(NSString *)key
|
||||
|
|
Loading…
Reference in a new issue