*** empty log message ***

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/branches/UNSTABLE_0_4@18900 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Sergii Stoian 2004-03-25 08:32:57 +00:00
parent 0310a6c0d2
commit ddb6c1a8c1
8 changed files with 82 additions and 31 deletions

View file

@ -28,6 +28,12 @@
@class PCProjectManager;
@class PCProjectBrowser;
@interface PCFileNameField : NSTextField
{
}
@end
@interface PCProjectInspector : NSObject
{
PCProjectManager *projectManager;
@ -81,9 +87,9 @@
IBOutlet NSButton *authorDown;
// File Attributes
IBOutlet NSBox *fileAttributesView;
IBOutlet NSImageView *fileIconView;
IBOutlet NSTextField *fileNameField;
IBOutlet NSBox *fileAttributesView;
IBOutlet NSImageView *fileIconView;
IBOutlet PCFileNameField *fileNameField;
}
// ============================================================================

View file

@ -29,6 +29,53 @@
#include "PCProjectWindow.h"
#include "PCProjectInspector.h"
@implementation PCFileNameField
- (void)setEditableField:(BOOL)yn
{
NSRect frame = [self frame];
if (yn == YES)
{
frame.size.width += 4;
frame.origin.x -= 4;
[self setFrame:frame];
[self setBordered:YES];
[self setBackgroundColor:[NSColor whiteColor]];
[self setEditable:YES];
}
else
{
frame.size.width -= 4;
frame.origin.x += 4;
[self setFrame:frame];
[self setBordered:NO];
[self setBackgroundColor:[NSColor lightGrayColor]];
[self setDrawsBackground:YES];
[self setEditable:NO];
}
}
- (void)mouseDown:(NSEvent *)theEvent
{
NSLog(@"PCFileNameField mouseDown");
[self setEditableField:YES];
[super mouseDown:theEvent];
}
- (void)textDidEndEditing:(NSNotification *)aNotification
{
NSLog(@"PCFileNameField textDidEndEditing");
[self setEditableField:NO];
[super textDidEndEditing:aNotification];
}
@end
@implementation PCProjectInspector
// ============================================================================

View file

@ -140,6 +140,13 @@
);
Super = NSObject;
};
PCFileNameField = {
Actions = (
);
Outlets = (
);
Super = NSTextField;
};
PCProjectInspector = {
Actions = (
);

View file

@ -30,8 +30,9 @@ Templates/main.m \
Templates/PC.project \
Templates/GNUmakefile.preamble \
Templates/GNUmakefile.postamble \
Templates/objects.gorm \
Templates/data.classes
Templates/Main.gorm
#Templates/objects.gorm \
#Templates/data.classes
#
# Header files

View file

@ -125,22 +125,14 @@ static PCAppProj *_creator = nil;
[fm createDirectoryAtPath:[path stringByAppendingPathComponent:@"Documentation"]
attributes:nil];
// Gorm files
// Main NIB
mainNibFile = [path stringByAppendingPathComponent:
[NSString stringWithFormat:@"%@.gorm", [path lastPathComponent]]];
[fm createDirectoryAtPath:mainNibFile attributes:nil];
_file = [projBundle pathForResource:@"objects" ofType:@"gorm"];
[fm copyPath:_file
toPath:[mainNibFile stringByAppendingPathComponent:@"objects.gorm"]
handler:nil];
_file = [projBundle pathForResource:@"data" ofType:@"classes"];
[fm copyPath:_file
toPath:[mainNibFile stringByAppendingPathComponent:@"data.classes"]
handler:nil];
_file = [projBundle pathForResource:@"Main" ofType:@"gorm"];
[fm copyPath:_file toPath:mainNibFile handler:nil];
[projectDict setObject:[mainNibFile lastPathComponent]
forKey:PCMainInterfaceFile];
[projectDict
setObject:[NSArray arrayWithObject:[mainNibFile lastPathComponent]]
forKey:PCInterfaces];

View file

@ -695,33 +695,31 @@ NSString *PCITextFieldGetFocus = @"PCITextFieldGetFocusNotification";
if (anObject == appImageField)
{
// NSLog(@"Application Icon get focus");
file = [appImageField stringValue];
if ([file isEqualToString:@""]) return;
path = [self dirForCategory:PCImages];
path = [path stringByAppendingPathComponent:file];
[self setIconViewImage:[[NSImage alloc] initWithContentsOfFile:path]];
if (![file isEqualToString:@""])
{
path = [self dirForCategory:PCImages];
path = [path stringByAppendingPathComponent:file];
[self setIconViewImage:[[NSImage alloc]
initWithContentsOfFile:path]];
}
activeTextField = appImageField;
}
else if (anObject == helpFileField)
{
// NSLog(@"Help File get focus");
activeTextField = helpFileField;
}
else if (anObject == mainNIBField)
{
// NSLog(@"Main Interface File get focus");
file = [mainNIBField stringValue];
if ([file isEqualToString:@""]) return;
path = [projectPath stringByAppendingPathComponent:file];
[self setIconViewImage:[[NSWorkspace sharedWorkspace] iconForFile:path]];
if (![file isEqualToString:@""])
{
path = [projectPath stringByAppendingPathComponent:file];
[self setIconViewImage:[[NSWorkspace sharedWorkspace]
iconForFile:path]];
}
activeTextField = mainNIBField;
}