diff --git a/ChangeLog b/ChangeLog index fb395a7..7f6da15 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2015-11-05 Riccardo Mottola + + * Modules/Projects/Application/PCAppProject+Inspector.h + * Modules/Projects/Application/PCAppProject+Inspector.m + * Headers/ProjectCenter/PCDefines.h + * Modules/Projects/Application/PCAppProject.h + * Modules/Projects/Application/PCAppProject.m + * Modules/Projects/Application/Resources/Inspector.gorm + CFBundleIdentifier support for Apps. + 2015-11-02 Riccardo Mottola * Modules/Editors/ProjectCenter/PCEditorView.m diff --git a/Headers/ProjectCenter/PCDefines.h b/Headers/ProjectCenter/PCDefines.h index e2d6c14..3abde90 100644 --- a/Headers/ProjectCenter/PCDefines.h +++ b/Headers/ProjectCenter/PCDefines.h @@ -147,6 +147,7 @@ static NSString * const PCLinkerOptions = @"LINKEROPTIONS"; static NSString * const PCObjCCompilerOptions = @"OBJC_COMPILEROPTIONS"; static NSString * const PCPrincipalClass = @"PRINCIPAL_CLASS"; static NSString * const PCAuthors = @"PROJECT_AUTHORS"; +static NSString * const PCBundleIdentifier = @"BUNDLE_IDENTIFIER"; static NSString * const PCCopyright = @"PROJECT_COPYRIGHT"; static NSString * const PCCopyrightDescription = @"PROJECT_COPYRIGHT_DESC"; static NSString * const PCProjectCreator = @"PROJECT_CREATOR"; diff --git a/Modules/Projects/Application/PCAppProject+Inspector.h b/Modules/Projects/Application/PCAppProject+Inspector.h index c9f1ff5..6235cf4 100644 --- a/Modules/Projects/Application/PCAppProject+Inspector.h +++ b/Modules/Projects/Application/PCAppProject+Inspector.h @@ -1,9 +1,10 @@ /* GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html - Copyright (C) 2001 Free Software Foundation + Copyright (C) 2001-2015 Free Software Foundation Author: Serg Stoyan + Riccardo Mottola This file is part of GNUstep. @@ -37,8 +38,9 @@ // ---------------------------------------------------------------------------- // --- Actions // ---------------------------------------------------------------------------- -- (void)setAppType:(id)sender; -- (void)setAppClass:(id)sender; +- (IBAction)setAppType:(id)sender; +- (IBAction)setAppClass:(id)sender; +- (IBAction)setBundleIdentifier:(id)sender; - (void)clearAppIcon:(id)sender; - (BOOL)setAppIconWithFileAtPath:(NSString *)path; diff --git a/Modules/Projects/Application/PCAppProject+Inspector.m b/Modules/Projects/Application/PCAppProject+Inspector.m index afff73f..648aa96 100644 --- a/Modules/Projects/Application/PCAppProject+Inspector.m +++ b/Modules/Projects/Application/PCAppProject+Inspector.m @@ -94,7 +94,7 @@ cleanup(NSMutableDictionary *m, NSString *k) // Help text view [helpText setDrawsBackground:NO]; [helpText setTextColor:[NSColor darkGrayColor]]; - [helpText setFont:[NSFont systemFontOfSize:11.0]]; + [helpText setFont:[NSFont systemFontOfSize:10.0]]; [helpText setText:@"Click on the field and drop file in the box above"]; // Document types buttons @@ -133,7 +133,7 @@ cleanup(NSMutableDictionary *m, NSString *k) // --- Actions // ---------------------------------------------------------------------------- -- (void)setAppType:(id)sender +- (IBAction)setAppType:(id)sender { NSString *appType = [appTypeField stringValue]; NSMutableArray *libs = [[projectDict objectForKey:PCLibraries] mutableCopy]; @@ -152,13 +152,20 @@ cleanup(NSMutableDictionary *m, NSString *k) [self setProjectDictObject:appType forKey:PCAppType notify:YES]; } -- (void)setAppClass:(id)sender +- (IBAction)setAppClass:(id)sender { [self setProjectDictObject:[appClassField stringValue] forKey:PCPrincipalClass notify:YES]; } +- (IBAction)setBundleIdentifier:(id)sender +{ + [self setProjectDictObject:[bundleIdentifierField stringValue] + forKey:PCBundleIdentifier + notify:YES]; +} + // Application Icon - (void)clearAppIcon:(id)sender { @@ -556,6 +563,7 @@ cleanup(NSMutableDictionary *m, NSString *k) // Project Attributes view [appTypeField selectItemWithTitle:[projectDict objectForKey:PCAppType]]; [appClassField setStringValue:[projectDict objectForKey: PCPrincipalClass]]; + [bundleIdentifierField setStringValue:[projectDict objectForKey: PCBundleIdentifier]]; [appImageField setStringValue:[projectDict objectForKey:PCAppIcon]]; [helpFileField setStringValue:[projectDict objectForKey:PCHelpFile]]; diff --git a/Modules/Projects/Application/PCAppProject.h b/Modules/Projects/Application/PCAppProject.h index 4b28eb7..81e7616 100644 --- a/Modules/Projects/Application/PCAppProject.h +++ b/Modules/Projects/Application/PCAppProject.h @@ -1,10 +1,11 @@ /* GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html - Copyright (C) 2001-2004 Free Software Foundation + Copyright (C) 2001-2015 Free Software Foundation Authors: Philippe C.D. Robert Serg Stoyan + Riccardo Mottola Description: This is the project type 'Application' for GNUstep. You never should create it yourself but use PCAppProj for doing this. @@ -54,6 +55,7 @@ IBOutlet PCAppTextField *appImageField; IBOutlet PCAppTextField *helpFileField; IBOutlet PCAppTextField *mainNIBField; + IBOutlet NSTextField *bundleIdentifierField; IBOutlet NSTextView *helpText; IBOutlet PCFileNameIcon *iconView; diff --git a/Modules/Projects/Application/PCAppProject.m b/Modules/Projects/Application/PCAppProject.m index ce78d87..da2a589 100644 --- a/Modules/Projects/Application/PCAppProject.m +++ b/Modules/Projects/Application/PCAppProject.m @@ -1,7 +1,7 @@ /* GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html - Copyright (C) 2001-2012 Free Software Foundation + Copyright (C) 2001-2015 Free Software Foundation Authors: Philippe C.D. Robert Serg Stoyan @@ -228,7 +228,7 @@ [projectDict setObject:[NSArray arrayWithObjects:[mainNibFile lastPathComponent], @"Main.gsmarkup", @"MainMenu-GNUstep.gsmarkup", @"MainMenu-OSX.gsmarkup", nil] forKey:PCInterfaces]; - // Info-gnutstep.plist + // Info-gnustep.plist _file = [projBundle pathForResource:@"Info" ofType:@"gnustep"]; infoDict = [[NSMutableDictionary alloc] initWithContentsOfFile:_file]; [infoDict setObject:projectName forKey:@"ApplicationName"]; @@ -237,6 +237,7 @@ forKey:@"NSMainNibFile"]; [infoDict setObject:[projectDict objectForKey:PCPrincipalClass] forKey:@"NSPrincipalClass"]; + [infoDict setObject:[projectDict objectForKey:PCBundleIdentifier] forKey:@"CFBundleIdentifier"]; // Write to ProjectNameInfo.plist _file = [NSString stringWithFormat:@"%@Info.plist",projectName]; @@ -410,6 +411,7 @@ [self writeInfoEntry:@"ApplicationIcon" forKey:PCAppIcon]; [self writeInfoEntry:@"ApplicationName" forKey:PCProjectName]; [self writeInfoEntry:@"ApplicationRelease" forKey:PCRelease]; + [self writeInfoEntry:@"CFBundleIdentifier" forKey:PCBundleIdentifier]; [self writeInfoEntry:@"Authors" forKey:PCAuthors]; [self writeInfoEntry:@"Copyright" forKey:PCCopyright]; [self writeInfoEntry:@"CopyrightDescription" forKey:PCCopyrightDescription]; diff --git a/Modules/Projects/Application/Resources/Inspector.gorm/data.classes b/Modules/Projects/Application/Resources/Inspector.gorm/data.classes index 03cc3fe..9d1dd8c 100644 --- a/Modules/Projects/Application/Resources/Inspector.gorm/data.classes +++ b/Modules/Projects/Application/Resources/Inspector.gorm/data.classes @@ -2,11 +2,15 @@ "## Comment" = "Do NOT change this file, Gorm maintains it"; FirstResponder = { Actions = ( + "clearAppIcon:", "clearFile:", + "clearHelpFile:", + "clearMainNib:", "docFieldSet:", - "setAppType:", "removeDocType:", "setAppClass:", + "setAppType:", + "setBundleIdentifier:", "setDocBasedApp:", "setDocIcon:", "setFile:", @@ -16,31 +20,30 @@ }; PCAppProject = { Actions = ( + "clearAppIcon:", + "clearHelpFile:", + "clearMainNib:", "setAppClass:", - "setFile:", - "clearFile:", - "addDocType:", - "removeDocType:", - "setCurrentLanguage:", - "showDocTypesPanel:", - "setDocBasedApp:", - "docFieldSet:", - "setAppType:" + "setAppType:", + "setBundleIdentifier:", + "setDocBasedApp:" ); Outlets = ( projectAttributesView, + appTypeField, appClassField, - iconView, - setFieldButton, - clearFieldButton, appImageField, helpFileField, mainNIBField, + bundleIdentifierField, + helpText, + iconView, docTypesButton, docTypesPanel, addDocTypeButton, removeDocTypeButton, docBasedAppButton, + docTypesScroll, docTypeLabel, docTypeField, docNameLabel, @@ -52,18 +55,9 @@ docRoleLabel, docRoleField, docClassLabel, - docClassField, - docTypesList, - typeColumn, - nameColumn, - extensionsColumn, - iconColumn, - roleColumn, - classColumn, - appTypeField, - helpText + docClassField ); - Super = NSObject; + Super = PCProject; }; PCAppTextField = { Actions = ( @@ -79,4 +73,11 @@ ); Super = NSImageView; }; + PCProject = { + Actions = ( + ); + Outlets = ( + ); + Super = NSObject; + }; } \ No newline at end of file diff --git a/Modules/Projects/Application/Resources/Inspector.gorm/data.info b/Modules/Projects/Application/Resources/Inspector.gorm/data.info index 6361435..c3f8dd5 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 fdb0a68..8970bae 100644 Binary files a/Modules/Projects/Application/Resources/Inspector.gorm/objects.gorm and b/Modules/Projects/Application/Resources/Inspector.gorm/objects.gorm differ