diff --git a/ChangeLog b/ChangeLog index b66ce27..7cbbf6e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2021-05-13 Riccardo Mottola + + * Modules/Projects/Application/PCAppProject+Inspector.h + * Modules/Projects/Application/PCAppProject+Inspector.m + * Modules/Projects/Application/PCAppProject.m + * Modules/Projects/Application/Resources/Inspector.gorm + Fix HelpFile by saving the property in the app project and generating + the plist. + 2021-02-19 Riccardo Mottola * Modules/Editors/ProjectCenter/PCEditor.h diff --git a/Modules/Projects/Application/PCAppProject+Inspector.h b/Modules/Projects/Application/PCAppProject+Inspector.h index d18833e..6c89624 100644 --- a/Modules/Projects/Application/PCAppProject+Inspector.h +++ b/Modules/Projects/Application/PCAppProject+Inspector.h @@ -1,7 +1,7 @@ /* GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html - Copyright (C) 2001-2016 Free Software Foundation + Copyright (C) 2001-2021 Free Software Foundation Author: Serg Stoyan Riccardo Mottola @@ -46,6 +46,7 @@ - (BOOL)setAppIconWithFileAtPath:(NSString *)path; - (void)clearHelpFile:(id)sender; +- (IBAction)setHelpFile:(id)sender; - (void)clearMainNib:(id)sender; - (BOOL)setMainNibWithFileAtPath:(NSString *)path; diff --git a/Modules/Projects/Application/PCAppProject+Inspector.m b/Modules/Projects/Application/PCAppProject+Inspector.m index 9585b47..716e911 100644 --- a/Modules/Projects/Application/PCAppProject+Inspector.m +++ b/Modules/Projects/Application/PCAppProject+Inspector.m @@ -1,7 +1,7 @@ /* GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html - Copyright (C) 2001-2016 Free Software Foundation + Copyright (C) 2001-2021 Free Software Foundation Author: Serg Stoyan Riccardo Mottola @@ -220,6 +220,13 @@ cleanup(NSMutableDictionary *m, NSString *k) [self setProjectDictObject:@"" forKey:PCHelpFile notify:YES]; } +- (IBAction)setHelpFile:(id)sender +{ + [self setProjectDictObject:[helpFileField stringValue] + forKey:PCHelpFile + notify:YES]; +} + // Main Interface File - (void)clearMainNib: (id)sender { diff --git a/Modules/Projects/Application/PCAppProject.m b/Modules/Projects/Application/PCAppProject.m index 2ef9d47..cc8b57e 100644 --- a/Modules/Projects/Application/PCAppProject.m +++ b/Modules/Projects/Application/PCAppProject.m @@ -151,6 +151,7 @@ NSBundle *projBundle = [NSBundle bundleForClass:[self class]]; NSString *mainNibFile = nil; NSMutableArray *_array = nil; + NSString *helpFile = nil; NSAssert(path,@"No valid project path provided!"); @@ -250,6 +251,10 @@ if ([projectDict objectForKey:PCBundleIdentifier]) [infoDict setObject:[projectDict objectForKey:PCBundleIdentifier] forKey:@"CFBundleIdentifier"]; + // Help file if present + if ([projectDict objectForKey:PCHelpFile]) + [infoDict setObject:[projectDict objectForKey:@"GSHelpContentsFile"] forKey:@"GSHelpContentsFile"]; + // Write to ProjectNameInfo.plist _file = [NSString stringWithFormat:@"%@Info.plist",projectName]; _2file = [projectPath stringByAppendingPathComponent:_file]; @@ -440,6 +445,7 @@ [infoDict removeObjectForKey:@"NSMainNibFile"]; } [self writeInfoEntry:@"NSPrincipalClass" forKey:PCPrincipalClass]; + [self writeInfoEntry:@"GSHelpContentsFile" forKey:PCHelpFile]; [infoDict setObject:@"Application" forKey:@"NSRole"]; [self writeInfoEntry:@"NSTypes" forKey:PCDocumentTypes]; [self writeInfoEntry:@"URL" forKey:PCURL]; diff --git a/Modules/Projects/Application/Resources/Inspector.gorm/data.classes b/Modules/Projects/Application/Resources/Inspector.gorm/data.classes index a8faf4d..48766aa 100644 --- a/Modules/Projects/Application/Resources/Inspector.gorm/data.classes +++ b/Modules/Projects/Application/Resources/Inspector.gorm/data.classes @@ -8,7 +8,7 @@ "clearHelpFile:", "clearMainNib:", "docFieldSet:", - "newAction:", + "setHelpFile:", "removeDocType:", "setAppClass:", "setAppType:", @@ -31,7 +31,8 @@ "setDocBasedApp:", "showDocTypesPanel:", "addDocType:", - "removeDocType:" + "removeDocType:", + "setHelpFile:" ); Outlets = ( projectAttributesView, diff --git a/Modules/Projects/Application/Resources/Inspector.gorm/data.info b/Modules/Projects/Application/Resources/Inspector.gorm/data.info index 6eea44a..26bb98e 100644 Binary files a/Modules/Projects/Application/Resources/Inspector.gorm/data.info and b/Modules/Projects/Application/Resources/Inspector.gorm/data.info differ diff --git a/Modules/Projects/Application/Resources/Inspector.gorm/objects.gorm b/Modules/Projects/Application/Resources/Inspector.gorm/objects.gorm index 641c3f2..ef4a5a1 100644 Binary files a/Modules/Projects/Application/Resources/Inspector.gorm/objects.gorm and b/Modules/Projects/Application/Resources/Inspector.gorm/objects.gorm differ