mirror of
https://github.com/gnustep/apps-projectcenter.git
synced 2025-03-20 09:30:59 +00:00
some daily work...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@8079 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
7345f0a00d
commit
6b6d8aba72
12 changed files with 106 additions and 32 deletions
|
@ -68,4 +68,6 @@
|
|||
|
||||
- (BOOL)isExecutable;
|
||||
|
||||
- (void)updateValuesFromProjectDict;
|
||||
|
||||
@end
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
{
|
||||
NSTextField *textField;
|
||||
NSRect frame = {{84,120}, {80, 80}};
|
||||
NSBox *box;
|
||||
NSBox *_box;
|
||||
|
||||
[super _initUI];
|
||||
|
||||
|
@ -91,15 +91,15 @@
|
|||
[setAppIconButton setAction:@selector(setAppIcon:)];
|
||||
[projectProjectInspectorView addSubview:setAppIconButton];
|
||||
|
||||
box = [[NSBox alloc] init];
|
||||
[box setFrame:frame];
|
||||
[box setTitlePosition:NSNoTitle];
|
||||
//[box setBorderType:NSNoBorder];
|
||||
[projectProjectInspectorView addSubview:box];
|
||||
AUTORELEASE(box);
|
||||
_box = [[NSBox alloc] init];
|
||||
[_box setFrame:frame];
|
||||
[_box setTitlePosition:NSNoTitle];
|
||||
//[_box setBorderType:NSNoBorder];
|
||||
[projectProjectInspectorView addSubview:_box];
|
||||
AUTORELEASE(_box);
|
||||
|
||||
appIconView = [[NSImageView alloc] initWithFrame:frame];
|
||||
[box addSubview:appIconView];
|
||||
[_box addSubview:appIconView];
|
||||
}
|
||||
|
||||
@end
|
||||
|
@ -205,4 +205,12 @@
|
|||
return YES;
|
||||
}
|
||||
|
||||
- (void)updateValuesFromProjectDict
|
||||
{
|
||||
[super updateValuesFromProjectDict];
|
||||
|
||||
[appClassField setStringValue:[projectDict objectForKey:PCAppClass]];
|
||||
[appImageField setStringValue:[projectDict objectForKey:PCAppIcon]];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -62,5 +62,7 @@
|
|||
- (NSArray *)buildTargets;
|
||||
- (NSString *)projectDescription;
|
||||
|
||||
- (void)updateValuesFromProjectDict;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -160,4 +160,11 @@
|
|||
return @"GNUstep Objective-C bundle project";
|
||||
}
|
||||
|
||||
- (void)updateValuesFromProjectDict
|
||||
{
|
||||
[super updateValuesFromProjectDict];
|
||||
|
||||
[principalClassField setStringValue:[projectDict objectForKey:PCPrincipalClass]];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -59,9 +59,9 @@
|
|||
|
||||
typedef int PCProjInfoBits;
|
||||
|
||||
//===========================================================================================
|
||||
//=============================================================================
|
||||
// ==== Project keys
|
||||
//===========================================================================================
|
||||
//=============================================================================
|
||||
|
||||
static NSString * const PCClasses = @"CLASS_FILES";
|
||||
static NSString * const PCHeaders = @"HEADER_FILES";
|
||||
|
@ -78,6 +78,7 @@ static NSString * const PCProjectName = @"PROJECT_NAME";
|
|||
static NSString * const PCProjType = @"PROJECT_TYPE";
|
||||
static NSString * const PCPrincipalClass = @"PRINCIPAL_CLASS";
|
||||
static NSString * const PCAppIcon = @"APPLICATIONICON";
|
||||
static NSString * const PCAppClass = @"APPCLASS";
|
||||
static NSString * const PCToolIcon = @"TOOLICON";
|
||||
static NSString * const PCProjectBuilderClass = @"PROJECT_BUILDER";
|
||||
static NSString * const PCMainGModelFile = @"MAININTERFACE";
|
||||
|
@ -123,18 +124,18 @@ static NSString * const PCLibraryVar = @"LIBRARY_VAR";
|
|||
NSMutableDictionary *buildOptions;
|
||||
}
|
||||
|
||||
//===========================================================================================
|
||||
//=============================================================================
|
||||
// ==== Init and free
|
||||
//===========================================================================================
|
||||
//=============================================================================
|
||||
|
||||
- (id)init;
|
||||
- (id)initWithProjectDictionary:(NSDictionary *)dict path:(NSString *)path;
|
||||
|
||||
- (void)dealloc;
|
||||
|
||||
//===========================================================================================
|
||||
//=============================================================================
|
||||
// ==== Accessor methods
|
||||
//===========================================================================================
|
||||
//=============================================================================
|
||||
|
||||
- (id)browserController;
|
||||
- (NSString *)selectedRootCategory;
|
||||
|
@ -147,9 +148,9 @@ static NSString * const PCLibraryVar = @"LIBRARY_VAR";
|
|||
|
||||
- (Class)principalClass;
|
||||
|
||||
//===========================================================================================
|
||||
//=============================================================================
|
||||
// ==== Delegate and manager
|
||||
//===========================================================================================
|
||||
//=============================================================================
|
||||
|
||||
- (id)delegate;
|
||||
- (void)setDelegate:(id)aDelegate;
|
||||
|
@ -157,9 +158,9 @@ static NSString * const PCLibraryVar = @"LIBRARY_VAR";
|
|||
- (void)setProjectBuilder:(id<ProjectBuilder>)aBuilder;
|
||||
- (id<ProjectBuilder>)projectBuilder;
|
||||
|
||||
//===========================================================================================
|
||||
//=============================================================================
|
||||
// ==== To be overriden!
|
||||
//===========================================================================================
|
||||
//=============================================================================
|
||||
|
||||
- (BOOL)writeMakefile;
|
||||
// Writes the PC.project file to disc. Subclasses need to call this before doing sth else!
|
||||
|
@ -177,9 +178,9 @@ static NSString * const PCLibraryVar = @"LIBRARY_VAR";
|
|||
- (BOOL)isExecutable;
|
||||
// Returns NO by default.
|
||||
|
||||
//===========================================================================================
|
||||
// ==== Miscellaneous
|
||||
//===========================================================================================
|
||||
//=============================================================================
|
||||
// ==== File Handling
|
||||
//=============================================================================
|
||||
|
||||
- (void)browserDidSelectFileNamed:(NSString *)fileName;
|
||||
|
||||
|
@ -207,6 +208,10 @@ static NSString * const PCLibraryVar = @"LIBRARY_VAR";
|
|||
- (BOOL)saveAllFilesIfNeeded;
|
||||
// Saves all the files that need to be saved.
|
||||
|
||||
//=============================================================================
|
||||
// ==== Subprojects
|
||||
//=============================================================================
|
||||
|
||||
- (NSArray *)subprojects;
|
||||
- (void)addSubproject:(PCProject *)aSubproject;
|
||||
- (PCProject *)superProject;
|
||||
|
@ -216,6 +221,12 @@ static NSString * const PCLibraryVar = @"LIBRARY_VAR";
|
|||
|
||||
- (BOOL)isSubProject;
|
||||
|
||||
//=============================================================================
|
||||
// ==== Project Handling
|
||||
//=============================================================================
|
||||
|
||||
- (void)updateValuesFromProjectDict;
|
||||
|
||||
@end
|
||||
|
||||
@interface PCProject (ProjectBuilding)
|
||||
|
|
|
@ -308,6 +308,11 @@
|
|||
[ldOptField setStringValue:@""];
|
||||
[projectAttributeInspectorView addSubview:ldOptField];
|
||||
|
||||
/*
|
||||
* Project View
|
||||
*
|
||||
*/
|
||||
|
||||
projectProjectInspectorView = [[NSBox alloc] init];
|
||||
[projectProjectInspectorView setFrame:NSMakeRect(-2,-2,284,334)];
|
||||
[projectProjectInspectorView setTitlePosition:NSNoTitle];
|
||||
|
@ -323,7 +328,7 @@
|
|||
[textField setStringValue:@"Type:"];
|
||||
[projectProjectInspectorView addSubview:[textField autorelease]];
|
||||
|
||||
projectTypeField =[[NSTextField alloc] initWithFrame:NSMakeRect(84,280,176,21)];
|
||||
projectTypeField = [[NSTextField alloc] initWithFrame:NSMakeRect(84,280,176,21)];
|
||||
[projectTypeField setAlignment: NSLeftTextAlignment];
|
||||
[projectTypeField setBordered: NO];
|
||||
[projectTypeField setEditable: NO];
|
||||
|
@ -571,9 +576,9 @@
|
|||
return NO;
|
||||
}
|
||||
|
||||
//===========================================================================================
|
||||
// ==== Miscellaneous
|
||||
//===========================================================================================
|
||||
//=============================================================================
|
||||
// ==== File Handling
|
||||
//=============================================================================
|
||||
|
||||
- (void)browserDidSelectFileNamed:(NSString *)fileName
|
||||
{
|
||||
|
@ -608,7 +613,9 @@
|
|||
return;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
NSLog(@"<%@ %x>: adding file %@ for key %@",[self class],self,newFile,type);
|
||||
#endif DEBUG
|
||||
|
||||
// Add the new file
|
||||
[files addObject:newFile];
|
||||
|
@ -707,11 +714,11 @@
|
|||
projectDict = [[NSMutableDictionary alloc] initWithDictionary:aDict];
|
||||
|
||||
[self setProjectName:[projectDict objectForKey:PCProjectName]];
|
||||
|
||||
[projectWindow setTitle:[NSString stringWithFormat:@"%@ - %@",projectName,projectPath]];
|
||||
|
||||
// Update the GNUmakefile!
|
||||
// Update the GNUmakefile and the interface
|
||||
[self writeMakefile];
|
||||
[self updateValuesFromProjectDict];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:@"ProjectDictDidChangeNotification" object:self];
|
||||
|
||||
|
@ -759,6 +766,10 @@
|
|||
{
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
// ==== Subprojects
|
||||
//=============================================================================
|
||||
|
||||
- (NSArray *)subprojects
|
||||
{
|
||||
return [projectDict objectForKey:PCSubprojects];
|
||||
|
@ -788,6 +799,16 @@
|
|||
|
||||
- (BOOL)isSubProject
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
// ==== Project Handling
|
||||
//=============================================================================
|
||||
|
||||
- (void)updateValuesFromProjectDict
|
||||
{
|
||||
[projectTypeField setStringValue:[projectDict objectForKey:PCProjType]];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -430,7 +430,10 @@ NSString *ActiveProjectDidChangeNotification = @"ActiveProjectDidChange";
|
|||
|
||||
- (void)fileManager:(id)sender didCreateFile:(NSString *)aFile withKey:(NSString *)key
|
||||
{
|
||||
#ifdef DEBUG
|
||||
NSLog(@"<%@ %x>: did create file %@ for key %@",[self class],self,aFile,key);
|
||||
#endif DEBUG
|
||||
|
||||
[activeProject addFile:aFile forKey:key];
|
||||
}
|
||||
|
||||
|
@ -443,7 +446,9 @@ NSString *ActiveProjectDidChangeNotification = @"ActiveProjectDidChange";
|
|||
{
|
||||
NSMutableString *fn = [NSMutableString stringWithString:[file lastPathComponent]];
|
||||
|
||||
#ifdef DEBUG
|
||||
NSLog(@"<%@ %x>: should add file %@ for key %@",[self class],self,file,key);
|
||||
#endif DEBUG
|
||||
|
||||
if ([key isEqualToString:PCLibraries]) {
|
||||
[fn deleteCharactersInRange:NSMakeRange(1,3)];
|
||||
|
@ -459,7 +464,10 @@ NSString *ActiveProjectDidChangeNotification = @"ActiveProjectDidChange";
|
|||
|
||||
- (void)fileManager:(id)sender didAddFile:(NSString *)file forKey:(NSString *)key
|
||||
{
|
||||
#ifdef DEBUG
|
||||
NSLog(@"<%@ %x>: did add file %@ for key %@",[self class],self,file,key);
|
||||
#endif DEBUG
|
||||
|
||||
[activeProject addFile:file forKey:key];
|
||||
}
|
||||
|
||||
|
|
|
@ -37,8 +37,6 @@
|
|||
|
||||
@interface PCLibProject : PCProject
|
||||
{
|
||||
@private
|
||||
BOOL _needsAdditionalReleasing;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
@ -62,4 +60,6 @@
|
|||
- (NSArray *)buildTargets;
|
||||
- (NSString *)projectDescription;
|
||||
|
||||
- (void)updateValuesFromProjectDict;
|
||||
|
||||
@end
|
||||
|
|
|
@ -138,4 +138,11 @@
|
|||
return @"Project that handles GNUstep/ObjC based libraries.";
|
||||
}
|
||||
|
||||
- (void)updateValuesFromProjectDict
|
||||
{
|
||||
[super updateValuesFromProjectDict];
|
||||
|
||||
//[appClassField setStringValue:[projectDict objectForKey:PCAppClass]];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -38,8 +38,6 @@
|
|||
|
||||
@interface PCToolProject : PCProject
|
||||
{
|
||||
@private
|
||||
BOOL _needsAdditionalReleasing;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
@ -65,5 +63,7 @@
|
|||
|
||||
- (BOOL)isExecutable;
|
||||
|
||||
- (void)updateValuesFromProjectDict;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -144,4 +144,11 @@
|
|||
return YES;
|
||||
}
|
||||
|
||||
- (void)updateValuesFromProjectDict
|
||||
{
|
||||
[super updateValuesFromProjectDict];
|
||||
|
||||
//[appClassField setStringValue:[projectDict objectForKey:PCAppClass]];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -58,11 +58,12 @@
|
|||
prefWindow = [[NSWindow alloc] initWithContentRect:_w_frame
|
||||
styleMask:style
|
||||
backing:NSBackingStoreBuffered
|
||||
defer:NO];
|
||||
defer:YES];
|
||||
[prefWindow setMinSize:NSMakeSize(268,365)];
|
||||
[prefWindow setTitle:@"Preferences"];
|
||||
[prefWindow setDelegate:self];
|
||||
[prefWindow setReleasedWhenClosed:NO];
|
||||
[prefWindow center];
|
||||
[prefWindow setFrameAutosaveName:@"Preferences"];
|
||||
_c_view = [prefWindow contentView];
|
||||
|
||||
|
|
Loading…
Reference in a new issue