mirror of
https://github.com/gnustep/apps-projectcenter.git
synced 2025-02-21 19:01:18 +00:00
*** 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:
parent
0310a6c0d2
commit
ddb6c1a8c1
8 changed files with 82 additions and 31 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
|
|
|
@ -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
|
||||
|
||||
// ============================================================================
|
||||
|
|
Binary file not shown.
|
@ -140,6 +140,13 @@
|
|||
);
|
||||
Super = NSObject;
|
||||
};
|
||||
PCFileNameField = {
|
||||
Actions = (
|
||||
);
|
||||
Outlets = (
|
||||
);
|
||||
Super = NSTextField;
|
||||
};
|
||||
PCProjectInspector = {
|
||||
Actions = (
|
||||
);
|
||||
|
|
Binary file not shown.
|
@ -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
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue