*** empty log message ***

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@17094 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Sergii Stoian 2003-07-04 07:43:33 +00:00
parent 4eb73b4d38
commit bb9f62c760
12 changed files with 233 additions and 159 deletions

View file

@ -1,3 +1,25 @@
2003-07-04 Serg Stoyan <stoyan@hologr.com>
* PCAppController.m: Change REL_LIB_PC and ABS_LIB_PC to ApplicationSupport dir.
* PCInfoController.m:
(init): Load Info-gnustep.plist instead of Info-project.plist.
(showInfoWindow:): Set title of info window to "Info".
* PCPrefController.m:
(_initUI): Move releasing of controls here from -dealloc.
(popupChnaged:): Don't retain views.
* PCAppProj/PCAppProject.m:
(updateValuesFromProjectDict): Change size of appicon frame to 48x48.
Check PCAppIcon field value is not equal to @"".
* PCLib/PCButton.m
(PCButton dealloc): Release tooltip window.
(PCButtonCell dealloc): Added.
* PCLib/PCProject+UInterface.m:
(_initUI): Cleanup. fileIcon now NSImageView.
(setFileIcon:): Check for source of notification. Cleanup.
2003-07-02 Serg Stoyan <stoyan@hologr.com>
* PCAppProj/PCAppProj.m:

View file

@ -29,8 +29,8 @@
#include <ProjectCenter/ProjectCenter.h>
#define REL_LIB_PC @"Library/ProjectCenter"
#define ABS_LIB_PC @"/usr/GNUstep/Local/Library/ProjectCenter"
#define REL_LIB_PC @"Library/ApplicationSupport/ProjectCenter"
#define ABS_LIB_PC @"/usr/GNUstep/System/Library/ApplicationSupport/ProjectCenter"
@implementation PCAppController
@ -40,10 +40,10 @@
+ (void)initialize
{
NSMutableDictionary *defaults = [NSMutableDictionary dictionary];
NSDictionary *env = [[NSProcessInfo processInfo] environment];
NSString *prefix = [env objectForKey:@"GNUSTEP_SYSTEM_ROOT"];
NSString *_bundlePath;
NSMutableDictionary *defaults = [NSMutableDictionary dictionary];
NSDictionary *env = [[NSProcessInfo processInfo] environment];
NSString *prefix = [env objectForKey:@"GNUSTEP_SYSTEM_ROOT"];
NSString *_bundlePath;
if (prefix && ![prefix isEqualToString:@""])
{
@ -102,6 +102,7 @@
[menuController setFileManager:fileManager];
[menuController setProjectManager:projectManager];
}
return self;
}

View file

@ -178,16 +178,17 @@ static PCAppProj *_creator = nil;
- (PCProject *)openProjectAt:(NSString *)path
{
NSDictionary *dict = [NSDictionary dictionaryWithContentsOfFile:path];
id obj;
NSDictionary *dict = [NSDictionary dictionaryWithContentsOfFile:path];
id obj;
NSLog(@"<%@ %x>: opening project at %@",[self class],self,path);
NSLog(@"<%@ %x>: opening project at %@",[self class],self,path);
obj = [dict objectForKey:PCProjectBuilderClass];
if ([obj isEqualToString:@"PCAppProj"]) {
obj = [dict objectForKey:PCProjectBuilderClass];
if ([obj isEqualToString:@"PCAppProj"])
{
return [[[PCAppProject alloc] initWithProjectDictionary:dict path:[path stringByDeletingLastPathComponent]] autorelease];
}
return nil;
return nil;
}
@end

View file

@ -261,27 +261,30 @@
- (void)updateValuesFromProjectDict
{
NSRect frame = {{0,0}, {64, 64}};
NSImage *image;
NSRect frame = {{0,0}, {48,48}};
NSImage *image = nil;
NSString *path = nil;
NSString *_icon;
NSString *_icon = nil;
[super updateValuesFromProjectDict];
[appClassField setStringValue:[projectDict objectForKey:PCAppClass]];
[appImageField setStringValue:[projectDict objectForKey:PCAppIcon]];
if ((_icon = [projectDict objectForKey:PCAppIcon])) {
path = [projectPath stringByAppendingPathComponent:_icon];
}
_icon = [projectDict objectForKey:PCAppIcon];
if (_icon && ![_icon isEqualToString:@""])
{
path = [projectPath stringByAppendingPathComponent:_icon];
}
if (path && (image = [[NSImage alloc] initWithContentsOfFile:path])) {
frame.size = [image size];
[appIconView setFrame:frame];
[appIconView setImage:image];
[appIconView display];
RELEASE(image);
}
if (path && (image = [[NSImage alloc] initWithContentsOfFile:path]))
{
frame.size = [image size];
[appIconView setFrame:frame];
[appIconView setImage:image];
[appIconView display];
RELEASE(image);
}
}
- (void)clearAppIcon:(id)sender

View file

@ -38,7 +38,9 @@
if ((self = [super init])) {
NSString *file;
file = [[NSBundle mainBundle] pathForResource:@"Info-project" ofType:@"plist"];
file = [[NSBundle mainBundle]
pathForResource:@"Info-gnustep"
ofType:@"plist"];
infoDict = [NSDictionary dictionaryWithContentsOfFile:file];
[infoDict retain];
}
@ -59,14 +61,18 @@
- (void)showInfoWindow:(id)sender
{
#if defined(GNUSTEP)
if (!infoWindow) {
infoWindow = [[GSInfoPanel alloc] initWithDictionary:infoDict];
}
if (!infoWindow)
{
infoWindow = [[GSInfoPanel alloc] initWithDictionary:infoDict];
}
[infoWindow setTitle:@"Info"];
[infoWindow center];
[infoWindow makeKeyAndOrderFront:self];
#else
NSRunAlertPanel(@"Info",@"OPENSTEP has no support for GSInfoPanel",@"OK",nil,nil,nil);
NSRunAlertPanel(@"Info",
@"OPENSTEP has no support for GSInfoPanel",
@"OK",nil,nil,nil);
#endif
}

View file

@ -8,7 +8,7 @@
/*
* Button
*/
@interface PCButton : NSButton
@interface PCButton : NSButton
{
NSTrackingRectTag tRectTag;
NSTimer *ttTimer;

View file

@ -24,7 +24,15 @@
[[self superview] removeTrackingRect:tRectTag];
[ttTimer invalidate];
ttTimer = nil;
RELEASE(ttTimer);
}
if (ttWindow != nil)
{
RELEASE(ttWindow);
}
[super dealloc];
}
- (void)setFrame:(NSRect)frameRect
@ -177,6 +185,13 @@
return self;
}
- (void)dealloc
{
RELEASE(tile);
[super dealloc];
}
- (void) drawInteriorWithFrame: (NSRect)cellFrame inView: (NSView*)controlView
{
[super drawInteriorWithFrame: cellFrame inView: controlView];

View file

@ -65,7 +65,11 @@
[browser setMaxVisibleColumns:1];
[browser setAllowsMultipleSelection:NO];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(historyDidChange:) name:@"FileBecomesEditedNotification" object:nil];
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(historyDidChange:)
name:@"FileBecomesEditedNotification"
object:nil];
}
- (void)historyDidChange:(NSNotification *)notif

View file

@ -44,17 +44,19 @@
| NSClosableWindowMask
| NSMiniaturizableWindowMask
| NSResizableWindowMask;
NSBrowser *browser;
NSRect rect;
PCButton *buildButton;
PCButton *launchButton;
PCButton *editorButton;
PCButton *loadedFilesButton;
PCButton *findButton;
PCButton *inspectorButton;
id textField;
NSBox *hLine;
PCSplitView *split;
PCButton *buildButton;
PCButton *launchButton;
PCButton *editorButton;
PCButton *loadedFilesButton;
PCButton *findButton;
PCButton *inspectorButton;
NSBrowser *browser;
NSRect rect;
id textField;
NSBox *hLine;
PCSplitView *split;
#ifdef ENABLE_HISTORY
PCSplitView *v_split;
@ -80,7 +82,6 @@
*/
buildButton = [[PCButton alloc] initWithFrame: NSMakeRect(8,390,50,50)];
[buildButton setTitle: @"Build"];
// [buildButton setImage: IMAGE(@"Build")];
[buildButton setImage: IMAGE(@"ProjectCenter_make")];
[buildButton setTarget: self];
[buildButton setAction: @selector(showBuildView:)];
@ -92,7 +93,6 @@
launchButton = [[PCButton alloc] initWithFrame: NSMakeRect(58,390,50,50)];
[launchButton setTitle: @"Launch"];
// [launchButton setImage: IMAGE(@"Run")];
[launchButton setImage: IMAGE(@"ProjectCenter_run")];
[launchButton setTarget: self];
[launchButton setAction: @selector(showRunView:)];
@ -104,7 +104,6 @@
editorButton = [[PCButton alloc] initWithFrame: NSMakeRect(108,390,50,50)];
[editorButton setTitle: @"Editor"];
// [editorButton setImage: IMAGE(@"Editor")];
[editorButton setImage: IMAGE(@"ProjectCenter_files")];
[editorButton setTarget: self];
[editorButton setAction: @selector(showEditorView:)];
@ -116,34 +115,29 @@
loadedFilesButton = [[PCButton alloc] initWithFrame: NSMakeRect(158,390,50,50)];
[loadedFilesButton setTitle: @"Loaded Files"];
// [loadedFilesButton setImage: IMAGE(@"Files")];
[loadedFilesButton setImage: IMAGE(@"ProjectCenter_files")];
[loadedFilesButton setTarget: self];
[loadedFilesButton setAction: @selector(showLoadedFilesView:)];
[loadedFilesButton setAutoresizingMask: (NSViewMaxXMargin
| NSViewMinYMargin)];
[loadedFilesButton setButtonType: NSMomentaryPushButton];
// [loadedFilesButton setEnabled:NO];
[_c_view addSubview: loadedFilesButton];
[loadedFilesButton setShowTooltip:YES];
RELEASE (loadedFilesButton);
findButton = [[PCButton alloc] initWithFrame: NSMakeRect(208,390,50,50)];
[findButton setTitle: @"Project Find"];
// [findButton setImage: IMAGE(@"Find")];
[findButton setImage: IMAGE(@"ProjectCenter_find")];
[findButton setTarget: self];
[findButton setAction: @selector(showFindView:)];
[findButton setAutoresizingMask: (NSViewMaxXMargin | NSViewMinYMargin)];
[findButton setButtonType: NSMomentaryPushButton];
// [findButton setEnabled:NO];
[_c_view addSubview: findButton];
[findButton setShowTooltip:YES];
RELEASE (findButton);
inspectorButton = [[PCButton alloc] initWithFrame: NSMakeRect(258,390,50,50)];
[inspectorButton setTitle: @"Inspector"];
// [inspectorButton setImage: IMAGE(@"Inspector")];
[inspectorButton setImage: IMAGE(@"ProjectCenter_settings")];
[inspectorButton setTarget: self];
[inspectorButton setAction: @selector(showInspector:)];
@ -157,12 +151,10 @@
/*
* File icon and title
*/
fileIcon = [[NSButton alloc] initWithFrame: NSMakeRect (504,391,48,48)];
[fileIcon setBordered:NO];
[fileIcon setEnabled:NO];
fileIcon = [[NSImageView alloc] initWithFrame: NSMakeRect (504,391,48,48)];
[fileIcon setAutoresizingMask: (NSViewMinXMargin | NSViewMinYMargin)];
[fileIcon setImagePosition: NSImageOnly];
[fileIcon setImage: IMAGE (@"projectSuitcase")];
// [fileIcon setImage: IMAGE (@"projectSuitcase")];
[fileIcon setImage: IMAGE (@"ProjectCenter")];
[_c_view addSubview: fileIcon];
RELEASE (fileIcon);
@ -546,91 +538,111 @@
- (void)setFileIcon:(NSNotification *)notification
{
id object = [notification object];
NSString *path = [object pathOfSelectedFile];
NSArray *pathComps = [path pathComponents];
NSString *lastComp = [path lastPathComponent];
NSString *extension = [[lastComp componentsSeparatedByString:@"."] lastObject];
NSString *path = nil;
NSArray *pathComponents = nil;
NSString *lastComponent = nil;
NSString *fileExtension = nil;
NSString *iconName = nil;
NSImage *icon = nil;
// Notification from other project
if (object != [self browserController])
{
return;
}
path = [object pathOfSelectedFile];
pathComponents = [path pathComponents];
lastComponent = [path lastPathComponent];
fileExtension = [[lastComponent componentsSeparatedByString:@"."] lastObject];
// Should be provided by PC*Proj bundles
if ([[object selectedFiles] count] > 1
&& [pathComps count] > 2)
if ([[object selectedFiles] count] > 1 && [pathComponents count] > 2)
{
[fileIcon setImage: IMAGE (@"MultipleSelection")];
iconName = [[NSString alloc] initWithString:@"MultipleSelection"];
}
else if ([lastComp isEqualToString: @"/"])
else if ([lastComponent isEqualToString: @"/"])
{
[fileIcon setImage: IMAGE (@"projectSuitcase")];
iconName = [[NSString alloc] initWithString:@"projectSuitcase"];
}
else if ([lastComp isEqualToString: @"Classes"])
else if ([lastComponent isEqualToString: @"Classes"])
{
[fileIcon setImage: IMAGE (@"classSuitcase")];
iconName = [[NSString alloc] initWithString:@"classSuitcase"];
}
else if ([lastComp isEqualToString: @"Headers"])
else if ([lastComponent isEqualToString: @"Headers"])
{
[fileIcon setImage: IMAGE (@"headerSuitcase")];
iconName = [[NSString alloc] initWithString:@"headerSuitcase"];
}
else if ([lastComp isEqualToString: @"Other Sources"])
else if ([lastComponent isEqualToString: @"Other Sources"])
{
[fileIcon setImage: IMAGE (@"genericSuitcase")];
iconName = [[NSString alloc] initWithString:@"genericSuitcase"];
}
else if ([lastComp isEqualToString: @"Interfaces"])
else if ([lastComponent isEqualToString: @"Interfaces"])
{
[fileIcon setImage: IMAGE (@"nibSuitcase")];
iconName = [[NSString alloc] initWithString:@"nibSuitcase"];
}
else if ([lastComp isEqualToString: @"Images"])
else if ([lastComponent isEqualToString: @"Images"])
{
[fileIcon setImage: IMAGE (@"iconSuitcase")];
iconName = [[NSString alloc] initWithString:@"iconSuitcase"];
}
else if ([lastComp isEqualToString: @"Other Resources"])
else if ([lastComponent isEqualToString: @"Other Resources"])
{
[fileIcon setImage: IMAGE (@"otherSuitcase")];
iconName = [[NSString alloc] initWithString:@"otherSuitcase"];
}
else if ([lastComp isEqualToString: @"Subprojects"])
else if ([lastComponent isEqualToString: @"Subprojects"])
{
[fileIcon setImage: IMAGE (@"subprojectSuitcase")];
iconName = [[NSString alloc] initWithString:@"subprojectSuitcase"];
}
else if ([lastComp isEqualToString: @"Documentation"])
else if ([lastComponent isEqualToString: @"Documentation"])
{
[fileIcon setImage: IMAGE (@"helpSuitcase")];
iconName = [[NSString alloc] initWithString:@"helpSuitcase"];
}
else if ([lastComp isEqualToString: @"Supporting Files"])
else if ([lastComponent isEqualToString: @"Supporting Files"])
{
[fileIcon setImage: IMAGE (@"genericSuitcase")];
iconName = [[NSString alloc] initWithString:@"genericSuitcase"];
}
else if ([lastComp isEqualToString: @"Libraries"])
else if ([lastComponent isEqualToString: @"Libraries"])
{
[fileIcon setImage: IMAGE (@"librarySuitcase")];
iconName = [[NSString alloc] initWithString:@"librarySuitcase"];
}
else if ([lastComp isEqualToString: @"Non Project Files"])
else if ([lastComponent isEqualToString: @"Non Project Files"])
{
[fileIcon setImage: IMAGE (@"projectSuitcase")];
iconName = [[NSString alloc] initWithString:@"projectSuitcase"];
}
if (iconName != nil)
{
icon = IMAGE(iconName);
RELEASE(iconName);
}
else if (fileExtension != nil && ![fileExtension isEqualToString:@""])
{
icon = [[NSWorkspace sharedWorkspace] iconForFile:lastComponent];
}
// Set icon to Project Window and Project Inspector
if (icon != nil)
{
[fileIcon setImage:icon];
// Set icon in Inspector "File Attributes". Should not be here!
[fileIconView setImage:icon];
}
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
&& [pathComps count] > 2)
if ([[object selectedFiles] count] > 1 && [pathComponents count] > 2)
{
[fileIconTitle setStringValue:
[NSString stringWithFormat:
@"%i files", [[object selectedFiles] count]]];
[fileNameField setStringValue:@"Multiple files selected"];
}
else
{
[fileIconTitle setStringValue:lastComp];
[fileIconTitle setStringValue:lastComponent];
[fileNameField setStringValue:lastComponent];
}
}

View file

@ -119,6 +119,7 @@ static NSString * const PCBuildTool = @"BUILDTOOL";
@class PCProjectDebugger;
@class PCProjectEditor;
@class PCEditorController;
@class PCButton;
#ifndef GNUSTEP_BASE_VERSION
@protocol ProjectBuilder;
@ -140,16 +141,16 @@ static NSString * const PCBuildTool = @"BUILDTOOL";
PCEditorController *editorController;
NSBox *box;
NSButton *fileIcon;
NSImageView *fileIcon;
NSTextField *fileIconTitle;
id projectAttributeInspectorView;
NSTextField *ccOptField;
NSTextField *ldOptField;
NSTextField *installPathField;
NSTextField *toolField;
NSTextField *headersField;
NSTextField *libsField;
id projectAttributeInspectorView;
NSTextField *ccOptField;
NSTextField *ldOptField;
NSTextField *installPathField;
NSTextField *toolField;
NSTextField *headersField;
NSTextField *libsField;
id projectProjectInspectorView;
NSTextField *projectTypeField;

View file

@ -63,18 +63,21 @@
if ((self = [self init]))
{
if ([[path lastPathComponent] isEqualToString:@"PC.project"]) {
projectPath = [[path stringByDeletingLastPathComponent] copy];
}
else {
projectPath = [path copy];
}
if ([[path lastPathComponent] isEqualToString:@"PC.project"])
{
projectPath = [[path stringByDeletingLastPathComponent] copy];
}
else
{
projectPath = [path copy];
}
if(![self assignProjectDict:dict]) {
NSLog(@"<%@ %x>: could not load the project...",[self class],self);
[self autorelease];
return nil;
}
if(![self assignProjectDict:dict])
{
NSLog(@"<%@ %x>: could not load the project...",[self class],self);
[self autorelease];
return nil;
}
}
return self;
}
@ -101,6 +104,8 @@
RELEASE(projectProjectInspectorView);
RELEASE(projectFileInspectorView);
[[NSNotificationCenter defaultCenter] removeObserver:self];
[super dealloc];
}
@ -492,7 +497,9 @@
// Update the interface
[self updateValuesFromProjectDict];
[[NSNotificationCenter defaultCenter] postNotificationName:@"ProjectDictDidChangeNotification" object:self];
[[NSNotificationCenter defaultCenter]
postNotificationName:@"ProjectDictDidChangeNotification"
object:self];
return YES;
}

View file

@ -74,6 +74,7 @@ NSString *SavePeriodDidChangeNotification = @"SavePeriodDidChangeNotification";
[prefPopup setTarget: self];
[prefPopup setAction: @selector (popupChanged:)];
[_c_view addSubview: prefPopup];
RELEASE(prefPopup);
line = [[NSBox alloc] init];
[line setTitlePosition: NSNoTitle];
@ -86,6 +87,7 @@ NSString *SavePeriodDidChangeNotification = @"SavePeriodDidChangeNotification";
[prefEmptyView setFrameFromContentFrame: NSMakeRect(0,0,270,312)];
[prefEmptyView setBorderType: NSNoBorder];
[_c_view addSubview: prefEmptyView];
RELEASE(prefEmptyView);
/*
* Building view
@ -119,6 +121,7 @@ NSString *SavePeriodDidChangeNotification = @"SavePeriodDidChangeNotification";
[successField setTarget: self];
[successField setAction: @selector (setSuccessSound:)];
[v addSubview: successField];
RELEASE(successField);
textField = [[NSTextField alloc] initWithFrame: NSMakeRect(0,16,54,21)];
[textField setAlignment: NSRightTextAlignment];
@ -139,8 +142,9 @@ NSString *SavePeriodDidChangeNotification = @"SavePeriodDidChangeNotification";
[failureField setTarget: self];
[failureField setAction: @selector (setFailureSound:)];
[v addSubview: failureField];
RELEASE(failureField);
promptOnClean = [[NSButton alloc] initWithFrame: NSMakeRect(72,176,108,15)];
promptOnClean = [[NSButton alloc] initWithFrame: NSMakeRect(72,170,108,21)];
[promptOnClean setTitle: @"Prompt on clean"];
[promptOnClean setButtonType: NSSwitchButton];
[promptOnClean setBordered: NO];
@ -150,6 +154,7 @@ NSString *SavePeriodDidChangeNotification = @"SavePeriodDidChangeNotification";
[promptOnClean setContinuous: NO];
[prefBuildingView addSubview: promptOnClean];
[promptOnClean sizeToFit];
RELEASE(promptOnClean);
/*
* Saving view
@ -172,6 +177,7 @@ NSString *SavePeriodDidChangeNotification = @"SavePeriodDidChangeNotification";
[saveOnQuit setContinuous: NO];
[v addSubview: saveOnQuit];
[saveOnQuit sizeToFit];
RELEASE(saveOnQuit);
saveAutomatically=[[NSButton alloc] initWithFrame: NSMakeRect (24,32,124,15)];
[saveAutomatically setTitle: @"Save Project Automatically"];
@ -182,6 +188,7 @@ NSString *SavePeriodDidChangeNotification = @"SavePeriodDidChangeNotification";
[saveAutomatically setContinuous: NO];
[v addSubview: saveAutomatically];
[saveAutomatically sizeToFit];
RELEASE(saveAutomatically);
keepBackup = [[NSButton alloc] initWithFrame: NSMakeRect (24,12,124,15)];
[keepBackup setTitle: @"Keep Project Backup"];
@ -192,6 +199,7 @@ NSString *SavePeriodDidChangeNotification = @"SavePeriodDidChangeNotification";
[keepBackup setContinuous: NO];
[v addSubview: keepBackup];
[keepBackup sizeToFit];
RELEASE(keepBackup);
v = [[NSBox alloc] initWithFrame: NSMakeRect(5,149,254,49)];
[v setTitle: @"Auto-Save"];
@ -217,6 +225,7 @@ NSString *SavePeriodDidChangeNotification = @"SavePeriodDidChangeNotification";
[autoSaveField setTarget:self];
[autoSaveField setAction:@selector(setSavePeriod:)];
[v addSubview:autoSaveField];
RELEASE(autoSaveField);
/*
* Editing view
@ -302,6 +311,7 @@ NSString *SavePeriodDidChangeNotification = @"SavePeriodDidChangeNotification";
[editorField setTarget:self];
[editorField setAction:@selector(setEditor:)];
[v addSubview:editorField];
RELEASE(editorField);
// Compiler
textField = [[NSTextField alloc] initWithFrame:NSMakeRect(12,40,60,21)];
@ -323,6 +333,7 @@ NSString *SavePeriodDidChangeNotification = @"SavePeriodDidChangeNotification";
[compilerField setTarget:self];
[compilerField setAction:@selector(setCompiler:)];
[v addSubview:compilerField];
RELEASE(compilerField);
// Debugger
textField = [[NSTextField alloc] initWithFrame:NSMakeRect(12,64,60,21)];
@ -344,6 +355,7 @@ NSString *SavePeriodDidChangeNotification = @"SavePeriodDidChangeNotification";
[debuggerField setTarget:self];
[debuggerField setAction:@selector(setDebugger:)];
[v addSubview:debuggerField];
RELEASE(debuggerField);
// Bundles Box
v = [[NSBox alloc] initWithFrame: NSMakeRect(5,131,254,48)];
@ -361,6 +373,7 @@ NSString *SavePeriodDidChangeNotification = @"SavePeriodDidChangeNotification";
[bundlePathField setTarget:self];
[bundlePathField setAction:@selector(setBundlePath:)];
[v addSubview:bundlePathField];
RELEASE(bundlePathField);
/*
* Interface view
@ -384,6 +397,7 @@ NSString *SavePeriodDidChangeNotification = @"SavePeriodDidChangeNotification";
[separateBuilder setAction: @selector (setDisplayPanels:)];
[separateBuilder setContinuous: NO];
[v addSubview: separateBuilder];
RELEASE(separateBuilder);
separateLauncher = [[NSButton alloc] initWithFrame: NSMakeRect(48,27,124,21)];
[separateLauncher setTitle: @"Project Launcher"];
@ -394,6 +408,7 @@ NSString *SavePeriodDidChangeNotification = @"SavePeriodDidChangeNotification";
[separateLauncher setAction: @selector (setDisplayPanels:)];
[separateLauncher setContinuous: NO];
[v addSubview: separateLauncher];
RELEASE(separateLauncher);
separateEditor = [[NSButton alloc] initWithFrame: NSMakeRect(48,6,124,21)];
[separateEditor setTitle: @"Project Editor"];
@ -404,6 +419,7 @@ NSString *SavePeriodDidChangeNotification = @"SavePeriodDidChangeNotification";
[separateEditor setAction: @selector (setDisplayPanels:)];
[separateEditor setContinuous: NO];
[v addSubview: separateEditor];
RELEASE(separateEditor);
// Some buttons
v = [[NSBox alloc] initWithFrame: NSMakeRect(5,121,254,77)];
@ -421,6 +437,7 @@ NSString *SavePeriodDidChangeNotification = @"SavePeriodDidChangeNotification";
[promptWhenQuit setContinuous: NO];
[v addSubview: promptWhenQuit];
[promptWhenQuit sizeToFit];
RELEASE(promptWhenQuit);
useExternalEditor = [[NSButton alloc] initWithFrame:NSMakeRect(48,28,204,21)];
[useExternalEditor setTitle: @"Use external Editor"];
@ -432,6 +449,7 @@ NSString *SavePeriodDidChangeNotification = @"SavePeriodDidChangeNotification";
[useExternalEditor setContinuous: NO];
[v addSubview: useExternalEditor];
[useExternalEditor sizeToFit];
RELEASE(useExternalEditor);
}
@end
@ -455,28 +473,12 @@ NSString *SavePeriodDidChangeNotification = @"SavePeriodDidChangeNotification";
RELEASE(preferencesDict);
RELEASE(prefWindow);
RELEASE(prefPopup);
RELEASE(prefEmptyView);
RELEASE(prefBuildingView);
RELEASE(prefMiscView);
RELEASE(prefEditingView);
RELEASE(prefSavingView);
RELEASE(useExternalEditor);
RELEASE(promptWhenQuit);
RELEASE(promptOnClean);
RELEASE(saveOnQuit);
RELEASE(saveAutomatically);
RELEASE(keepBackup);
RELEASE(editorField);
RELEASE(debuggerField);
RELEASE(compilerField);
RELEASE(bundlePathField);
RELEASE(autoSaveField);
[[NSUserDefaults standardUserDefaults] synchronize];
[super dealloc];
@ -595,25 +597,25 @@ NSString *SavePeriodDidChangeNotification = @"SavePeriodDidChangeNotification";
- (void)popupChanged:(id)sender
{
NSView *view = nil;
switch([sender indexOfSelectedItem])
{
case 0:
view = [prefBuildingView retain];
break;
case 1:
view = [prefSavingView retain];
break;
case 2:
view = [prefEditingView retain];
break;
case 3:
view = [prefMiscView retain];
break;
case 4:
view = [prefInterfaceView retain];
break;
}
switch ([sender indexOfSelectedItem])
{
case 0:
view = prefBuildingView;
break;
case 1:
view = prefSavingView;
break;
case 2:
view = prefEditingView;
break;
case 3:
view = prefMiscView;
break;
case 4:
view = prefInterfaceView;
break;
}
[(NSBox *)prefEmptyView setContentView:view];
[prefEmptyView display];