Compare commits

...

21 commits

Author SHA1 Message Date
Sergii Stoian
315dbbdac8 Move RELEASE_0_3_5 from branch to tag
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/tags/RELEASE_0_3_5@24261 72102866-910b-0410-8b05-ffd578937521
2006-12-26 17:18:04 +00:00
Philippe C.D. Robert
237bddc7c0 Added missing includes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/branches/RELEASE_0_3_5@17181 72102866-910b-0410-8b05-ffd578937521
2003-07-10 10:23:01 +00:00
Philippe C.D. Robert
9ac2953aa4 Note about Cocoa
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/branches/RELEASE_0_3_5@17180 72102866-910b-0410-8b05-ffd578937521
2003-07-10 10:01:57 +00:00
Philippe C.D. Robert
19b89600cc Disabling unused menu entries and some spelling corrections
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/branches/RELEASE_0_3_5@17179 72102866-910b-0410-8b05-ffd578937521
2003-07-10 09:06:45 +00:00
Philippe C.D. Robert
f10b31b9f2 Order of authors
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/branches/RELEASE_0_3_5@17148 72102866-910b-0410-8b05-ffd578937521
2003-07-05 18:23:04 +00:00
Philippe C.D. Robert
2bef7a4f38 Adjusting UI elements and cleaned up code.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/branches/RELEASE_0_3_5@17147 72102866-910b-0410-8b05-ffd578937521
2003-07-05 18:20:00 +00:00
Philippe C.D. Robert
19fa93e907 Changed menu title to ProjectCenter
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/branches/RELEASE_0_3_5@17146 72102866-910b-0410-8b05-ffd578937521
2003-07-05 18:06:38 +00:00
Philippe C.D. Robert
f0d4ffafe3 Updated library version and added missing file to project!!!
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/branches/RELEASE_0_3_5@17145 72102866-910b-0410-8b05-ffd578937521
2003-07-05 18:03:10 +00:00
Philippe C.D. Robert
b039879a2e typo...
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/branches/RELEASE_0_3_5@17144 72102866-910b-0410-8b05-ffd578937521
2003-07-05 17:57:28 +00:00
Philippe C.D. Robert
1c03399004 Updated contact address
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/branches/RELEASE_0_3_5@17143 72102866-910b-0410-8b05-ffd578937521
2003-07-05 17:54:44 +00:00
Philippe C.D. Robert
25700123ca Added proper file header
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/branches/RELEASE_0_3_5@17142 72102866-910b-0410-8b05-ffd578937521
2003-07-05 17:53:02 +00:00
Philippe C.D. Robert
ac0a026e9a Some code cleanup
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/branches/RELEASE_0_3_5@17141 72102866-910b-0410-8b05-ffd578937521
2003-07-05 17:47:52 +00:00
Philippe C.D. Robert
c7c4216793 Extracting UI creation into category and minor bug fixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/branches/RELEASE_0_3_5@17140 72102866-910b-0410-8b05-ffd578937521
2003-07-05 16:43:46 +00:00
Philippe C.D. Robert
e507242ccc Disabling unused menu entries using defines.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/branches/RELEASE_0_3_5@17139 72102866-910b-0410-8b05-ffd578937521
2003-07-05 16:30:28 +00:00
Philippe C.D. Robert
e0a9d0c368 Extracting UI creation, general code cleanup
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/branches/RELEASE_0_3_5@17138 72102866-910b-0410-8b05-ffd578937521
2003-07-05 16:11:16 +00:00
Philippe C.D. Robert
ca59ec7a21 Corrected contact address
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/branches/RELEASE_0_3_5@17133 72102866-910b-0410-8b05-ffd578937521
2003-07-05 15:03:14 +00:00
Philippe C.D. Robert
31936addc4 Code cleanup and corrected contact address
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/branches/RELEASE_0_3_5@17132 72102866-910b-0410-8b05-ffd578937521
2003-07-05 15:00:12 +00:00
Philippe C.D. Robert
d30a3a7a3e Adjusting UI elements
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/branches/RELEASE_0_3_5@17130 72102866-910b-0410-8b05-ffd578937521
2003-07-05 12:46:49 +00:00
Philippe C.D. Robert
7141180f32 Using uppercase string for key comparison
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/branches/RELEASE_0_3_5@17126 72102866-910b-0410-8b05-ffd578937521
2003-07-05 11:58:52 +00:00
Philippe C.D. Robert
f731660180 Added the contributions file to this branch
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/branches/RELEASE_0_3_5@17120 72102866-910b-0410-8b05-ffd578937521
2003-07-05 09:58:12 +00:00
GNUstep Maintainer
b368aa668f This commit was manufactured by cvs2svn to create branch
'RELEASE_0_3_5'.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/branches/RELEASE_0_3_5@17119 72102866-910b-0410-8b05-ffd578937521
2003-07-04 20:30:37 +00:00
66 changed files with 1194 additions and 867 deletions

View file

@ -30,7 +30,7 @@ information regarding GNUstep resources <http://www.gnustep.org/>
Where can you get it? How can you compile it?
==============================================
You can download sources and rpms (for some machines) from
You can download the sources from
ftp://ftp.gnustep.org/pub/gnustep/dev-apps/.
Where do I send bug reports?

View file

@ -1,4 +1,32 @@
2003-07-10 Philippe C.D. Robert <probert@siggraph.org>
* Added missing includes: PCLib/PCDataSource.m, PCLib/PCButton.m
* Added note in README about using ProjectCenter with Cocoa
* Disabled unused menu entries: ProjectCenter_main.m
* Some spelling corrections: PCMenuController.m
2003-07-05 Philippe C.D. Robert <probert@siggraph.org>
* Uppercase key for interface category lookup: PCFileManager.m
* Adjusting UI elements: PCGormProject.m
* Adding proper header: PCLib/PCButton.h, PCLib/PCButton.m
* Code cleanup and corrected contact address: PCInfoController.m,
PCInfoController.h, PCLogController.m, PCLogController.h,
PCAppController.h, PCAppController.m, PCFindController.h,
PCFindController.m, PCMenuController.h, PCMenuController.m,
PCPrefController.m, PCPrefController.h PCLib/PCBundleLoader.m,
PCLib/PCDataSource.h, PCLib/PCDataSource.m
* Extracting UI creation into category: PCPrefController+UInterface.h,
PCPrefController+UInterface.m, PCPrefController.m, PCPrefController.h,
PCLib/PCProjectDebugger+UInterface.h, PCLib/PCProjectDebugger.h,
PCLib/PCProjectDebugger+UInterface.m, PCLib/PCProjectDebugger.m
* Disabling unused menu entries using defines: ProjectCenter_main.m
* Added missing files to project: PCLib/PCButton.h, PCLib/PCButton.m
* Updated version for PCLib: PCLib/Version
* Changed menu title to ProjectCenter: ProjectCenter_main.m
* Adjusting UI elements and cleaned up code: PCRenaissanceProject.m
2003-07-04 Philippe C.D. Robert <probert@siggraph.org>
* Updated TODO, ANNOUNCE, README and INSTALL files

0
Framework/Resources/.gitignore vendored Normal file
View file

View file

@ -88,7 +88,8 @@ PCFindController.h \
PCInfoController.h \
PCLogController.h \
PCMenuController.h \
PCPrefController.h
PCPrefController.h \
PCPrefController+UInterface.h
#
# Class files
@ -101,6 +102,7 @@ PCInfoController.m \
PCLogController.m \
PCMenuController.m \
PCPrefController.m \
PCPrefController+UInterface.m \
ProjectCenter_main.m
#
@ -115,3 +117,4 @@ include $(GNUSTEP_MAKEFILES)/aggregate.make
include $(GNUSTEP_MAKEFILES)/application.make
-include GNUmakefile.postamble

View file

@ -3,7 +3,7 @@
#
# Copyright (C) 2001 Free Software Foundation, Inc.
#
# Author: Philippe C.D. Robert <prh@3dkit.org>
# Author: Philippe C.D. Robert <probert@siggraph.org>
#
# This file is part of GNUstep
#

View file

@ -3,7 +3,7 @@
#
# Copyright (C) 2001 Free Software Foundation, Inc.
#
# Author: Philippe C.D. Robert <prh@3dkit.org>
# Author: Philippe C.D. Robert <probert@siggraph.org>
#
# This file is part of GNUstep
#

View file

@ -2,7 +2,7 @@
#
# Copyright (C) 2001 Free Software Foundation, Inc.
#
# Author: Philippe C.D. Robert <prh@3dkit.org>
# Author: Philippe C.D. Robert <probert@siggraph.org>
#
# This file is part of GNUstep
#

0
Headers/.gitignore vendored Normal file
View file

0
Headers/ProjectCenter/.gitignore vendored Normal file
View file

0
Headers/Protocols/.gitignore vendored Normal file
View file

0
Images/.gitignore vendored Normal file
View file

0
Library/.gitignore vendored Normal file
View file

0
Modules/.gitignore vendored Normal file
View file

0
Modules/ApplicationProject/.gitignore vendored Normal file
View file

View file

View file

0
Modules/BundleProject/.gitignore vendored Normal file
View file

0
Modules/LibraryProject/.gitignore vendored Normal file
View file

0
Modules/RenaissanceProject/.gitignore vendored Normal file
View file

View file

0
Modules/ToolProject/.gitignore vendored Normal file
View file

View file

@ -3,7 +3,7 @@
Copyright (C) 2001 Free Software Foundation
Author: Philippe C.D. Robert <phr@3dkit.org>
Author: Philippe C.D. Robert <probert@siggraph.org>
This file is part of GNUstep.

View file

@ -3,7 +3,7 @@
Copyright (C) 2001 Free Software Foundation
Author: Philippe C.D. Robert <phr@3dkit.org>
Author: Philippe C.D. Robert <probert@siggraph.org>
This file is part of GNUstep.
@ -80,19 +80,17 @@
{
if ((self = [super init]))
{
// The bundle loader
bundleLoader = [[PCBundleLoader alloc] init];
[bundleLoader setDelegate:self];
// They are registered by the bundleLoader
projectTypes = [[NSMutableDictionary alloc] init];
prefController = [[PCPrefController alloc] init];
finder = [[PCFindController alloc] init];
finder = [[PCFindController alloc] init];
infoController = [[PCInfoController alloc] init];
logger = [[PCLogController alloc] init];
logger = [[PCLogController alloc] init];
projectManager = [[PCProjectManager alloc] init];
fileManager = [PCFileManager fileManager];
fileManager = [PCFileManager fileManager];
menuController = [[PCMenuController alloc] init];
[projectManager setDelegate:self];
@ -109,22 +107,22 @@
- (void)dealloc
{
if (doConnection)
{
[doConnection invalidate];
[doConnection release];
}
{
[doConnection invalidate];
RELEASE(doConnection);
}
[prefController release];
[finder release];
[infoController release];
[logger release];
[projectManager release];
[fileManager release];
[menuController release];
RELEASE(prefController);
RELEASE(finder);
RELEASE(infoController);
RELEASE(logger);
RELEASE(projectManager);
RELEASE(fileManager);
RELEASE(menuController);
[bundleLoader release];
[doServer release];
[projectTypes release];
RELEASE(bundleLoader);
RELEASE(doServer);
RELEASE(projectTypes);
[super dealloc];
}
@ -242,11 +240,9 @@
{
NSString *h = [[NSProcessInfo processInfo] hostName];
NSString *connectionName = [NSString stringWithFormat:@"ProjectCenter:%@",h];
[logger logMessage:@"Loading additional subsystems..." tag:INFORMATION];
//[bundleLoader loadBundles];
// The DO server
doServer = [[PCServer alloc] init];
NS_DURING
@ -256,10 +252,14 @@
NS_HANDLER
NSRunAlertPanel(@"Warning!",@"Could not register the DO connection %@",@"OK",nil,nil,nil,connectionName);
NSRunAlertPanel(@"Warning!",@"Could not register the DO connection %@",
@"OK",nil,nil,nil,connectionName);
NS_ENDHANDLER
[[NSNotificationCenter defaultCenter] addObserver:doServer selector:@selector(connectionDidDie:) name:NSConnectionDidDieNotification object:doConnection];
[[NSNotificationCenter defaultCenter] addObserver:doServer
selector:@selector(connectionDidDie:)
name:NSConnectionDidDieNotification
object:doConnection];
[doConnection setDelegate:doServer];
@ -292,9 +292,8 @@
- (void)applicationWillTerminate:(NSNotification *)notification
{
// [[PCLogController sharedController] logMessageWithTag:INFORMATION object:self format:@"ProjectCenter is going down..."];
if ([[[NSUserDefaults standardUserDefaults] stringForKey:DeleteCacheWhenQuitting] isEqualToString:@"YES"]) {
if ([[[NSUserDefaults standardUserDefaults] stringForKey:DeleteCacheWhenQuitting] isEqualToString:@"YES"])
{
[[NSFileManager defaultManager] removeFileAtPath:[projectManager rootBuildPath] handler:nil];
}
@ -312,18 +311,20 @@
NSAssert(aBundle,@"No valid bundle!");
principalClass = [aBundle principalClass];
if ([principalClass conformsToProtocol:@protocol(ProjectType)]) {
if ([principalClass conformsToProtocol:@protocol(ProjectType)])
{
NSString *name = [[principalClass sharedCreator] projectTypeName];
[logger logMessage:[NSString stringWithFormat:@"Project type %@ successfully loaded!",name] tag:INFORMATION];
if ([self registerProjectCreator:NSStringFromClass(principalClass) forKey:name]) {
if ([self registerProjectCreator:NSStringFromClass(principalClass) forKey:name])
{
[menuController addProjectTypeNamed:name];
[logger logMessage:[NSString stringWithFormat:@"Project type %@ successfully registered!",name] tag:INFORMATION];
}
}
else if ([principalClass conformsToProtocol:@protocol(FileCreator)]) {
else if ([principalClass conformsToProtocol:@protocol(FileCreator)])
{
[fileManager registerCreatorsWithObjectsAndKeys:[[principalClass sharedCreator] creatorDictionary]];
// In objc.h there is already th like (char *)name...
@ -337,7 +338,8 @@
- (BOOL)registerProjectCreator:(NSString *)className forKey:(NSString *)aKey
{
if ([projectTypes objectForKey:aKey]) {
if ([projectTypes objectForKey:aKey])
{
return NO;
}

View file

@ -3,7 +3,7 @@
Copyright (C) 2001 Free Software Foundation
Author: Philippe C.D. Robert <phr@3dkit.org>
Author: Philippe C.D. Robert <probert@siggraph.org>
This file is part of GNUstep.
@ -31,7 +31,6 @@
@interface PCFindController : NSObject
{
}
@end

View file

@ -3,7 +3,7 @@
Copyright (C) 2001 Free Software Foundation
Author: Philippe C.D. Robert <phr@3dkit.org>
Author: Philippe C.D. Robert <probert@siggraph.org>
This file is part of GNUstep.

View file

@ -39,12 +39,13 @@
- (void)_initUI
{
NSTextField *textField;
NSRect frame = {{84,120}, {80, 80}};
NSBox *_box;
NSRect frame = {{84,120}, {80, 80}};
NSBox *_iconViewBox;
NSBox *_appIconBox;
[super _initUI];
textField =[[NSTextField alloc] initWithFrame:NSMakeRect(16,256,64,21)];
textField = [[NSTextField alloc] initWithFrame:NSMakeRect(4,248,104,21)];
[textField setAlignment: NSRightTextAlignment];
[textField setBordered: NO];
[textField setEditable: NO];
@ -54,7 +55,7 @@
[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];
@ -65,6 +66,7 @@
[appClassField setAction:@selector(setAppClass:)];
[projectProjectInspectorView addSubview:appClassField];
#if 0
textField =[[NSTextField alloc] initWithFrame:NSMakeRect(16,204,64,21)];
[textField setAlignment: NSRightTextAlignment];
[textField setBordered: NO];
@ -109,6 +111,52 @@
RELEASE(setAppIconButton);
RELEASE(clearAppIconButton);
RELEASE(appIconView);
#else
// 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: YES];
[appImageField setBezeled: YES];
[appImageField setDrawsBackground: YES];
[appImageField setStringValue:@""];
[_appIconBox addSubview:appImageField];
RELEASE(appImageField);
setAppIconButton = [[NSButton alloc] initWithFrame:NSMakeRect(147,0,48,21)];
[setAppIconButton setTitle:@"Set..."];
[setAppIconButton setTarget:self];
[setAppIconButton setAction:@selector(setAppIcon:)];
[_appIconBox addSubview:setAppIconButton];
RELEASE(setAppIconButton);
clearAppIconButton = [[NSButton alloc] initWithFrame:NSMakeRect(95,0,48,21)];
[clearAppIconButton setTitle:@"Clear"];
[clearAppIconButton setTarget:self];
[clearAppIconButton setAction:@selector(clearAppIcon:)];
[_appIconBox addSubview:clearAppIconButton];
RELEASE(clearAppIconButton);
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];
[_iconViewBox addSubview:appIconView];
RELEASE(appIconView);
#endif
}
@end

Binary file not shown.

View file

@ -3,7 +3,7 @@
Copyright (C) 2001 Free Software Foundation
Author: Philippe C.D. Robert <phr@3dkit.org>
Author: Philippe C.D. Robert <probert@siggraph.org>
This file is part of GNUstep.

View file

@ -3,7 +3,7 @@
Copyright (C) 2001 Free Software Foundation
Author: Philippe C.D. Robert <phr@3dkit.org>
Author: Philippe C.D. Robert <probert@siggraph.org>
This file is part of GNUstep.
@ -27,10 +27,6 @@
#include "PCInfoController.h"
#include <ProjectCenter/ProjectCenter.h>
#if defined(GNUSTEP)
#include <AppKit/IMLoading.h>
#endif
@implementation PCInfoController
- (id)init
@ -38,21 +34,22 @@
if ((self = [super init])) {
NSString *file;
file = [[NSBundle mainBundle]
pathForResource:@"Info-gnustep"
ofType:@"plist"];
file = [[NSBundle mainBundle] pathForResource:@"Info-gnustep"
ofType:@"plist"];
infoDict = [NSDictionary dictionaryWithContentsOfFile:file];
[infoDict retain];
RETAIN(infoDict);
}
return self;
}
- (void)dealloc
{
[infoDict release];
RELEASE(infoDict);
if (infoWindow) {
[infoWindow release];
if (infoWindow)
{
RELEASE(infoWindow);
}
[super dealloc];

View file

@ -10,7 +10,6 @@
include $(GNUSTEP_MAKEFILES)/common.make
include Version
GNUSTEP_INSTALLATION_DIR = $(GNUSTEP_SYSTEM_ROOT)
#
@ -45,7 +44,6 @@ libProjectCenter_LIBRARIES_DEPEND_UPON += -lgnustep-gui
#
libProjectCenter_HEADER_FILES= \
PCButton.h \
PCBrowserController.h \
PCBundleLoader.h \
PCDataSource.h \
@ -79,14 +77,15 @@ PCEditor+UInterface.h \
PCFileManager+UInterface.h \
PCProjectManager+UInterface.h \
PCProject+UInterface.h \
PCTextFinder+UInterface.h
PCTextFinder+UInterface.h \
PCProjectDebugger+UInterface.h \
PCButton.h
#
# Class files
#
libProjectCenter_OBJC_FILES= \
PCButton.m \
PCBrowserController.m \
PCBundleLoader.m \
PCDataSource.m \
@ -110,7 +109,9 @@ PCEditor+UInterface.m \
PCFileManager+UInterface.m \
PCProjectManager+UInterface.m \
PCProject+UInterface.m \
PCTextFinder+UInterface.m
PCTextFinder+UInterface.m \
PCProjectDebugger+UInterface.m \
PCButton.m
#
# C files

View file

@ -3,7 +3,7 @@
#
# Copyright (C) 2001 Free Software Foundation, Inc.
#
# Author: Philippe C.D. Robert <prh@3dkit.org>
# Author: Philippe C.D. Robert <probert@siggraph.org>
#
# This file is part of GNUstep
#

View file

@ -2,7 +2,7 @@
#
# Copyright (C) 2001 Free Software Foundation, Inc.
#
# Author: Philippe C.D. Robert <prh@3dkit.org>
# Author: Philippe C.D. Robert <probert@siggraph.org>
#
# This file is part of GNUstep
#

View file

@ -28,7 +28,7 @@
#define _PCBUNDLELOADER_H
/*
Descriotion:
Description:
PCBundleLoader loads all PC bundles from all the paths that are stored in the
defaults under the key BundlePaths.

View file

@ -85,7 +85,7 @@
- (void)dealloc
{
[loadedBundles release];
RELEASE(loadedBundles);
[super dealloc];
}

View file

@ -1,4 +1,28 @@
/**/
/*
* GNUstep ProjectCenter - http://www.gnustep.org
*
* Copyright (C) 2003 Free Software Foundation
*
* Author: Serg Stoyan
*
* This file is part of GNUstep.
*
* This application is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This application is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*
* $Id$
*/
#ifndef _PCBUTTON_H_
#define _PCBUTTON_H_

View file

@ -1,6 +1,31 @@
/**/
/*
* GNUstep ProjectCenter - http://www.gnustep.org
*
* Copyright (C) 2003 Free Software Foundation
*
* Author: Serg Stoyan
*
* This file is part of GNUstep.
*
* This application is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This application is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
*
* $Id$
*/
#include "PCButton.h"
#include "PCDefines.h"
@implementation PCButton

View file

@ -24,6 +24,9 @@
$Id$
*/
#ifndef __PCDATASOURCE_H
#define __PCDATASOURCE_H
#include <AppKit/AppKit.h>
/*
@ -56,3 +59,6 @@
- (void)tableView:(NSTableView *)aTableView setObjectValue:(id)anObject forTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex;
@end
#endif

View file

@ -25,6 +25,7 @@
*/
#include "PCDataSource.h"
#include "PCDefines.h"
@implementation PCDataSource
@ -38,7 +39,7 @@
- (void)dealloc
{
[data release];
RELEASE(data);
[super dealloc];
}
@ -105,3 +106,4 @@
}
@end

View file

@ -127,7 +127,7 @@ static PCFileManager *_mgr = nil;
title = [[[project rootCategories] allKeysForObject:key] objectAtIndex:0];
title = [NSString stringWithFormat:@"Add to %@...",title];
types = [project fileExtensionsForCategory:key];
types = [project fileExtensionsForCategory:[key uppercaseString]];
openPanel = [NSOpenPanel openPanel];
[openPanel setAllowsMultipleSelection:YES];

View file

@ -0,0 +1,40 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2000-2002 Free Software Foundation
Author: Philippe C.D. Robert <probert@siggraph.org>
This file is part of GNUstep.
This application is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This application is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
$Id$
*/
#ifndef __PCPROJECTDEBUGGER_UINTERFACE_H
#define __PCPROJECTDEBUGGER_UINTERFACE_H
#include "PCProjectDebugger.h"
@interface PCProjectDebugger (UInterface)
- (void)_createLaunchPanel;
- (void)_createComponentView;
@end
#endif

View file

@ -0,0 +1,140 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2003 Free Software Foundation
Author: Philippe C.D. Robert <probert@siggraph.org>
This file is part of GNUstep.
This application is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This application is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
$Id$
*/
#include "PCProjectDebugger.h"
#include "PCProjectDebugger+UInterface.h"
#include "PCProject.h"
#include "PCButton.h"
#include <AppKit/AppKit.h>
#ifndef IMAGE
#define IMAGE(X) [[[NSImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForImageResource:(X)]] autorelease]
#endif
@implementation PCProjectDebugger (UInterface)
- (void) _createLaunchPanel
{
launchPanel = [[NSPanel alloc]
initWithContentRect: NSMakeRect (0, 300, 480, 322)
styleMask: (NSTitledWindowMask
| NSClosableWindowMask
| NSResizableWindowMask)
backing: NSBackingStoreRetained
defer: YES];
[launchPanel setMinSize: NSMakeSize(400, 160)];
[launchPanel setFrameAutosaveName: @"ProjectLauncher"];
[launchPanel setReleasedWhenClosed: NO];
[launchPanel setHidesOnDeactivate: NO];
[launchPanel setTitle: [NSString
stringWithFormat: @"%@ - Launch", [currentProject projectName]]];
if (![launchPanel setFrameUsingName: @"ProjectLauncher"])
{
[launchPanel center];
}
}
- (void)_createComponentView
{
NSScrollView *scrollView;
NSString *string;
NSAttributedString *attributedString;
componentView = [[NSBox alloc] initWithFrame:NSMakeRect(8,-1,464,322)];
[componentView setTitlePosition:NSNoTitle];
[componentView setBorderType:NSNoBorder];
[componentView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
[componentView setContentViewMargins: NSMakeSize(0.0,0.0)];
/*
* Top buttons
*/
// _w_frame = NSMakeRect(0, 270, 88, 44);
runButton = [[PCButton alloc] initWithFrame: NSMakeRect(0,264,50,50)];
[runButton setTitle: @"Run"];
[runButton setImage: IMAGE(@"ProjectCenter_run")];
[runButton setAlternateImage: IMAGE(@"Stop")];
[runButton setTarget: self];
[runButton setAction: @selector(run:)];
[runButton setAutoresizingMask: (NSViewMaxXMargin | NSViewMinYMargin)];
[runButton setButtonType: NSToggleButton];
[componentView addSubview: runButton];
RELEASE (runButton);
debugButton = [[PCButton alloc] initWithFrame: NSMakeRect(50,264,50,50)];
[debugButton setTitle: @"Debug"];
[debugButton setImage: IMAGE(@"ProjectCenter_debug")];
[debugButton setAlternateImage: IMAGE(@"Stop")];
[debugButton setTarget: self];
[debugButton setAction: @selector(debug:)];
[debugButton setAutoresizingMask: (NSViewMaxXMargin | NSViewMinYMargin)];
[debugButton setButtonType: NSToggleButton];
[componentView addSubview: debugButton];
RELEASE (debugButton);
/*
*
*/
scrollView = [[NSScrollView alloc] initWithFrame:NSMakeRect (0,-1,464,253)];
[scrollView setHasHorizontalScroller:NO];
[scrollView setHasVerticalScroller:YES];
[scrollView setBorderType: NSBezelBorder];
[scrollView setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable)];
stdOut=[[NSTextView alloc] initWithFrame:[[scrollView contentView] frame]];
[stdOut setMinSize: NSMakeSize(0, 0)];
[stdOut setMaxSize: NSMakeSize(1e7, 1e7)];
[stdOut setRichText:YES];
[stdOut setEditable:NO];
[stdOut setSelectable:YES];
[stdOut setVerticallyResizable: YES];
[stdOut setHorizontallyResizable: NO];
[stdOut setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable];
[[stdOut textContainer] setWidthTracksTextView:YES];
[[stdOut textContainer] setContainerSize:
NSMakeSize([stdOut frame].size.width, 1e7)];
// Font
string = [NSString stringWithString:@"=== Launcher ready ==="];
attributedString =
[[NSAttributedString alloc] initWithString:string
attributes:textAttributes];
[[stdOut textStorage] setAttributedString:attributedString];
[scrollView setDocumentView:stdOut];
RELEASE (stdOut);
[componentView addSubview: scrollView];
RELEASE(scrollView);
}
@end

View file

@ -24,6 +24,9 @@
$Id$
*/
#ifndef __PCPROJECTDEBUGGER_H
#define __PCPROJECTDEBUGGER_H
#include <AppKit/AppKit.h>
#ifndef GNUSTEP_BASE_VERSION
@ -83,3 +86,6 @@
- (void)logData:(NSData *)data error:(BOOL)yn;
@end
#endif

View file

@ -25,6 +25,7 @@
*/
#include "PCProjectDebugger.h"
#include "PCProjectDebugger+UInterface.h"
#include "PCDefines.h"
#include "PCProject.h"
#include "PCProjectManager.h"
@ -32,10 +33,6 @@
#include <AppKit/AppKit.h>
#ifndef IMAGE
#define IMAGE(X) [[[NSImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForImageResource:(X)]] autorelease]
#endif
#ifndef NOTIFICATION_CENTER
#define NOTIFICATION_CENTER [NSNotificationCenter defaultCenter]
#endif
@ -45,116 +42,6 @@ enum {
DEBUG_DEBUG_TARGET = 2
};
@interface PCProjectDebugger (CreateUI)
- (void)_createLaunchPanel;
- (void)_createComponentView;
@end
@implementation PCProjectDebugger (CreateUI)
- (void) _createLaunchPanel
{
launchPanel = [[NSPanel alloc]
initWithContentRect: NSMakeRect (0, 300, 480, 322)
styleMask: (NSTitledWindowMask
| NSClosableWindowMask
| NSResizableWindowMask)
backing: NSBackingStoreRetained
defer: YES];
[launchPanel setMinSize: NSMakeSize(400, 160)];
[launchPanel setFrameAutosaveName: @"ProjectLauncher"];
[launchPanel setReleasedWhenClosed: NO];
[launchPanel setHidesOnDeactivate: NO];
[launchPanel setTitle: [NSString
stringWithFormat: @"%@ - Launch", [currentProject projectName]]];
if (![launchPanel setFrameUsingName: @"ProjectLauncher"])
{
[launchPanel center];
}
}
- (void)_createComponentView
{
NSScrollView *scrollView;
NSString *string;
NSAttributedString *attributedString;
componentView = [[NSBox alloc] initWithFrame:NSMakeRect(8,-1,464,322)];
[componentView setTitlePosition:NSNoTitle];
[componentView setBorderType:NSNoBorder];
[componentView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
[componentView setContentViewMargins: NSMakeSize(0.0,0.0)];
/*
* Top buttons
*/
// _w_frame = NSMakeRect(0, 270, 88, 44);
runButton = [[PCButton alloc] initWithFrame: NSMakeRect(0,264,50,50)];
[runButton setTitle: @"Run"];
[runButton setImage: IMAGE(@"ProjectCenter_run")];
[runButton setAlternateImage: IMAGE(@"Stop")];
[runButton setTarget: self];
[runButton setAction: @selector(run:)];
[runButton setAutoresizingMask: (NSViewMaxXMargin | NSViewMinYMargin)];
[runButton setButtonType: NSToggleButton];
[componentView addSubview: runButton];
RELEASE (runButton);
debugButton = [[PCButton alloc] initWithFrame: NSMakeRect(50,264,50,50)];
[debugButton setTitle: @"Debug"];
[debugButton setImage: IMAGE(@"ProjectCenter_debug")];
[debugButton setAlternateImage: IMAGE(@"Stop")];
[debugButton setTarget: self];
[debugButton setAction: @selector(debug:)];
[debugButton setAutoresizingMask: (NSViewMaxXMargin | NSViewMinYMargin)];
[debugButton setButtonType: NSToggleButton];
[componentView addSubview: debugButton];
RELEASE (debugButton);
/*
*
*/
scrollView = [[NSScrollView alloc] initWithFrame:NSMakeRect (0,-1,464,253)];
[scrollView setHasHorizontalScroller:NO];
[scrollView setHasVerticalScroller:YES];
[scrollView setBorderType: NSBezelBorder];
[scrollView setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable)];
stdOut=[[NSTextView alloc] initWithFrame:[[scrollView contentView] frame]];
[stdOut setMinSize: NSMakeSize(0, 0)];
[stdOut setMaxSize: NSMakeSize(1e7, 1e7)];
[stdOut setRichText:YES];
[stdOut setEditable:NO];
[stdOut setSelectable:YES];
[stdOut setVerticallyResizable: YES];
[stdOut setHorizontallyResizable: NO];
[stdOut setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable];
[[stdOut textContainer] setWidthTracksTextView:YES];
[[stdOut textContainer] setContainerSize:
NSMakeSize([stdOut frame].size.width, 1e7)];
// Font
string = [NSString stringWithString:@"=== Launcher ready ==="];
attributedString =
[[NSAttributedString alloc] initWithString:string
attributes:textAttributes];
[[stdOut textStorage] setAttributedString:attributedString];
[scrollView setDocumentView:stdOut];
RELEASE (stdOut);
[componentView addSubview: scrollView];
RELEASE(scrollView);
}
@end
@implementation PCProjectDebugger
- (id)initWithProject:(PCProject *)aProject
@ -242,7 +129,9 @@ enum {
- (void)debug:(id)sender
{
NSRunAlertPanel(@"Attention!",@"Integrated debugging is not yet available...",@"OK",nil,nil);
NSRunAlertPanel(@"Attention!",
@"Integrated debugging is not yet available...",
@"OK",nil,nil);
}
- (void)run:(id)sender
@ -372,7 +261,7 @@ enum {
RELEASE(launchTask);
launchTask = nil;
[runButton setNextState];
[runButton setState:NSOffState];
[componentView display];
}
}

View file

@ -25,7 +25,9 @@
"PCFileManager+UInterface.m",
"PCProjectManager+UInterface.m",
"PCProject+UInterface.m",
"PCTextFinder+UInterface.m"
"PCTextFinder+UInterface.m",
"PCProjectDebugger+UInterface.m",
PCButton.m
);
COMPILEROPTIONS = "";
CREATION_DATE = "";
@ -68,7 +70,9 @@
"PCFileManager+UInterface.h",
"PCProjectManager+UInterface.h",
"PCProject+UInterface.h",
"PCTextFinder+UInterface.h"
"PCTextFinder+UInterface.h",
"PCProjectDebugger+UInterface.h",
PCButton.h
);
INSTALLDIR = "$(GNUSTEP_INSTALLATION_DIR)";
LANGUAGE = English;

View file

@ -7,6 +7,6 @@ GCC_VERSION=2.8.0
# The version number of this release.
MAJOR_VERSION=0
MINOR_VERSION=3
SUBMINOR_VERSION=0
SUBMINOR_VERSION=5
PC_VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${SUBMINOR_VERSION}
VERSION=${PC_VERSION}

View file

@ -3,7 +3,7 @@
Copyright (C) 2001 Free Software Foundation
Author: Philippe C.D. Robert <phr@3dkit.org>
Author: Philippe C.D. Robert <probert@siggraph.org>
This file is part of GNUstep.
@ -34,7 +34,6 @@
@interface PCLogController : NSObject
{
}
- (void)logMessage:(NSString *)message tag:(int)tag;

View file

@ -3,7 +3,7 @@
Copyright (C) 2001 Free Software Foundation
Author: Philippe C.D. Robert <phr@3dkit.org>
Author: Philippe C.D. Robert <probert@siggraph.org>
This file is part of GNUstep.
@ -32,17 +32,21 @@
{
NSString *_log;
switch (tag) {
switch (tag)
{
case 0:
_log = [NSString stringWithFormat:@"Information from <%@: %x - %x>: %@",[self class],self,[NSThread currentThread],message];
break;
case 1:
_log = [NSString stringWithFormat:@"Warning from <%@: %x - %x>: %@",[self class],self,[NSThread currentThread],message];
break;
default:
break;
}
// Later we redirect this to our own output.
NSLog(message);
}

View file

@ -3,7 +3,7 @@
Copyright (C) 2001 Free Software Foundation
Author: Philippe C.D. Robert <phr@3dkit.org>
Author: Philippe C.D. Robert <probert@siggraph.org>
This file is part of GNUstep.
@ -118,3 +118,4 @@
@end
#endif

View file

@ -3,7 +3,7 @@
Copyright (C) 2001 Free Software Foundation
Author: Philippe C.D. Robert <phr@3dkit.org>
Author: Philippe C.D. Robert <probert@siggraph.org>
This file is part of GNUstep.
@ -29,16 +29,12 @@
#include <ProjectCenter/ProjectCenter.h>
#include "PCAppController.h"
#if defined(GNUSTEP)
#include <AppKit/IMLoading.h>
#endif
@implementation PCMenuController
- (id)init
{
if ((self = [super init]))
{
{
NSRect fr = NSMakeRect(20,30,160,20);
[[NSNotificationCenter defaultCenter] addObserver:self
@ -67,7 +63,7 @@
NSViewMinXMargin | NSViewMaxXMargin];
RELEASE(projectTypePopup);
}
}
return self;
}
@ -99,19 +95,22 @@
- (void)setAppController:(id)anObject
{
[appController autorelease];
appController = [anObject retain];
appController = anObject;
RETAIN(appController);
}
- (void)setFileManager:(id)anObject
{
[fileManager autorelease];
fileManager = [anObject retain];
fileManager = anObject;
RETAIN(fileManager);
}
- (void)setProjectManager:(id)anObject
{
[projectManager autorelease];
projectManager = [anObject retain];
projectManager = anObject;
RETAIN(projectManager);
}
//============================================================================
@ -241,7 +240,7 @@
NSArray *files = [[proj browserController] selectedFiles];
if ((fileName = [[proj browserController] nameOfSelectedFile]))
{
{
int ret;
ret = NSRunAlertPanel(@"Remove File!",
@ -252,12 +251,12 @@
files, [proj projectName]);
if (ret == NSAlertAlternateReturn || ret == NSAlertOtherReturn)
{
{
BOOL flag = (ret == NSAlertOtherReturn) ? YES : NO;
[projectManager removeFilesPermanently:flag];
}
}
}
}
}
- (void)projectRevertToSaved:(id)sender
@ -318,16 +317,16 @@
filePath = [[openPanel filenames] objectAtIndex:0];
if (![fm fileExistsAtPath:filePath isDirectory:&isDir] && !isDir)
{
{
NSRunAlertPanel(@"Attention!",
@"Couldn't open %@!",
@"OK",nil,nil,filePath);
}
}
else
{
{
[PCEditorController openFileInEditor:filePath];
}
}
}
}
}
- (void)fileNew:(id)sender
@ -427,7 +426,7 @@
- (void)fileOpenQuickly:(id)sender
{
NSRunAlertPanel(@"PCMenuController: Sorry!",
@"This feature not finished yet",
@"This feature is not finished yet",
@"OK",nil,nil);
}
@ -440,14 +439,14 @@
[projectManager renameFileTo:proj];*/
NSRunAlertPanel(@"PCMenuController: Sorry!",
@"This feature not finished yet",
@"This feature is not finished yet",
@"OK",nil,nil);
}
- (void)fileNewUntitled:(id)sender
{
NSRunAlertPanel(@"PCMenuController: Sorry!",
@"This feature not finished yet",
@"This feature is not finished yet",
@"OK",nil,nil);
}
@ -624,3 +623,4 @@
}
@end

View file

@ -0,0 +1,39 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2003 Free Software Foundation
Author: Philippe C.D. Robert <probert@siggraph.org>
This file is part of GNUstep.
This application is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This application is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
$Id$
*/
#ifndef __PCPREFCONTROLLER_UINTERFACE_H
#define __PCPREFCONTROLLER_UINTERFACE_H
#include "PCPrefController.h"
@interface PCPrefController (UInterface)
- (void)_initUI;
@end
#endif

View file

@ -0,0 +1,444 @@
/*
GNUstep ProjectCenter - http://www.gnustep.org
Copyright (C) 2003 Free Software Foundation
Author: Philippe C.D. Robert <probert@siggraph.org>
This file is part of GNUstep.
This application is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This application is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
$Id$
*/
#include "PCPrefController.h"
#include "PCPrefController+UInterface.h"
@implementation PCPrefController (UInterface)
- (void)_initUI
{
NSView *_c_view;
unsigned int style = NSTitledWindowMask | NSClosableWindowMask;
NSRect _w_frame;
NSBox *line;
NSBox *v;
NSTextField *textField;
NSButtonCell *cell;
/*
* Pref Window
*
*/
_w_frame = NSMakeRect(200,300,270,365);
prefWindow = [[NSWindow alloc] initWithContentRect:_w_frame
styleMask:style
backing:NSBackingStoreBuffered
defer:YES];
[prefWindow setMinSize: NSMakeSize (270,365)];
[prefWindow setTitle: @"Preferences"];
[prefWindow setDelegate: self];
[prefWindow setReleasedWhenClosed: NO];
[prefWindow center];
[prefWindow setFrameAutosaveName: @"Preferences"];
_c_view = [prefWindow contentView];
prefPopup = [[NSPopUpButton alloc] initWithFrame: NSMakeRect (72,334,120,21)];
[prefPopup addItemWithTitle: @"None"];
[prefPopup setTarget: self];
[prefPopup setAction: @selector (popupChanged:)];
[_c_view addSubview: prefPopup];
RELEASE(prefPopup);
line = [[NSBox alloc] init];
[line setTitlePosition: NSNoTitle];
[line setFrameFromContentFrame: NSMakeRect(0,312,270,2)];
[_c_view addSubview:line];
RELEASE(line);
prefEmptyView = [[NSBox alloc] init];
[prefEmptyView setTitlePosition: NSNoTitle];
[prefEmptyView setFrameFromContentFrame: NSMakeRect(0,0,270,312)];
[prefEmptyView setBorderType: NSNoBorder];
[_c_view addSubview: prefEmptyView];
RELEASE(prefEmptyView);
/*
* Building view
*
*/
prefBuildingView = [[NSBox alloc] initWithFrame: NSMakeRect(0,0,270,310)];
[prefBuildingView setTitlePosition:NSNoTitle];
[prefBuildingView setBorderType:NSNoBorder];
v = [[NSBox alloc] initWithFrame: NSMakeRect(5,208,254,102)];
[v setTitle: @"Sounds"];
[prefBuildingView addSubview: v];
RELEASE(v);
textField = [[NSTextField alloc] initWithFrame: NSMakeRect(0,40,54,21)];
[textField setAlignment: NSRightTextAlignment];
[textField setBordered: NO];
[textField setEditable: NO];
[textField setBezeled: NO];
[textField setDrawsBackground: NO];
[textField setStringValue: @"Success:"];
[v addSubview:textField];
RELEASE(textField);
successField = [[NSTextField alloc] initWithFrame:NSMakeRect(58,40,144,21)];
[successField setAlignment: NSLeftTextAlignment];
[successField setBordered: NO];
[successField setEditable: YES];
[successField setBezeled: YES];
[successField setDrawsBackground: YES];
[successField setTarget: self];
[successField setAction: @selector (setSuccessSound:)];
[v addSubview: successField];
RELEASE(successField);
textField = [[NSTextField alloc] initWithFrame: NSMakeRect(0,16,54,21)];
[textField setAlignment: NSRightTextAlignment];
[textField setBordered: NO];
[textField setEditable: NO];
[textField setBezeled: NO];
[textField setDrawsBackground: NO];
[textField setStringValue: @"Failure:"];
[v addSubview:textField];
RELEASE(textField);
failureField = [[NSTextField alloc] initWithFrame:NSMakeRect(58,16,144,21)];
[failureField setAlignment: NSLeftTextAlignment];
[failureField setBordered: NO];
[failureField setEditable: YES];
[failureField setBezeled: YES];
[failureField setDrawsBackground: YES];
[failureField setTarget: self];
[failureField setAction: @selector (setFailureSound:)];
[v addSubview: failureField];
RELEASE(failureField);
promptOnClean = [[NSButton alloc] initWithFrame: NSMakeRect(72,170,108,21)];
[promptOnClean setTitle: @"Prompt on clean"];
[promptOnClean setButtonType: NSSwitchButton];
[promptOnClean setBordered: NO];
[promptOnClean setRefusesFirstResponder: YES];
[promptOnClean setTarget: self];
[promptOnClean setAction: @selector (setPromptOnClean:)];
[promptOnClean setContinuous: NO];
[prefBuildingView addSubview: promptOnClean];
[promptOnClean sizeToFit];
RELEASE(promptOnClean);
/*
* Saving view
*/
prefSavingView = [[NSBox alloc] initWithFrame: NSMakeRect (0,0,270,310)];
[prefSavingView setTitlePosition: NSNoTitle];
[prefSavingView setBorderType: NSNoBorder];
v = [[NSBox alloc] initWithFrame: NSMakeRect (5,208,254,102)];
[v setTitle: @"Saving"];
[prefSavingView addSubview: v];
RELEASE(v);
saveOnQuit=[[NSButton alloc] initWithFrame: NSMakeRect (24,52,124,15)];
[saveOnQuit setTitle: @"Save Projects Upon Quit"];
[saveOnQuit setButtonType: NSSwitchButton];
[saveOnQuit setBordered: NO];
[saveOnQuit setTarget: self];
[saveOnQuit setAction: @selector (setSaveOnQuit:)];
[saveOnQuit setContinuous: NO];
[v addSubview: saveOnQuit];
[saveOnQuit sizeToFit];
RELEASE(saveOnQuit);
saveAutomatically=[[NSButton alloc] initWithFrame: NSMakeRect (24,32,124,15)];
[saveAutomatically setTitle: @"Save Project Automatically"];
[saveAutomatically setButtonType: NSSwitchButton];
[saveAutomatically setBordered :NO];
[saveAutomatically setTarget: self];
[saveAutomatically setAction: @selector (setSaveAutomatically:)];
[saveAutomatically setContinuous: NO];
[v addSubview: saveAutomatically];
[saveAutomatically sizeToFit];
RELEASE(saveAutomatically);
keepBackup = [[NSButton alloc] initWithFrame: NSMakeRect (24,12,124,15)];
[keepBackup setTitle: @"Keep Project Backup"];
[keepBackup setButtonType: NSSwitchButton];
[keepBackup setBordered: NO];
[keepBackup setTarget: self];
[keepBackup setAction: @selector (setKeepBackup:)];
[keepBackup setContinuous: NO];
[v addSubview: keepBackup];
[keepBackup sizeToFit];
RELEASE(keepBackup);
v = [[NSBox alloc] initWithFrame: NSMakeRect(5,149,254,49)];
[v setTitle: @"Auto-Save"];
[prefSavingView addSubview: v];
RELEASE(v);
textField = [[NSTextField alloc] initWithFrame: NSMakeRect(12,0,54,21)];
[textField setAlignment: NSRightTextAlignment];
[textField setBordered: NO];
[textField setEditable: NO];
[textField setBezeled: NO];
[textField setDrawsBackground: NO];
[textField setStringValue: @"Seconds:"];
[v addSubview: textField];
RELEASE(textField);
autoSaveField = [[NSTextField alloc] initWithFrame:NSMakeRect(72,0,144,21)];
[autoSaveField setAlignment: NSLeftTextAlignment];
[autoSaveField setBordered: NO];
[autoSaveField setEditable: YES];
[autoSaveField setBezeled: YES];
[autoSaveField setDrawsBackground: YES];
[autoSaveField setTarget:self];
[autoSaveField setAction:@selector(setSavePeriod:)];
[v addSubview:autoSaveField];
RELEASE(autoSaveField);
/*
* Editing view
*/
prefEditingView = [[NSBox alloc] initWithFrame: NSMakeRect (0,0,270,310)];
[prefEditingView setTitlePosition: NSNoTitle];
[prefEditingView setBorderType: NSNoBorder];
v = [[NSBox alloc] initWithFrame: NSMakeRect(5,208,254,102)];
[v setTitle:@"Tab Control"];
[prefEditingView addSubview:v];
RELEASE(v);
cell = [[NSButtonCell alloc] init];
[cell setButtonType: NSRadioButton];
[cell setBordered: NO];
[cell setImagePosition: NSImageLeft];
tabMatrix = [[NSMatrix alloc] initWithFrame: NSMakeRect(32,16,164,40)
mode: NSRadioModeMatrix
prototype: cell
numberOfRows: 2
numberOfColumns: 2];
[tabMatrix setIntercellSpacing: NSMakeSize (8, 8) ];
[tabMatrix setTarget: self];
[tabMatrix setAction: @selector (setTabBehaviour:)];
[tabMatrix setAutosizesCells: NO];
cell = [tabMatrix cellAtRow: 0 column: 0];
[cell setTitle: @"Tabulator"];
[cell setTag: 0];
cell = [tabMatrix cellAtRow: 1 column: 0];
[cell setTitle: @"2 Spaces"];
[cell setTag: 1];
cell = [tabMatrix cellAtRow: 0 column: 1];
[cell setTitle: @"4 Spaces"];
[cell setTag: 2];
cell = [tabMatrix cellAtRow: 1 column: 1];
[cell setTitle: @"8 Spaces"];
[cell setTag: 3];
[v addSubview:tabMatrix];
RELEASE(tabMatrix);
[tabMatrix selectCellAtRow: 0 column: 1];
/*
* Misc view
*
*/
prefMiscView = [[NSBox alloc] init];
[prefMiscView setTitlePosition:NSNoTitle];
[prefMiscView setFrameFromContentFrame:NSMakeRect(1,1,260,308)];
[prefMiscView setBorderType:NSNoBorder];
v = [[NSBox alloc] initWithFrame: NSMakeRect(5,189,254,121)];
[v setTitle:@"External Tools"];
[prefMiscView addSubview:v];
RELEASE(v);
// Editor
textField = [[NSTextField alloc] initWithFrame:NSMakeRect(12,16,60,21)];
[textField setAlignment: NSRightTextAlignment];
[textField setBordered: NO];
[textField setEditable: NO];
[textField setBezeled: NO];
[textField setDrawsBackground: NO];
[textField setStringValue:@"Editor:"];
[v addSubview:textField];
RELEASE(textField);
editorField = [[NSTextField alloc] initWithFrame:NSMakeRect(72,16,144,21)];
[editorField setAlignment: NSLeftTextAlignment];
[editorField setBordered: NO];
[editorField setEditable: YES];
[editorField setBezeled: YES];
[editorField setDrawsBackground: YES];
[editorField setTarget:self];
[editorField setAction:@selector(setEditor:)];
[v addSubview:editorField];
RELEASE(editorField);
// Compiler
textField = [[NSTextField alloc] initWithFrame:NSMakeRect(12,40,60,21)];
[textField setAlignment: NSRightTextAlignment];
[textField setBordered: NO];
[textField setEditable: NO];
[textField setBezeled: NO];
[textField setDrawsBackground: NO];
[textField setStringValue:@"Compiler:"];
[v addSubview:textField];
RELEASE(textField);
compilerField = [[NSTextField alloc] initWithFrame:NSMakeRect(72,40,144,21)];
[compilerField setAlignment: NSLeftTextAlignment];
[compilerField setBordered: NO];
[compilerField setEditable: YES];
[compilerField setBezeled: YES];
[compilerField setDrawsBackground: YES];
[compilerField setTarget:self];
[compilerField setAction:@selector(setCompiler:)];
[v addSubview:compilerField];
RELEASE(compilerField);
// Debugger
textField = [[NSTextField alloc] initWithFrame:NSMakeRect(12,64,60,21)];
[textField setAlignment: NSRightTextAlignment];
[textField setBordered: NO];
[textField setEditable: NO];
[textField setBezeled: NO];
[textField setDrawsBackground: NO];
[textField setStringValue:@"Debugger:"];
[v addSubview:textField];
RELEASE(textField);
debuggerField = [[NSTextField alloc] initWithFrame:NSMakeRect(72,64,144,21)];
[debuggerField setAlignment: NSLeftTextAlignment];
[debuggerField setBordered: NO];
[debuggerField setEditable: YES];
[debuggerField setBezeled: YES];
[debuggerField setDrawsBackground: YES];
[debuggerField setTarget:self];
[debuggerField setAction:@selector(setDebugger:)];
[v addSubview:debuggerField];
RELEASE(debuggerField);
// Bundles Box
v = [[NSBox alloc] initWithFrame: NSMakeRect(5,131,254,48)];
[v setTitle: @"Bundle Path"];
[prefMiscView addSubview: v];
RELEASE(v);
// Bundle path
bundlePathField=[[NSTextField alloc] initWithFrame:NSMakeRect(12,0,212,21)];
[bundlePathField setAlignment: NSLeftTextAlignment];
[bundlePathField setBordered: NO];
[bundlePathField setEditable: YES];
[bundlePathField setBezeled: YES];
[bundlePathField setDrawsBackground: YES];
[bundlePathField setTarget:self];
[bundlePathField setAction:@selector(setBundlePath:)];
[v addSubview:bundlePathField];
RELEASE(bundlePathField);
/*
* Interface view
*/
prefInterfaceView = [[NSBox alloc] initWithFrame: NSMakeRect (0,0,270,310)];
[prefInterfaceView setTitlePosition: NSNoTitle];
[prefInterfaceView setBorderType: NSNoBorder];
v = [[NSBox alloc] initWithFrame: NSMakeRect (5,208,254,102)];
[v setTitle: @"Display as separate panel..."];
[prefInterfaceView addSubview: v];
RELEASE(v);
separateBuilder = [[NSButton alloc] initWithFrame: NSMakeRect (48,48,124,21)];
[separateBuilder setTitle: @"Project Builder"];
[separateBuilder setButtonType: NSSwitchButton];
[separateBuilder setBordered: NO];
[separateBuilder setRefusesFirstResponder: YES];
[separateBuilder setTarget: self];
[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"];
[separateLauncher setButtonType: NSSwitchButton];
[separateLauncher setBordered: NO];
[separateLauncher setRefusesFirstResponder: YES];
[separateLauncher setTarget: self];
[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"];
[separateEditor setButtonType: NSSwitchButton];
[separateEditor setBordered: NO];
[separateEditor setRefusesFirstResponder: YES];
[separateEditor setTarget: self];
[separateEditor setAction: @selector (setDisplayPanels:)];
[separateEditor setContinuous: NO];
[v addSubview: separateEditor];
RELEASE(separateEditor);
// Some buttons
v = [[NSBox alloc] initWithFrame: NSMakeRect(5,121,254,77)];
[v setTitle: @"Misc"];
[prefInterfaceView addSubview: v];
RELEASE(v);
promptWhenQuit = [[NSButton alloc] initWithFrame: NSMakeRect(48,7,204,21)];
[promptWhenQuit setTitle: @"Prompt when quitting"];
[promptWhenQuit setButtonType: NSSwitchButton];
[promptWhenQuit setBordered: NO];
[promptWhenQuit setRefusesFirstResponder: YES];
[promptWhenQuit setTarget: self];
[promptWhenQuit setAction: @selector (promptWhenQuitting:)];
[promptWhenQuit setContinuous: NO];
[v addSubview: promptWhenQuit];
[promptWhenQuit sizeToFit];
RELEASE(promptWhenQuit);
useExternalEditor = [[NSButton alloc] initWithFrame:NSMakeRect(48,28,204,21)];
[useExternalEditor setTitle: @"Use external Editor"];
[useExternalEditor setButtonType: NSSwitchButton];
[useExternalEditor setBordered: NO];
[useExternalEditor setRefusesFirstResponder: YES];
[useExternalEditor setTarget: self];
[useExternalEditor setAction: @selector(setUseExternalEditor:)];
[useExternalEditor setContinuous: NO];
[v addSubview: useExternalEditor];
[useExternalEditor sizeToFit];
RELEASE(useExternalEditor);
}
@end

View file

@ -3,7 +3,7 @@
Copyright (C) 2001 Free Software Foundation
Author: Philippe C.D. Robert <phr@3dkit.org>
Author: Philippe C.D. Robert <probert@siggraph.org>
This file is part of GNUstep.
@ -101,3 +101,4 @@
extern NSString *SavePeriodDidChangeNotification;
#endif

View file

@ -3,7 +3,7 @@
Copyright (C) 2001 Free Software Foundation
Author: Philippe C.D. Robert <phr@3dkit.org>
Author: Philippe C.D. Robert <probert@siggraph.org>
This file is part of GNUstep.
@ -25,435 +25,11 @@
*/
#include "PCPrefController.h"
#include "PCPrefController+UInterface.h"
#include <ProjectCenter/ProjectCenter.h>
#if defined(GNUSTEP)
#include <AppKit/IMLoading.h>
#endif
NSString *SavePeriodDidChangeNotification = @"SavePeriodDidChangeNotification";
@interface PCPrefController (CreateUI)
- (void)_initUI;
@end
@implementation PCPrefController (CreateUI)
- (void)_initUI
{
NSView *_c_view;
unsigned int style = NSTitledWindowMask | NSClosableWindowMask;
NSRect _w_frame;
NSBox *line;
NSBox *v;
NSTextField *textField;
NSButtonCell *cell;
/*
* Pref Window
*
*/
_w_frame = NSMakeRect(200,300,270,365);
prefWindow = [[NSWindow alloc] initWithContentRect:_w_frame
styleMask:style
backing:NSBackingStoreBuffered
defer:YES];
[prefWindow setMinSize: NSMakeSize (270,365)];
[prefWindow setTitle: @"Preferences"];
[prefWindow setDelegate: self];
[prefWindow setReleasedWhenClosed: NO];
[prefWindow center];
[prefWindow setFrameAutosaveName: @"Preferences"];
_c_view = [prefWindow contentView];
prefPopup = [[NSPopUpButton alloc] initWithFrame: NSMakeRect (72,334,120,21)];
[prefPopup addItemWithTitle: @"None"];
[prefPopup setTarget: self];
[prefPopup setAction: @selector (popupChanged:)];
[_c_view addSubview: prefPopup];
RELEASE(prefPopup);
line = [[NSBox alloc] init];
[line setTitlePosition: NSNoTitle];
[line setFrameFromContentFrame: NSMakeRect(0,312,270,2)];
[_c_view addSubview:line];
RELEASE(line);
prefEmptyView = [[NSBox alloc] init];
[prefEmptyView setTitlePosition: NSNoTitle];
[prefEmptyView setFrameFromContentFrame: NSMakeRect(0,0,270,312)];
[prefEmptyView setBorderType: NSNoBorder];
[_c_view addSubview: prefEmptyView];
RELEASE(prefEmptyView);
/*
* Building view
*
*/
prefBuildingView = [[NSBox alloc] initWithFrame: NSMakeRect(0,0,270,310)];
[prefBuildingView setTitlePosition:NSNoTitle];
[prefBuildingView setBorderType:NSNoBorder];
v = [[NSBox alloc] initWithFrame: NSMakeRect(5,208,254,102)];
[v setTitle: @"Sounds"];
[prefBuildingView addSubview: v];
RELEASE(v);
textField = [[NSTextField alloc] initWithFrame: NSMakeRect(0,40,54,21)];
[textField setAlignment: NSRightTextAlignment];
[textField setBordered: NO];
[textField setEditable: NO];
[textField setBezeled: NO];
[textField setDrawsBackground: NO];
[textField setStringValue: @"Success:"];
[v addSubview:textField];
RELEASE(textField);
successField = [[NSTextField alloc] initWithFrame:NSMakeRect(58,40,144,21)];
[successField setAlignment: NSLeftTextAlignment];
[successField setBordered: NO];
[successField setEditable: YES];
[successField setBezeled: YES];
[successField setDrawsBackground: YES];
[successField setTarget: self];
[successField setAction: @selector (setSuccessSound:)];
[v addSubview: successField];
RELEASE(successField);
textField = [[NSTextField alloc] initWithFrame: NSMakeRect(0,16,54,21)];
[textField setAlignment: NSRightTextAlignment];
[textField setBordered: NO];
[textField setEditable: NO];
[textField setBezeled: NO];
[textField setDrawsBackground: NO];
[textField setStringValue: @"Failure:"];
[v addSubview:textField];
RELEASE(textField);
failureField = [[NSTextField alloc] initWithFrame:NSMakeRect(58,16,144,21)];
[failureField setAlignment: NSLeftTextAlignment];
[failureField setBordered: NO];
[failureField setEditable: YES];
[failureField setBezeled: YES];
[failureField setDrawsBackground: YES];
[failureField setTarget: self];
[failureField setAction: @selector (setFailureSound:)];
[v addSubview: failureField];
RELEASE(failureField);
promptOnClean = [[NSButton alloc] initWithFrame: NSMakeRect(72,170,108,21)];
[promptOnClean setTitle: @"Prompt on clean"];
[promptOnClean setButtonType: NSSwitchButton];
[promptOnClean setBordered: NO];
[promptOnClean setRefusesFirstResponder: YES];
[promptOnClean setTarget: self];
[promptOnClean setAction: @selector (setPromptOnClean:)];
[promptOnClean setContinuous: NO];
[prefBuildingView addSubview: promptOnClean];
[promptOnClean sizeToFit];
RELEASE(promptOnClean);
/*
* Saving view
*/
prefSavingView = [[NSBox alloc] initWithFrame: NSMakeRect (0,0,270,310)];
[prefSavingView setTitlePosition: NSNoTitle];
[prefSavingView setBorderType: NSNoBorder];
v = [[NSBox alloc] initWithFrame: NSMakeRect (5,208,254,102)];
[v setTitle: @"Saving"];
[prefSavingView addSubview: v];
RELEASE(v);
saveOnQuit=[[NSButton alloc] initWithFrame: NSMakeRect (24,52,124,15)];
[saveOnQuit setTitle: @"Save Projects Upon Quit"];
[saveOnQuit setButtonType: NSSwitchButton];
[saveOnQuit setBordered: NO];
[saveOnQuit setTarget: self];
[saveOnQuit setAction: @selector (setSaveOnQuit:)];
[saveOnQuit setContinuous: NO];
[v addSubview: saveOnQuit];
[saveOnQuit sizeToFit];
RELEASE(saveOnQuit);
saveAutomatically=[[NSButton alloc] initWithFrame: NSMakeRect (24,32,124,15)];
[saveAutomatically setTitle: @"Save Project Automatically"];
[saveAutomatically setButtonType: NSSwitchButton];
[saveAutomatically setBordered :NO];
[saveAutomatically setTarget: self];
[saveAutomatically setAction: @selector (setSaveAutomatically:)];
[saveAutomatically setContinuous: NO];
[v addSubview: saveAutomatically];
[saveAutomatically sizeToFit];
RELEASE(saveAutomatically);
keepBackup = [[NSButton alloc] initWithFrame: NSMakeRect (24,12,124,15)];
[keepBackup setTitle: @"Keep Project Backup"];
[keepBackup setButtonType: NSSwitchButton];
[keepBackup setBordered: NO];
[keepBackup setTarget: self];
[keepBackup setAction: @selector (setKeepBackup:)];
[keepBackup setContinuous: NO];
[v addSubview: keepBackup];
[keepBackup sizeToFit];
RELEASE(keepBackup);
v = [[NSBox alloc] initWithFrame: NSMakeRect(5,149,254,49)];
[v setTitle: @"Auto-Save"];
[prefSavingView addSubview: v];
RELEASE(v);
textField = [[NSTextField alloc] initWithFrame: NSMakeRect(12,0,54,21)];
[textField setAlignment: NSRightTextAlignment];
[textField setBordered: NO];
[textField setEditable: NO];
[textField setBezeled: NO];
[textField setDrawsBackground: NO];
[textField setStringValue: @"Seconds:"];
[v addSubview: textField];
RELEASE(textField);
autoSaveField = [[NSTextField alloc] initWithFrame:NSMakeRect(72,0,144,21)];
[autoSaveField setAlignment: NSLeftTextAlignment];
[autoSaveField setBordered: NO];
[autoSaveField setEditable: YES];
[autoSaveField setBezeled: YES];
[autoSaveField setDrawsBackground: YES];
[autoSaveField setTarget:self];
[autoSaveField setAction:@selector(setSavePeriod:)];
[v addSubview:autoSaveField];
RELEASE(autoSaveField);
/*
* Editing view
*/
prefEditingView = [[NSBox alloc] initWithFrame: NSMakeRect (0,0,270,310)];
[prefEditingView setTitlePosition: NSNoTitle];
[prefEditingView setBorderType: NSNoBorder];
v = [[NSBox alloc] initWithFrame: NSMakeRect(5,208,254,102)];
[v setTitle:@"Tab Control"];
[prefEditingView addSubview:v];
RELEASE(v);
cell = [[NSButtonCell alloc] init];
[cell setButtonType: NSRadioButton];
[cell setBordered: NO];
[cell setImagePosition: NSImageLeft];
tabMatrix = [[NSMatrix alloc] initWithFrame: NSMakeRect(32,16,164,40)
mode: NSRadioModeMatrix
prototype: cell
numberOfRows: 2
numberOfColumns: 2];
[tabMatrix setIntercellSpacing: NSMakeSize (8, 8) ];
[tabMatrix setTarget: self];
[tabMatrix setAction: @selector (setTabBehaviour:)];
[tabMatrix setAutosizesCells: NO];
cell = [tabMatrix cellAtRow: 0 column: 0];
[cell setTitle: @"Tabulator"];
[cell setTag: 0];
cell = [tabMatrix cellAtRow: 1 column: 0];
[cell setTitle: @"2 Spaces"];
[cell setTag: 1];
cell = [tabMatrix cellAtRow: 0 column: 1];
[cell setTitle: @"4 Spaces"];
[cell setTag: 2];
cell = [tabMatrix cellAtRow: 1 column: 1];
[cell setTitle: @"8 Spaces"];
[cell setTag: 3];
[v addSubview:tabMatrix];
RELEASE(tabMatrix);
[tabMatrix selectCellAtRow: 0 column: 1];
/*
* Misc view
*
*/
prefMiscView = [[NSBox alloc] init];
[prefMiscView setTitlePosition:NSNoTitle];
[prefMiscView setFrameFromContentFrame:NSMakeRect(1,1,260,308)];
[prefMiscView setBorderType:NSNoBorder];
v = [[NSBox alloc] initWithFrame: NSMakeRect(5,189,254,121)];
[v setTitle:@"External Tools"];
[prefMiscView addSubview:v];
RELEASE(v);
// Editor
textField = [[NSTextField alloc] initWithFrame:NSMakeRect(12,16,60,21)];
[textField setAlignment: NSRightTextAlignment];
[textField setBordered: NO];
[textField setEditable: NO];
[textField setBezeled: NO];
[textField setDrawsBackground: NO];
[textField setStringValue:@"Editor:"];
[v addSubview:textField];
RELEASE(textField);
editorField = [[NSTextField alloc] initWithFrame:NSMakeRect(72,16,144,21)];
[editorField setAlignment: NSLeftTextAlignment];
[editorField setBordered: NO];
[editorField setEditable: YES];
[editorField setBezeled: YES];
[editorField setDrawsBackground: YES];
[editorField setTarget:self];
[editorField setAction:@selector(setEditor:)];
[v addSubview:editorField];
RELEASE(editorField);
// Compiler
textField = [[NSTextField alloc] initWithFrame:NSMakeRect(12,40,60,21)];
[textField setAlignment: NSRightTextAlignment];
[textField setBordered: NO];
[textField setEditable: NO];
[textField setBezeled: NO];
[textField setDrawsBackground: NO];
[textField setStringValue:@"Compiler:"];
[v addSubview:textField];
RELEASE(textField);
compilerField = [[NSTextField alloc] initWithFrame:NSMakeRect(72,40,144,21)];
[compilerField setAlignment: NSLeftTextAlignment];
[compilerField setBordered: NO];
[compilerField setEditable: YES];
[compilerField setBezeled: YES];
[compilerField setDrawsBackground: YES];
[compilerField setTarget:self];
[compilerField setAction:@selector(setCompiler:)];
[v addSubview:compilerField];
RELEASE(compilerField);
// Debugger
textField = [[NSTextField alloc] initWithFrame:NSMakeRect(12,64,60,21)];
[textField setAlignment: NSRightTextAlignment];
[textField setBordered: NO];
[textField setEditable: NO];
[textField setBezeled: NO];
[textField setDrawsBackground: NO];
[textField setStringValue:@"Debugger:"];
[v addSubview:textField];
RELEASE(textField);
debuggerField = [[NSTextField alloc] initWithFrame:NSMakeRect(72,64,144,21)];
[debuggerField setAlignment: NSLeftTextAlignment];
[debuggerField setBordered: NO];
[debuggerField setEditable: YES];
[debuggerField setBezeled: YES];
[debuggerField setDrawsBackground: YES];
[debuggerField setTarget:self];
[debuggerField setAction:@selector(setDebugger:)];
[v addSubview:debuggerField];
RELEASE(debuggerField);
// Bundles Box
v = [[NSBox alloc] initWithFrame: NSMakeRect(5,131,254,48)];
[v setTitle: @"Bundle Path"];
[prefMiscView addSubview: v];
RELEASE(v);
// Bundle path
bundlePathField=[[NSTextField alloc] initWithFrame:NSMakeRect(12,0,212,21)];
[bundlePathField setAlignment: NSLeftTextAlignment];
[bundlePathField setBordered: NO];
[bundlePathField setEditable: YES];
[bundlePathField setBezeled: YES];
[bundlePathField setDrawsBackground: YES];
[bundlePathField setTarget:self];
[bundlePathField setAction:@selector(setBundlePath:)];
[v addSubview:bundlePathField];
RELEASE(bundlePathField);
/*
* Interface view
*/
prefInterfaceView = [[NSBox alloc] initWithFrame: NSMakeRect (0,0,270,310)];
[prefInterfaceView setTitlePosition: NSNoTitle];
[prefInterfaceView setBorderType: NSNoBorder];
v = [[NSBox alloc] initWithFrame: NSMakeRect (5,208,254,102)];
[v setTitle: @"Display as separate panel..."];
[prefInterfaceView addSubview: v];
RELEASE(v);
separateBuilder = [[NSButton alloc] initWithFrame: NSMakeRect (48,48,124,21)];
[separateBuilder setTitle: @"Project Builder"];
[separateBuilder setButtonType: NSSwitchButton];
[separateBuilder setBordered: NO];
[separateBuilder setRefusesFirstResponder: YES];
[separateBuilder setTarget: self];
[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"];
[separateLauncher setButtonType: NSSwitchButton];
[separateLauncher setBordered: NO];
[separateLauncher setRefusesFirstResponder: YES];
[separateLauncher setTarget: self];
[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"];
[separateEditor setButtonType: NSSwitchButton];
[separateEditor setBordered: NO];
[separateEditor setRefusesFirstResponder: YES];
[separateEditor setTarget: self];
[separateEditor setAction: @selector (setDisplayPanels:)];
[separateEditor setContinuous: NO];
[v addSubview: separateEditor];
RELEASE(separateEditor);
// Some buttons
v = [[NSBox alloc] initWithFrame: NSMakeRect(5,121,254,77)];
[v setTitle: @"Misc"];
[prefInterfaceView addSubview: v];
RELEASE(v);
promptWhenQuit = [[NSButton alloc] initWithFrame: NSMakeRect(48,7,204,21)];
[promptWhenQuit setTitle: @"Prompt when quitting"];
[promptWhenQuit setButtonType: NSSwitchButton];
[promptWhenQuit setBordered: NO];
[promptWhenQuit setRefusesFirstResponder: YES];
[promptWhenQuit setTarget: self];
[promptWhenQuit setAction: @selector (promptWhenQuitting:)];
[promptWhenQuit setContinuous: NO];
[v addSubview: promptWhenQuit];
[promptWhenQuit sizeToFit];
RELEASE(promptWhenQuit);
useExternalEditor = [[NSButton alloc] initWithFrame:NSMakeRect(48,28,204,21)];
[useExternalEditor setTitle: @"Use external Editor"];
[useExternalEditor setButtonType: NSSwitchButton];
[useExternalEditor setBordered: NO];
[useExternalEditor setRefusesFirstResponder: YES];
[useExternalEditor setTarget: self];
[useExternalEditor setAction: @selector(setUseExternalEditor:)];
[useExternalEditor setContinuous: NO];
[v addSubview: useExternalEditor];
[useExternalEditor sizeToFit];
RELEASE(useExternalEditor);
}
@end
@implementation PCPrefController
- (id)init
@ -518,8 +94,10 @@ NSString *SavePeriodDidChangeNotification = @"SavePeriodDidChangeNotification";
// Building
[successField setStringValue:
(val = [preferencesDict objectForKey: SuccessSound]) ? val : @""];
[failureField setStringValue:
(val = [preferencesDict objectForKey: FailureSound]) ? val : @""];
[promptOnClean setState:
([[preferencesDict objectForKey: PromptOnClean]
isEqualToString: @"YES"]) ? NSOnState : NSOffState];

View file

@ -3,7 +3,7 @@
Copyright (C) 2003 Free Software Foundation
Authors: Philippe C.D. Robert <phr@3dkit.org>
Authors: Philippe C.D. Robert <probert@siggraph.org>
Modified by Daniel Luederwald <das_flip@gmx.de>
This file is part of GNUstep.
@ -40,8 +40,9 @@
- (void)_initUI
{
NSTextField *textField;
NSRect frame = {{84,120}, {80, 80}};
NSBox *_box;
NSRect frame = {{84,120}, {80, 80}};
NSBox *_iconViewBox;
NSBox *_appIconBox;
[super _initUI];
@ -55,7 +56,7 @@
[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,49 +67,48 @@
[appClassField setAction:@selector(setAppClass:)];
[projectProjectInspectorView addSubview: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);
// 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(84,204,176,21)];
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);
}
@ -159,11 +159,11 @@
- (void)dealloc
{
[rootCategories release];
[rootObjects release];
[rootKeys release];
[appClassField release];
[appImageField release];
RELEASE(rootCategories);
RELEASE(rootObjects);
RELEASE(rootKeys);
RELEASE(appClassField);
RELEASE(appImageField);
[super dealloc];
}

0
ProjectCenter/.gitignore vendored Normal file
View file

0
ProjectCenter/Images/.gitignore vendored Normal file
View file

View file

@ -30,15 +30,15 @@
ApplicationRelease = "0.3.5";
FullVersionID = "ProjectCenter 0.3.5";
Authors = (
"Philippe C.D. Robert <probert@siggraph.org>",
"Serg Stoyan <stoyan@on.com.ua>",
"David Ayers <d.ayers@inode.at>",
"Richard Frith-Macdonald <rfm@gnu.org>",
"Nicola Pero <n.pero@mi.flashnet.it>",
"Pierre-Yves Rivaille <pyrivail@ens-lyon.fr>",
"Adam Fedor <fedor@gnu.org>",
"Serg Stoyan <stoyan@on.com.ua>",
"Philippe C.D. Robert <probert@siggraph.org>");
"Adam Fedor <fedor@gnu.org>");
URL = "http://www.gnustep.org";
URL = "See http://www.gnustep.org/";
Copyright = "Copyright (C) 1999 - 2003 Free Software Foundation";
CopyrightDescription = "Released under the GNU General Public License 2.0";
}

View file

@ -31,8 +31,7 @@
void createMenu();
int
main(int argc, const char **argv)
int main(int argc, const char **argv)
{
#ifdef GNUSTEP_BASE_VERSION
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
@ -58,10 +57,14 @@ createMenu()
NSMenu *info;
NSMenu *project;
#ifdef ENABLE_SUBPROJECTS
NSMenu *subprojects;
#endif
NSMenu *file;
#ifdef ENABLE_ALL_FILE_OPERATIONS
NSMenu *file_view;
#endif
NSMenu *edit;
NSMenu *edit_find;
@ -73,17 +76,23 @@ createMenu()
NSMenu *tools;
NSMenu *tools_build;
#ifdef ENABLE_PROJECTFIND
NSMenu *tools_find;
#endif
#ifdef ENABLE_LOADEDFILES
NSMenu *tools_files;
#endif
NSMenu *tools_launcher;
#ifdef ENABLE_INDEXER
NSMenu *tools_indexer;
#endif
NSMenu *windows;
NSMenu *services;
SEL action = @selector(method:);
menu = [[NSMenu alloc] initWithTitle: @"PC"];
menu = [[NSMenu alloc] initWithTitle: @"ProjectCenter"];
/*
* The main menu
@ -145,13 +154,17 @@ createMenu()
[project addItemWithTitle:@"Remove Files..."
action:@selector(projectRemoveFiles:)
keyEquivalent:@"r"];
#ifdef ENABLE_SUBPROJECTS
[project addItemWithTitle:@"Subprojects"
action:action
keyEquivalent:@""];
#endif
[project addItemWithTitle:@"Close"
action:@selector(projectClose:)
keyEquivalent:@""];
#ifdef ENABLE_SUBPROJECTS
subprojects = [[[NSMenu alloc] init] autorelease];
[project setSubmenu:subprojects
forItem:[project itemWithTitle:@"Subprojects"]];
@ -165,6 +178,8 @@ createMenu()
action:@selector(removeSubproject:)
keyEquivalent:@""];
#endif
/*
* File submenu
*/
@ -191,6 +206,7 @@ createMenu()
[file addItemWithTitle:@"Close"
action:@selector(fileClose:)
keyEquivalent:@"W"];
#ifdef ENABLE_ALL_FILE_OPERATIONS
[file addItemWithTitle:@"View"
action:action
keyEquivalent:@""];
@ -216,6 +232,7 @@ createMenu()
[file_view addItemWithTitle:@"Tear Off"
action:action
keyEquivalent:@"T"];
#endif
/*
* Edit submenu
@ -368,30 +385,41 @@ createMenu()
tools = [[[NSMenu alloc] init] autorelease];
[menu setSubmenu:tools forItem:[menu itemWithTitle:@"Tools"]];
// probert: either use a NSToolbar or remove that!
#ifdef ENABLE_TOOLBAR
[tools addItemWithTitle:@"Hide Tool Bar"
action:action
keyEquivalent:@""];
#endif
[tools addItemWithTitle:@"Inspector..."
action:@selector(showInspector:)
keyEquivalent:@""];
#ifdef ENABLE_LOADEDPROJECTS
[tools addItemWithTitle:@"Loaded Projects..."
action:action
keyEquivalent:@""];
#endif
[tools addItemWithTitle:@"Project Build"
action:action
keyEquivalent:@""];
#ifdef ENABLE_PROJECTFIND
[tools addItemWithTitle:@"Project Find"
action:action
keyEquivalent:@""];
#endif
#ifdef ENABLE_LOADEDFILES
[tools addItemWithTitle:@"Loaded Files"
action:action
keyEquivalent:@""];
#endif
[tools addItemWithTitle:@"Launcher"
action:action
keyEquivalent:@""];
#ifdef ENABLE_INDEXER
[tools addItemWithTitle:@"Indexer"
action:action
keyEquivalent:@""];
#endif
// Project Build
tools_build = [[[NSMenu alloc] init] autorelease];
@ -417,6 +445,7 @@ createMenu()
keyEquivalent:@"<"];
// Project Find
#ifdef ENABLE_PROJECTFIND
tools_find = [[[NSMenu alloc] init] autorelease];
[tools setSubmenu:tools_find
forItem:[tools itemWithTitle:@"Project Find"]];
@ -441,8 +470,10 @@ createMenu()
[tools_find addItemWithTitle:@"Previuos match"
action:action
keyEquivalent:@""];
#endif
// Loaded Files
#ifdef ENABLE_LOADEDFILES
tools_files = [[[NSMenu alloc] init] autorelease];
[tools setSubmenu:tools_files
forItem:[tools itemWithTitle:@"Loaded Files"]];
@ -461,6 +492,8 @@ createMenu()
[tools_files addItemWithTitle:@"Previuos File"
action:action
keyEquivalent:@"_"];
#endif
// Launcher
tools_launcher = [[[NSMenu alloc] init] autorelease];
[tools setSubmenu:tools_launcher
@ -474,6 +507,8 @@ createMenu()
[tools_launcher addItemWithTitle:@"Debug"
action:action
keyEquivalent:@""];
#ifdef ENABLE_INDEXER
// Indexer
tools_indexer = [[[NSMenu alloc] init] autorelease];
[tools setSubmenu:tools_indexer
@ -490,6 +525,7 @@ createMenu()
[tools_indexer addItemWithTitle:@"Index File"
action:action
keyEquivalent:@"*"];
#endif
/*
* Windows submenu

11
README
View file

@ -26,3 +26,14 @@
UI - Many of the icons have been created by Andrew Lindsay
Notes
-----
ProjectCenter 0.3.5 does NOT compile on Mac OS X due to some GNUstep
specific code snippets. Please try the current code from CVS if you
are interested in using ProjectCenter on Mac OS X.
We try to make the next release compile on this platform out of the box
again.

0
Resources/.gitignore vendored Normal file
View file