*** empty log message ***

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@17086 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Sergii Stoian 2003-07-02 11:32:45 +00:00
parent 66c2ac76eb
commit 41abbd7e65
15 changed files with 346 additions and 259 deletions

View file

@ -1,3 +1,37 @@
2003-07-02 Serg Stoyan <stoyan@hologr.com>
* PCAppProj/PCAppProj.m:
* PCBundleProj/PCBundleProj.m:
* PCGormProj/PCGormProj.m:
* PCLibProj/PCLibProj.m:
* PCRenaissanceProj/PCRenaissanceProj.m:
* PCToolProj/PCToolProj.m:
Set project type field to class description both in GNUstep and
non-GNUstep environment. Fixes bug #3393.
* PCAppProj/PCAppProject.m:
(_initUI): Rearrangements of controls. Release control after adding
to superview.
* PCLib/PCFileManager.m:
(showAddFileWindow): Handling of image, docs, models and non project
files added. Now images go into Images subdir, docs into Documentation,
.gorm files into $LANGUAGE.lproj subdir.
* PCLib/PCProject+UInterface.m:
(_initUI): Files' history list enabled back. Adjust size of history
list. Added some fileds, controls rearranged in Project Inspector.
* PCLib/PCProject.h: Added definition of new Inspector fields.
* PCLib/PCProject.m: (updateValuesFromProjectDict): Set project's
language.
* PCLib/PCProjectBuilder.m: Stability improved via cleanup in build
task handling.
(topButtonPressed:): Removed.
* PCLib/PCProjectManager+UInterface.m: ProjectInspector content view
resized. Changed title from "Inspector" to "Project Inspector".
2003-06-20 Serg Stoyan <stoyan@hologr.com>
* Images/ButtonTile.tiff: Added.

View file

@ -92,11 +92,7 @@ static PCAppProj *_creator = nil;
// Customise the project
[dict setObject:[path lastPathComponent] forKey:PCProjectName];
#ifndef GNUSTEP_BASE_VERSION
[dict setObject:[[project principalClass] description] forKey:PCProjType];
#else
[dict setObject:[project principalClass] forKey:PCProjType];
#endif
// Create the AppNameInfo.plist
infoDict = [NSDictionary dictionaryWithObjectsAndKeys:

View file

@ -41,22 +41,24 @@
- (void)_initUI
{
NSTextField *textField;
NSRect frame = {{84,120}, {80, 80}};
NSBox *_box;
NSRect frame;
NSBox *_iconViewBox;
NSBox *_appIconBox;
[super _initUI];
textField =[[NSTextField alloc] initWithFrame:NSMakeRect(16,256,64,21)];
// Application Class
textField = [[NSTextField alloc] initWithFrame:NSMakeRect(4,248,104,21)];
[textField setAlignment: NSRightTextAlignment];
[textField setBordered: NO];
[textField setEditable: NO];
[textField setBezeled: NO];
[textField setDrawsBackground: NO];
[textField setStringValue:@"App class:"];
[textField setStringValue:@"Application Class:"];
[projectProjectInspectorView addSubview:textField];
RELEASE(textField);
appClassField =[[NSTextField alloc] initWithFrame:NSMakeRect(84,256,176,21)];
appClassField = [[NSTextField alloc] initWithFrame:NSMakeRect(111,248,165,21)];
[appClassField setAlignment: NSLeftTextAlignment];
[appClassField setBordered: YES];
[appClassField setEditable: YES];
@ -66,50 +68,50 @@
[appClassField setTarget:self];
[appClassField setAction:@selector(setAppClass:)];
[projectProjectInspectorView addSubview:appClassField];
RELEASE(appClassField);
textField =[[NSTextField alloc] initWithFrame:NSMakeRect(16,204,64,21)];
[textField setAlignment: NSRightTextAlignment];
[textField setBordered: NO];
[textField setEditable: NO];
[textField setBezeled: NO];
[textField setDrawsBackground: NO];
[textField setStringValue:@"App icon:"];
[projectProjectInspectorView addSubview:textField];
RELEASE(textField);
appImageField =[[NSTextField alloc] initWithFrame:NSMakeRect(84,204,176,21)];
// Application Icon
_appIconBox = [[NSBox alloc] init];
[_appIconBox setFrame:NSMakeRect(6,154,270,84)];
[_appIconBox setContentViewMargins:NSMakeSize(4.0, 6.0)];
[_appIconBox setTitle:@"Application Icon"];
[projectProjectInspectorView addSubview:_appIconBox];
RELEASE(_appIconBox);
appImageField = [[NSTextField alloc] initWithFrame:NSMakeRect(0,34,195,21)];
[appImageField setAlignment: NSLeftTextAlignment];
[appImageField setBordered: YES];
[appImageField setEditable: NO];
[appImageField setEditable: YES];
[appImageField setBezeled: YES];
[appImageField setDrawsBackground: YES];
[appImageField setStringValue:@""];
[projectProjectInspectorView addSubview:appImageField];
[_appIconBox addSubview:appImageField];
RELEASE(appImageField);
setAppIconButton =[[NSButton alloc] initWithFrame:NSMakeRect(220,180,40,21)];
[setAppIconButton setTitle:@"Set"];
setAppIconButton = [[NSButton alloc] initWithFrame:NSMakeRect(147,0,48,21)];
[setAppIconButton setTitle:@"Set..."];
[setAppIconButton setTarget:self];
[setAppIconButton setAction:@selector(setAppIcon:)];
[projectProjectInspectorView addSubview:setAppIconButton];
[_appIconBox addSubview:setAppIconButton];
RELEASE(setAppIconButton);
clearAppIconButton =[[NSButton alloc] initWithFrame:NSMakeRect(180,180,40,21)];
clearAppIconButton = [[NSButton alloc] initWithFrame:NSMakeRect(95,0,48,21)];
[clearAppIconButton setTitle:@"Clear"];
[clearAppIconButton setTarget:self];
[clearAppIconButton setAction:@selector(clearAppIcon:)];
[projectProjectInspectorView addSubview:clearAppIconButton];
[_appIconBox addSubview:clearAppIconButton];
RELEASE(clearAppIconButton);
_box = [[NSBox alloc] init];
[_box setFrame:frame];
[_box setTitlePosition:NSNoTitle];
[_box setBorderType:NSBezelBorder];
[projectProjectInspectorView addSubview:_box];
frame = NSMakeRect(200,0,56,56);
_iconViewBox = [[NSBox alloc] init];
[_iconViewBox setFrame:frame];
[_iconViewBox setTitlePosition:NSNoTitle];
[_iconViewBox setBorderType:NSBezelBorder];
[_appIconBox addSubview:_iconViewBox];
RELEASE(_iconViewBox);
appIconView = [[NSImageView alloc] initWithFrame:frame];
[_box addSubview:appIconView];
RELEASE(_box);
RELEASE(setAppIconButton);
RELEASE(clearAppIconButton);
[_iconViewBox addSubview:appIconView];
RELEASE(appIconView);
}

View file

@ -91,11 +91,7 @@ static PCBundleProj *_creator = nil;
// Customise the project
[dict setObject:[path lastPathComponent] forKey:PCProjectName];
#ifndef GNUSTEP_BASE_VERSION
[dict setObject:[[project principalClass] description] forKey:PCProjType];
#else
[dict setObject:[project principalClass] forKey:PCProjType];
#endif
// Save the project to disc
projectFile = [NSString stringWithString:[path lastPathComponent]];

View file

@ -91,11 +91,7 @@ static PCGormProj *_creator = nil;
// Customise the project
[dict setObject:[path lastPathComponent] forKey:PCProjectName];
#ifndef GNUSTEP_BASE_VERSION
[dict setObject:[[project principalClass] description] forKey:PCProjType];
#else
[dict setObject:[project principalClass] forKey:PCProjType];
#endif
// Create the AppNameInfo.plist
infoDict = [NSDictionary dictionaryWithObjectsAndKeys:

View file

@ -143,10 +143,38 @@ static PCFileManager *_mgr = nil;
if (retval == NSOKButton)
{
NSEnumerator *enumerator;
NSString *file;
NSString *file = nil;
NSString *cPath = nil;
[ud setObject:[openPanel directory] forKey:@"LastOpenDirectory"];
// Check for "Images" "Documentation" "Non Project Files"
if ([key isEqualToString:PCImages])
{
cPath = [[project projectPath]
stringByAppendingPathComponent:@"Images"];
}
else if ([key isEqualToString:PCDocuFiles])
{
cPath = [[project projectPath]
stringByAppendingPathComponent:@"Documentation"];
}
else if ([key isEqualToString:PCNonProject])
{
cPath = [[project projectPath]
stringByAppendingPathComponent:@"NonProject"];
}
else if ([key isEqualToString:PCGModels])
{
NSString *language = [[project projectDict] objectForKey:@"LANGUAGE"];
cPath = [[project projectPath] stringByAppendingPathComponent:
[language stringByAppendingString:@".lproj"]];
}
else
{
cPath = [project projectPath];
}
enumerator = [[openPanel filenames] objectEnumerator];
while ((file = [enumerator nextObject]))
{
@ -162,7 +190,7 @@ static PCFileManager *_mgr = nil;
NSFileManager *fm = [NSFileManager defaultManager];
fileName = [file lastPathComponent];
pth = [[project projectPath] stringByAppendingPathComponent:fileName];
pth = [cPath stringByAppendingPathComponent:fileName];
if (![key isEqualToString:PCLibraries])
{

View file

@ -33,7 +33,7 @@
#include "PCButton.h"
#undef ENABLE_HISTORY
#define ENABLE_HISTORY
@implementation PCProject (UInterface)
@ -53,6 +53,7 @@
PCButton *findButton;
PCButton *inspectorButton;
id textField;
NSBox *hLine;
PCSplitView *split;
#ifdef ENABLE_HISTORY
@ -200,7 +201,7 @@
#ifdef ENABLE_HISTORY
historyController = [[PCHistoryController alloc] initWithProject:self];
history = [[NSBrowser alloc] initWithFrame:NSMakeRect(320,372,100,60)];
history = [[NSBrowser alloc] initWithFrame:NSMakeRect(320,372,80,128)];
[history setDelegate: historyController];
[history setMaxVisibleColumns: 1];
[history setAllowsMultipleSelection: NO];
@ -210,8 +211,7 @@
[historyController setBrowser: history];
rect = [[projectWindow contentView] frame];
rect.size.width -= 16;
rect.size.height /= 2;
rect.size.height = 130;
v_split = [[PCSplitView alloc] initWithFrame: rect];
[v_split setAutoresizingMask: (NSViewWidthSizable | NSViewHeightSizable)];
[v_split setVertical: YES];
@ -271,64 +271,24 @@
*
*/
projectAttributeInspectorView = [[NSBox alloc] init];
[projectAttributeInspectorView setFrame:NSMakeRect(-2,-2,284,334)];
[projectAttributeInspectorView setFrame:NSMakeRect(0,0,295,364)];
[projectAttributeInspectorView setTitlePosition:NSNoTitle];
[projectAttributeInspectorView setBorderType:NSNoBorder];
[projectAttributeInspectorView setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable)];
[projectAttributeInspectorView
setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable)];
[projectAttributeInspectorView setContentViewMargins:NSMakeSize(0.0, 0.0)];
textField =[[NSTextField alloc] initWithFrame:NSMakeRect(16,280,64,21)];
// Compiler Flags -- ADDITIONAL_OBJCFLAGS(?), ADDITIONAL_CFLAGS
textField =[[NSTextField alloc] initWithFrame:NSMakeRect(4,323,104,21)];
[textField setAlignment: NSRightTextAlignment];
[textField setBordered: NO];
[textField setEditable: NO];
[textField setBezeled: NO];
[textField setDrawsBackground: NO];
[textField setStringValue:@"Install in:"];
[textField setStringValue:@"Compiler Flags:"];
[projectAttributeInspectorView addSubview:textField];
RELEASE(textField);
installPathField =[[NSTextField alloc] initWithFrame:NSMakeRect(84,280,176,21)];
[installPathField setAlignment: NSLeftTextAlignment];
[installPathField setBordered: YES];
[installPathField setEditable: YES];
[installPathField setBezeled: YES];
[installPathField setDrawsBackground: YES];
[installPathField setStringValue:@""];
[installPathField setAction:@selector(changeCommonProjectEntry:)];
[installPathField setTarget:self];
[projectAttributeInspectorView addSubview:installPathField];
textField =[[NSTextField alloc] initWithFrame:NSMakeRect(16,256,64,21)];
[textField setAlignment: NSRightTextAlignment];
[textField setBordered: NO];
[textField setEditable: NO];
[textField setBezeled: NO];
[textField setDrawsBackground: NO];
[textField setStringValue:@"Build tool:"];
[projectAttributeInspectorView addSubview:textField];
RELEASE(textField);
toolField =[[NSTextField alloc] initWithFrame:NSMakeRect(84,256,176,21)];
[toolField setAlignment: NSLeftTextAlignment];
[toolField setBordered: YES];
[toolField setEditable: YES];
[toolField setBezeled: YES];
[toolField setDrawsBackground: YES];
[toolField setStringValue:@""];
[toolField setAction:@selector(changeCommonProjectEntry:)];
[toolField setTarget:self];
[projectAttributeInspectorView addSubview:toolField];
textField =[[NSTextField alloc] initWithFrame:NSMakeRect(16,232,64,21)];
[textField setAlignment: NSRightTextAlignment];
[textField setBordered: NO];
[textField setEditable: NO];
[textField setBezeled: NO];
[textField setDrawsBackground: NO];
[textField setStringValue:@"CC options:"];
[projectAttributeInspectorView addSubview:textField];
RELEASE(textField);
ccOptField =[[NSTextField alloc] initWithFrame:NSMakeRect(84,232,176,21)];
ccOptField =[[NSTextField alloc] initWithFrame:NSMakeRect(111,323,165,21)];
[ccOptField setAlignment: NSLeftTextAlignment];
[ccOptField setBordered: YES];
[ccOptField setEditable: YES];
@ -338,27 +298,124 @@
[ccOptField setAction:@selector(changeCommonProjectEntry:)];
[ccOptField setTarget:self];
[projectAttributeInspectorView addSubview:ccOptField];
RELEASE(ccOptField);
textField =[[NSTextField alloc] initWithFrame:NSMakeRect(16,204,64,21)];
// Linker Flags -- ADDITIONAL_LDFLAGS
textField =[[NSTextField alloc] initWithFrame:NSMakeRect(4,298,104,21)];
[textField setAlignment: NSRightTextAlignment];
[textField setBordered: NO];
[textField setEditable: NO];
[textField setBezeled: NO];
[textField setDrawsBackground: NO];
[textField setStringValue:@"LD options:"];
[textField setStringValue:@"Linker Flags:"];
[projectAttributeInspectorView addSubview:textField];
RELEASE(textField);
ldOptField =[[NSTextField alloc] initWithFrame:NSMakeRect(84,204,176,21)];
ldOptField =[[NSTextField alloc] initWithFrame:NSMakeRect(111,298,165,21)];
[ldOptField setAlignment: NSLeftTextAlignment];
[ldOptField setBordered: YES];
[ldOptField setEditable: NO];
[ldOptField setEditable: YES];
[ldOptField setBezeled: YES];
[ldOptField setDrawsBackground: YES];
[ldOptField setStringValue:@""];
[ldOptField setAction:@selector(changeCommonProjectEntry:)];
[ldOptField setTarget:self];
[projectAttributeInspectorView addSubview:ldOptField];
RELEASE(ldOptField);
// Install In
textField =[[NSTextField alloc] initWithFrame:NSMakeRect(4,273,104,21)];
[textField setAlignment: NSRightTextAlignment];
[textField setBordered: NO];
[textField setEditable: NO];
[textField setBezeled: NO];
[textField setDrawsBackground: NO];
[textField setStringValue:@"Install In:"];
[projectAttributeInspectorView addSubview:textField];
RELEASE(textField);
installPathField =[[NSTextField alloc]
initWithFrame:NSMakeRect(111,273,165,21)];
[installPathField setAlignment: NSLeftTextAlignment];
[installPathField setBordered: YES];
[installPathField setEditable: YES];
[installPathField setBezeled: YES];
[installPathField setDrawsBackground: YES];
[installPathField setStringValue:@""];
[installPathField setAction:@selector(changeCommonProjectEntry:)];
[installPathField setTarget:self];
[projectAttributeInspectorView addSubview:installPathField];
RELEASE(installPathField);
// Build Tool
textField =[[NSTextField alloc] initWithFrame:NSMakeRect(4,248,104,21)];
[textField setAlignment: NSRightTextAlignment];
[textField setBordered: NO];
[textField setEditable: NO];
[textField setBezeled: NO];
[textField setDrawsBackground: NO];
[textField setStringValue:@"Build Tool:"];
[projectAttributeInspectorView addSubview:textField];
RELEASE(textField);
toolField =[[NSTextField alloc] initWithFrame:NSMakeRect(111,248,165,21)];
[toolField setAlignment: NSLeftTextAlignment];
[toolField setBordered: YES];
[toolField setEditable: YES];
[toolField setBezeled: YES];
[toolField setDrawsBackground: YES];
[toolField setStringValue:@""];
[toolField setAction:@selector(changeCommonProjectEntry:)];
[toolField setTarget:self];
[projectAttributeInspectorView addSubview:toolField];
RELEASE(toolField);
// Public Headers In -- ADDITIONAL_INCLUDE_DIRS
textField =[[NSTextField alloc] initWithFrame:NSMakeRect(4,223,104,21)];
[textField setAlignment: NSRightTextAlignment];
[textField setBordered: NO];
[textField setEditable: NO];
[textField setBezeled: NO];
[textField setDrawsBackground: NO];
[textField setStringValue:@"Public Headers In:"];
[projectAttributeInspectorView addSubview:textField];
RELEASE(textField);
headersField =[[NSTextField alloc] initWithFrame:NSMakeRect(111,223,165,21)];
[headersField setAlignment: NSLeftTextAlignment];
[headersField setBordered: YES];
[headersField setEditable: YES];
[headersField setBezeled: YES];
[headersField setDrawsBackground: YES];
[headersField setStringValue:@""];
[headersField setAction:@selector(changeCommonProjectEntry:)];
[headersField setTarget:self];
[projectAttributeInspectorView addSubview:headersField];
RELEASE(headersField);
// Public Libraries In -- ADDITIONAL_TOOL_LIBS
textField =[[NSTextField alloc] initWithFrame:NSMakeRect(4,198,104,21)];
[textField setAlignment: NSRightTextAlignment];
[textField setBordered: NO];
[textField setEditable: NO];
[textField setBezeled: NO];
[textField setDrawsBackground: NO];
[textField setStringValue:@"Public Libraries In:"];
[projectAttributeInspectorView addSubview:textField];
RELEASE(textField);
libsField =[[NSTextField alloc] initWithFrame:NSMakeRect(111,198,165,21)];
[libsField setAlignment: NSLeftTextAlignment];
[libsField setBordered: YES];
[libsField setEditable: YES];
[libsField setBezeled: YES];
[libsField setDrawsBackground: YES];
[libsField setStringValue:@""];
[libsField setAction:@selector(changeCommonProjectEntry:)];
[libsField setTarget:self];
[projectAttributeInspectorView addSubview:libsField];
RELEASE(libsField);
/*
* Project View
@ -366,60 +423,120 @@
*/
projectProjectInspectorView = [[NSBox alloc] init];
[projectProjectInspectorView setFrame:NSMakeRect(-2,-2,284,334)];
[projectProjectInspectorView setFrame:NSMakeRect(0,0,295,364)];
[projectProjectInspectorView setTitlePosition:NSNoTitle];
[projectProjectInspectorView setBorderType:NSNoBorder];
[projectProjectInspectorView setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable)];
[projectProjectInspectorView
setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable)];
[projectProjectInspectorView setContentViewMargins:NSMakeSize(0.0, 0.0)];
textField =[[NSTextField alloc] initWithFrame:NSMakeRect(16,280,64,21)];
// Project Type
textField = [[NSTextField alloc] initWithFrame:NSMakeRect(4,323,104,21)];
[textField setAlignment: NSRightTextAlignment];
[textField setBordered: NO];
[textField setEditable: NO];
[textField setBezeled: NO];
[textField setDrawsBackground: NO];
[textField setStringValue:@"Type:"];
[textField setStringValue:@"Project Type:"];
[projectProjectInspectorView addSubview:textField];
RELEASE(textField);
projectTypeField = [[NSTextField alloc] initWithFrame:NSMakeRect(84,280,176,21)];
projectTypeField = [[NSTextField alloc] initWithFrame:
NSMakeRect(111,323,165,21)];
[projectTypeField setAlignment: NSLeftTextAlignment];
[projectTypeField setBordered: NO];
[projectTypeField setEditable: NO];
[projectTypeField setSelectable: NO];
[projectTypeField setBezeled: NO];
[projectTypeField setDrawsBackground: NO];
[projectTypeField setFont:[NSFont boldSystemFontOfSize: 12.0]];
[projectTypeField setStringValue:@""];
[projectProjectInspectorView addSubview:projectTypeField];
RELEASE(projectTypeField);
projectFileInspectorView = [[NSBox alloc] init];
[projectFileInspectorView setFrame:NSMakeRect(-2,-2,284,334)];
[projectFileInspectorView setTitlePosition:NSNoTitle];
[projectFileInspectorView setBorderType:NSNoBorder];
[projectFileInspectorView setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable)];
textField =[[NSTextField alloc] initWithFrame:NSMakeRect(16,280,64,21)];
// Project Name
textField = [[NSTextField alloc] initWithFrame:NSMakeRect(4,298,104,21)];
[textField setAlignment: NSRightTextAlignment];
[textField setBordered: NO];
[textField setEditable: NO];
[textField setBezeled: NO];
[textField setDrawsBackground: NO];
[textField setStringValue:@"Filename:"];
[projectFileInspectorView addSubview:textField];
[textField setStringValue:@"Project Name:"];
[projectProjectInspectorView addSubview:textField];
RELEASE(textField);
fileNameField =[[NSTextField alloc] initWithFrame:NSMakeRect(84,280,176,21)];
projectNameField = [[NSTextField alloc] initWithFrame:
NSMakeRect(111,298,165,21)];
[projectNameField setAlignment: NSLeftTextAlignment];
[projectNameField setBordered: NO];
[projectNameField setEditable: NO];
[projectNameField setBezeled: YES];
[projectNameField setDrawsBackground: YES];
[projectNameField setStringValue:@""];
[projectProjectInspectorView addSubview:projectNameField];
RELEASE(projectNameField);
// Project Language
textField = [[NSTextField alloc] initWithFrame:NSMakeRect(4,273,104,21)];
[textField setAlignment: NSRightTextAlignment];
[textField setBordered: NO];
[textField setEditable: NO];
[textField setBezeled: NO];
[textField setDrawsBackground: NO];
[textField setStringValue:@"Language:"];
[projectProjectInspectorView addSubview:textField];
RELEASE(textField);
projectLanguageField = [[NSTextField alloc] initWithFrame:
NSMakeRect(111,273,165,21)];
[projectLanguageField setAlignment: NSLeftTextAlignment];
[projectLanguageField setBordered: NO];
[projectLanguageField setEditable: NO];
[projectLanguageField setBezeled: YES];
[projectLanguageField setDrawsBackground: YES];
[projectLanguageField setStringValue:@""];
[projectProjectInspectorView addSubview:projectLanguageField];
RELEASE(projectLanguageField);
/*
* File View
*
*/
projectFileInspectorView = [[NSBox alloc] init];
[projectFileInspectorView setFrame:NSMakeRect(0,0,295,364)];
[projectFileInspectorView setTitlePosition:NSNoTitle];
[projectFileInspectorView setAutoresizingMask:
(NSViewWidthSizable | NSViewHeightSizable)];
[projectFileInspectorView setContentViewMargins:NSMakeSize(0.0, 0.0)];
fileIconView = [[NSImageView alloc] initWithFrame:NSMakeRect(8,290,48,48)];
[fileIconView setImage:[NSImage imageNamed:@"common_Unknown"]];
[projectFileInspectorView addSubview:fileIconView];
RELEASE(fileIconView);
fileNameField =[[NSTextField alloc] initWithFrame:NSMakeRect(60,290,216,48)];
[fileNameField setAlignment: NSLeftTextAlignment];
[fileNameField setBordered: NO];
[fileNameField setEditable: NO];
[fileNameField setSelectable: NO];
[fileNameField setBezeled: NO];
[fileNameField setDrawsBackground: NO];
[fileNameField setStringValue:@""];
[fileNameField setFont:[NSFont systemFontOfSize:20.0]];
[fileNameField setStringValue:@"No file selected"];
[projectFileInspectorView addSubview:fileNameField];
RELEASE(fileNameField);
hLine = [[NSBox alloc] initWithFrame:NSMakeRect(0,278,295,2)];
[hLine setTitlePosition:NSNoTitle];
[projectFileInspectorView addSubview:hLine];
changeFileNameButton = [[NSButton alloc] initWithFrame:NSMakeRect(84,240,104,21)];
changeFileNameButton = [[NSButton alloc] initWithFrame:
NSMakeRect(84,240,104,21)];
[changeFileNameButton setTitle:@"Rename..."];
[changeFileNameButton setTarget:self];
[changeFileNameButton setAction:@selector(renameFile:)];
[projectFileInspectorView addSubview:changeFileNameButton];
RELEASE(changeFileNameButton);
}
- (void)setFileIcon:(NSNotification *)notification
@ -430,8 +547,6 @@
NSString *lastComp = [path lastPathComponent];
NSString *extension = [[lastComp componentsSeparatedByString:@"."] lastObject];
// NSLog (@"PCP+UI %i -- %@", [pathComps count], path);
// Should be provided by PC*Proj bundles
if ([[object selectedFiles] count] > 1
&& [pathComps count] > 2)
@ -486,11 +601,20 @@
{
[fileIcon setImage: IMAGE (@"projectSuitcase")];
}
else
else
{
[fileIcon
setImage: [[NSWorkspace sharedWorkspace] iconForFileType:extension]];
}
if ([fileIcon image] == nil)
{
[fileIcon
setImage: [[NSWorkspace sharedWorkspace] iconForFileType:extension]];
}
// Set icon in Inspector "File Attributes". Should not be here!
[fileIconView setImage:[fileIcon image]];
// Set title
if ([[object selectedFiles] count] > 1

View file

@ -144,15 +144,20 @@ static NSString * const PCBuildTool = @"BUILDTOOL";
NSTextField *fileIconTitle;
id projectAttributeInspectorView;
NSTextField *installPathField;
NSTextField *toolField;
NSTextField *ccOptField;
NSTextField *ldOptField;
NSTextField *installPathField;
NSTextField *toolField;
NSTextField *headersField;
NSTextField *libsField;
id projectProjectInspectorView;
NSTextField *projectTypeField;
NSTextField *projectNameField;
NSTextField *projectLanguageField;
id projectFileInspectorView;
NSImageView *fileIconView;
NSTextField *fileNameField;
NSButton *changeFileNameButton;

View file

@ -655,6 +655,8 @@
- (void)updateValuesFromProjectDict
{
[projectTypeField setStringValue:[projectDict objectForKey:PCProjType]];
[projectNameField setStringValue:[projectDict objectForKey:PCProjectName]];
[projectLanguageField setStringValue:[projectDict objectForKey:@"LANGUAGE"]];
[installPathField setStringValue:[projectDict objectForKey:PCInstallDir]];
[toolField setStringValue:[projectDict objectForKey:PCBuildTool]];
[ccOptField setStringValue:[projectDict objectForKey:PCCompilerOptions]];

View file

@ -453,96 +453,15 @@
[optionsButton setShowTooltip:YES];
}
- (void) topButtonPressed: (id)sender
{
NSString *tFString = [targetField stringValue];
NSArray *tFArray = [tFString componentsSeparatedByString: @" "];
if (makeTask)
{
[makeTask terminate];
return;
}
[buildTarget setString: [tFArray objectAtIndex: 0]];
switch ([[sender selectedCell] tag])
{
case 0:
// Set build arguments
if ([buildTarget isEqualToString: @"Default"])
{
;
}
else if ([buildTarget isEqualToString: @"Debug"])
{
[buildArgs addObject: @"debug=yes"];
}
else if ([buildTarget isEqualToString: @"Profile"])
{
[buildArgs addObject: @"profile=yes"];
[buildArgs addObject: @"static=yes"];
}
else if ([buildTarget isEqualToString: @"Tarball"])
{
[buildArgs addObject: @"dist"];
}
else if ([buildTarget isEqualToString: @"RPM"])
{
[buildArgs addObject: @"rpm"];
postProcess = @selector (copyPackageTo:);
}
statusString = [NSString stringWithString: @"Building..."];
[buildTarget setString: @"Build"];
[self build: self];
break;
case 1:
if ([[[[NSUserDefaults standardUserDefaults] dictionaryRepresentation]
objectForKey: PromptOnClean] isEqualToString: @"YES"])
{
if (NSRunAlertPanel(@"Clean Project?",
@"Do you really want to clean project '%@'?",
@"Yes",
@"No",
nil,
[currentProject projectName])
== NSAlertAlternateReturn)
{
return;
}
}
[buildTarget setString: @"Clean"];
statusString = [NSString stringWithString: @"Cleaning..."];
[buildArgs addObject: @"distclean"];
[self build: self];
break;
case 2:
[buildTarget setString: @"Install"];
statusString = [NSString stringWithString: @"Installing..."];
[buildArgs addObject: @"install"];
[self build: self];
break;
case 3:
if (!optionsPanel)
{
[self _createOptionsPanel];
}
[optionsPanel orderFront: nil];
return;
}
}
- (void)startBuild:(id)sender
{
NSString *tFString = [targetField stringValue];
NSArray *tFArray = [tFString componentsSeparatedByString: @" "];
if (makeTask && [makeTask isRunning])
// [makeTask isRunning] doesn't work here.
// "waitpid 7045, result -1, error No child processes" is printed.
if (makeTask)
{
[makeTask terminate];
return;
@ -649,8 +568,6 @@
return;
}
NSLog (@"Status: %@ BuildTarget: %@", statusString, buildTarget);
// Prepearing to building
logPipe = [NSPipe pipe];
// readHandle = [[logPipe fileHandleForReading] retain];
@ -704,21 +621,19 @@
if ([aNotif object] == makeTask)
{
[NOTIFICATION_CENTER removeObserver: self
name: NSFileHandleDataAvailableNotification
object: readHandle];
name: NSFileHandleDataAvailableNotification
object: readHandle];
[NOTIFICATION_CENTER removeObserver: self
name: NSFileHandleDataAvailableNotification
object: errorReadHandle];
name: NSFileHandleDataAvailableNotification
object: errorReadHandle];
[NOTIFICATION_CENTER removeObserver: self
name: NSTaskDidTerminateNotification
object: makeTask];
name: NSTaskDidTerminateNotification
object: makeTask];
// RELEASE (readHandle);
// RELEASE (errorReadHandle);
NSLog (@"Observers removed!");
if (status == 0)
{
[self logString:
@ -757,8 +672,8 @@
[buildArgs removeAllObjects];
[buildTarget setString: @"Default"];
/* RELEASE (makeTask);
makeTask = nil;*/
/* RELEASE (makeTask);*/
makeTask = nil;
}
}
@ -865,7 +780,7 @@
- (void)make:(NSDictionary *)data
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
makeTask = [[NSTask alloc] init];
[makeTask setArguments: [data objectForKey: @"args"]];
[makeTask setCurrentDirectoryPath: [data objectForKey: @"currentDirectory"]];

View file

@ -47,12 +47,12 @@
backing:NSBackingStoreBuffered
defer:YES];
[inspector setMinSize:NSMakeSize(280,384)];
[inspector setTitle:@"Inspector"];
[inspector setTitle:@"Project Inspector"];
[inspector setReleasedWhenClosed:NO];
[inspector setFrameAutosaveName:@"Inspector"];
_c_view = [inspector contentView];
_w_frame = NSMakeRect(80,352,128,20);
_w_frame = NSMakeRect(80,358,128,20);
inspectorPopup = [[NSPopUpButton alloc] initWithFrame:_w_frame];
[inspectorPopup addItemWithTitle:@"None"];
[inspectorPopup setTarget:self];
@ -66,7 +66,7 @@
inspectorView = [[NSBox alloc] init];
[inspectorView setTitlePosition:NSNoTitle];
[inspectorView setFrame:NSMakeRect(-2,-2,284,334)];
[inspectorView setFrame:NSMakeRect(-8,-8,295,364)];
[inspectorView setBorderType:NSNoBorder];
[_c_view addSubview:inspectorView];

View file

@ -418,33 +418,34 @@ NSString *ActiveProjectDidChangeNotification = @"ActiveProjectDidChange";
- (void)closeProject:(PCProject *)aProject
{
PCProject *currentProject = nil;
NSString *path = [aProject projectPath];
NSString *projectName = [path lastPathComponent];
NSString *key;
key = [path stringByAppendingPathComponent:projectName];
key = [key stringByAppendingPathExtension:@"pcproj"];
currentProject = RETAIN([loadedProjects objectForKey:key]);
if( !currentProject )
PCProject *currentProject = nil;
NSString *path = [aProject projectPath];
NSString *projectName = [path lastPathComponent];
NSString *key;
key = [path stringByAppendingPathComponent:projectName];
key = [key stringByAppendingPathExtension:@"pcproj"];
currentProject = RETAIN([loadedProjects objectForKey:key]);
if (!currentProject)
{
return;
return;
}
// Remove it from the loaded projects! This is the only place it
// is retained, so it should dealloc after this.
[loadedProjects removeObjectForKey:key];
if ([loadedProjects count] == 0)
[self setActiveProject: nil];
else if (currentProject == [self activeProject])
[self setActiveProject:[[loadedProjects allValues] lastObject]];
// Remove it from the loaded projects! This is the only place it
// is retained, so it should dealloc after this.
[loadedProjects removeObjectForKey:key];
if ([loadedProjects count] == 0)
[self setActiveProject: nil];
else if (currentProject == [self activeProject])
[self setActiveProject:[[loadedProjects allValues] lastObject]];
if ([loadedProjects count] == 0)
if ([loadedProjects count] == 0)
{
[inspector performClose:self];
[inspector performClose:self];
}
RELEASE(currentProject);
RELEASE(currentProject);
}
- (void)closeProject

View file

@ -88,11 +88,7 @@ static PCLibProj *_creator = nil;
// Customise the project
[dict setObject:[path lastPathComponent] forKey:PCProjectName];
#ifndef GNUSTEP_BASE_VERSION
[dict setObject:[[project principalClass] description] forKey:PCProjType];
#else
[dict setObject:[project principalClass] forKey:PCProjType];
#endif
// Save the project to disc
projectFile = [NSString stringWithString:[path lastPathComponent]];

View file

@ -92,11 +92,7 @@ static PCRenaissanceProj *_creator = nil;
// Customise the project
[dict setObject:[path lastPathComponent] forKey:PCProjectName];
#ifndef GNUSTEP_BASE_VERSION
[dict setObject:[[project principalClass] description] forKey:PCProjType];
#else
[dict setObject:[project principalClass] forKey:PCProjType];
#endif
// Create the AppNameInfo.plist
infoDict = [NSDictionary dictionaryWithObjectsAndKeys:

View file

@ -88,11 +88,7 @@ static PCToolProj *_creator = nil;
// Customise the project
[dict setObject:[path lastPathComponent] forKey:PCProjectName];
#ifndef GNUSTEP_BASE_VERSION
[dict setObject:[[project principalClass] description] forKey:PCProjType];
#else
[dict setObject:[project principalClass] forKey:PCProjType];
#endif
// Save the project to disc
projectFile = [NSString stringWithString:[path lastPathComponent]];