Commit dc0e9c87 authored by Gürkan Sengün's avatar Gürkan Sengün Committed by Eric Heintzmann

Import Debian patch 1.2.1-1

parents 643c8242 9f61120d
1 ANNOUNCE
**********
This is version 1.1.0 of Gorm.
This is version 1.2.1 of Gorm.
1.1 What is Gorm?
=================
......@@ -12,27 +12,10 @@ GNUstep Object Relationship Modeler).
Gorm is a clone of the NeXTstep `Interface Builder' application for
GNUstep.
1.2 Noteworthy changes in version `1.1.0'
1.2 Noteworthy changes in version `1.2.1'
=========================================
* Changed Gorm architecture to use NSDocument classes.
* Abstracted model loading mechanism. This was done by implementing
a set of "Loader" and "Builder" classes which handle filling in
the data structures in Gorm and exporting them to external formats.
* Implemented GormNibWrapperLoader and GormNibWrapperBuilder for
reading and writing Cocoa NIB files.
* Implemented GormGormWrapperLoader and GormGormWrapperBuilder for
reading and writing GNUstep Gorm files
* Implemented GormGModelWrapperLoader for reading GNUstep gmodel
files.
* Updated icon
* A number of bugs have been addressed in this release.
* Minor corrections to previous release.
1.3 How can I get support for this software?
============================================
......
This diff is collapsed.
......@@ -15,7 +15,6 @@ include $(GNUSTEP_MAKEFILES)/common.make
PACKAGE_NAME=Controller
APP_NAME=Controller
GNUSTEP_INSTALLATION_DIR=$(GNUSTEP_LOCAL_ROOT)/
Controller_MAIN_MODEL_FILE=MainMenu.gorm
#
......
......@@ -15,7 +15,6 @@ include $(GNUSTEP_MAKEFILES)/common.make
PACKAGE_NAME=SimpleApp
APP_NAME=SimpleApp
GNUSTEP_INSTALLATION_DIR=$(GNUSTEP_LOCAL_ROOT)/
SimpleApp_MAIN_MODEL_FILE=MainMenu.gorm
#
......
GNUSTEP_INSTALLATION_DIR = $(GNUSTEP_SYSTEM_ROOT)
include $(GNUSTEP_MAKEFILES)/common.make
include ../Version
......
......@@ -6,6 +6,7 @@
@c %**end of header
@defcodeindex cl
@defcodeindex pr
@dircategory Development
@include version.texi
......
......@@ -4,6 +4,26 @@
@include version.texi
@end ifset
@section Noteworthy changes in version @samp{1.2.1}
@itemize @bullet
@item Minor corrections to previous release.
@end itemize
@ifclear ANNOUNCE-ONLY
@c ====================================================================
@c Keep the next line just below the list of changes in most recent version.
@section Noteworthy changes in version @samp{1.2.0}
@itemize @bullet
@item Corrections to some editors to not change seslection if connection is in progress.
@item Force menu style to NSNextStepInterfaceStyle for editing purposes.
@item Correction for memory issue when closing document.
@item Minor bug fixes.
@end itemize
@section Noteworthy changes in version @samp{1.1.0}
@itemize @bullet
......@@ -16,10 +36,6 @@
@item A number of bugs have been addressed in this release.
@end itemize
@ifclear ANNOUNCE-ONLY
@c ====================================================================
@c Keep the next line just below the list of changes in most recent version.
@section Noteworthy changes in version @samp{1.0.8}
This is a bugfix release.
......
{
"## Comment" = "Do NOT change this file, Gorm maintains it";
FirstResponder = {
Actions = (
"createClassFiles:",
"createSubclass:",
"instantiateClass:",
"loadClass:",
"toggleView:",
"removeClass:"
);
Super = NSObject;
};
GormClassEditor = {
Actions = (
"instantiateClass:",
"createSubclass:",
"loadClass:",
"createClassFiles:",
"removeClass:",
"toggleView:"
);
Outlets = (
classesView,
mainView,
viewToggle
);
Super = NSView;
};
}
\ No newline at end of file
{"## Comment" = "Do NOT change this file, Gorm maintains it"; FirstResponder = {Actions = ("selectArchiveType:"); Super = NSObject; }; GSNibContainer = {Actions = (); Outlets = (); Super = NSObject; }; GormDocument = {Actions = (); Outlets = (selectionBox, filePrefsView, filePrefsManager, filePrefsWindow); Super = NSDocument; }; GormFilePrefsManager = {Actions = ("showIncompatibilities:", "selectTargetVersion:", "selectArchiveType:"); Outlets = (showIncompatibilities, targetVersion, gormAppVersion, archiveType, iwindow, itable); Super = NSObject; }; }
\ No newline at end of file
{
"## Comment" = "Do NOT change this file, Gorm maintains it";
FirstResponder = {
Actions = (
"createClassFiles:",
"createSubclass:",
"instantiateClass:",
"loadClass:",
"remove:",
"selectArchiveType:"
);
Super = NSObject;
};
GSNibContainer = {
Actions = (
);
Outlets = (
);
Super = NSObject;
};
GormDocument = {
Actions = (
"createSubclass:",
"loadClass:",
"createClassFiles:",
"instantiateClass:",
"remove:"
);
Outlets = (
selectionBox,
filePrefsView,
filePrefsManager,
filePrefsWindow
);
Super = NSDocument;
};
GormFilePrefsManager = {
Actions = (
"showIncompatibilities:",
"selectTargetVersion:",
"selectArchiveType:"
);
Outlets = (
showIncompatibilities,
targetVersion,
gormAppVersion,
archiveType,
iwindow,
itable,
fileType
);
Super = NSObject;
};
}
\ No newline at end of file
{
"## Comment" = "Do NOT change this file, Gorm maintains it";
GormHelpInspector = {
Actions = (
);
Outlets = (
toolTip
);
Super = IBInspector;
};
}
\ No newline at end of file
......@@ -24,8 +24,8 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# Install into the system root by default
GNUSTEP_INSTALLATION_DIR = $(GNUSTEP_SYSTEM_ROOT)
# Put in the system directory...
GNUSTEP_INSTALLATION_DOMAIN=SYSTEM
include $(GNUSTEP_MAKEFILES)/common.make
......@@ -128,9 +128,12 @@ Gorm_RESOURCE_FILES = \
Images/GormView.tiff \
Images/LeftArr.tiff \
Images/RightArr.tiff \
Images/GormTesting.tiff
Images/GormTesting.tiff \
Images/outlineView.tiff \
Images/browserView.tiff
Gorm_LOCALIZED_RESOURCE_FILES = \
GormClassEditor.gorm \
GormClassInspector.gorm \
GormClassPanel.gorm \
GormConnectionInspector.gorm \
......@@ -138,6 +141,7 @@ Gorm_LOCALIZED_RESOURCE_FILES = \
GormDocument.gorm \
GormDummyInspector.gorm \
GormFontView.gorm \
GormHelpInspector.gorm \
Gorm.gorm \
GormImageInspector.gorm \
GormInspectorPanel.gorm \
......
......@@ -127,6 +127,13 @@
}
}
// force the menu style to be NextStep so that we always edit in
// that style...
[[NSUserDefaults standardUserDefaults]
setObject: @"NSNextStepInterfaceStyle"
forKey: @"NSMenuInterfaceStyle"];
/*
* load the interface...
*/
......@@ -993,11 +1000,12 @@
{
return;
}
if (connectDestination == nil || connectSource == nil)
if (connectSource == nil)
{
return;
}
if ([[self activeDocument] containsObject: connectDestination] == NO)
if (connectDestination
&& [[self activeDocument] containsObject: connectDestination] == NO)
{
NSLog(@"Oops - connectDestination not in active document");
return;
......
......@@ -24,9 +24,6 @@
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA
#
# Install into the system root by default
GNUSTEP_INSTALLATION_DIR = $(GNUSTEP_SYSTEM_ROOT)
include $(GNUSTEP_MAKEFILES)/common.make
PACKAGE_NAME=GormCore
......@@ -37,6 +34,8 @@ GormCore_HEADER_FILES_INSTALL_DIR=/GormCore
ADDITIONAL_INCLUDE_DIRS = -I..
srcdir = .
include ../Version
GormCore_HEADER_FILES = \
GormBoxEditor.h \
GormClassEditor.h \
......@@ -49,11 +48,13 @@ GormCore_HEADER_FILES = \
GormCustomView.h \
GormDocument.h \
GormDocumentController.h \
GormDocumentWindow.h \
GormFilePrefsManager.h \
GormFilesOwner.h \
GormFontViewController.h \
GormFunctions.h \
GormGenericEditor.h \
GormHelpInspector.h \
GormImage.h \
GormImageEditor.h \
GormImageInspector.h \
......@@ -105,11 +106,13 @@ GormCore_OBJC_FILES = \
GormCustomView.m \
GormDocument.m \
GormDocumentController.m \
GormDocumentWindow.m \
GormFilePrefsManager.m \
GormFilesOwner.m \
GormFontViewController.m \
GormFunctions.m \
GormGenericEditor.m \
GormHelpInspector.m \
GormGormWrapperBuilder.m \
GormGormWrapperLoader.m \
GormGModelWrapperLoader.m \
......
......@@ -34,7 +34,7 @@
extern NSString *GormClassPboardType;
extern NSString *GormSwitchViewPreferencesNotification;
@interface GormClassEditor : NSBox <IBEditors, IBSelectionOwners>
@interface GormClassEditor : NSView <IBEditors, IBSelectionOwners>
{
GormDocument *document;
GormClassManager *classManager;
......@@ -42,6 +42,9 @@ extern NSString *GormSwitchViewPreferencesNotification;
NSScrollView *scrollView;
GormOutlineView *outlineView;
NSBrowser *browserView;
id classesView;
id mainView;
id viewToggle;
}
- (GormClassEditor*) initWithDocument: (GormDocument*)doc;
+ (GormClassEditor*) classEditorForDocument: (GormDocument*)doc;
......@@ -53,13 +56,19 @@ extern NSString *GormSwitchViewPreferencesNotification;
- (void) selectClass: (NSString *)className;
- (BOOL) currentSelectionIsClass;
- (void) editClass;
- (void) createSubclass;
// - (void) createSubclass;
- (void) addAttributeToClass;
- (void) deleteSelection;
- (NSArray *) fileTypes;
- (void) reloadData;
- (BOOL) isEditing;
- (id) instantiateClass: (id)sender;
- (id) createSubclass: (id)sender;
- (id) loadClass: (id)sender;
- (id) createClassFiles: (id)sender;
- (id) removeClass: (id)sender;
@end
#endif
This diff is collapsed.
......@@ -94,6 +94,10 @@
- (NSDictionary *) dictionaryForClassNamed: (NSString *)className;
- (NSString *) uniqueClassNameFrom: (NSString *)name;
- (BOOL) isRootClass: (NSString *)className;
- (BOOL) outletExists: (NSString *)outlet
onClassNamed: (NSString *)className;
- (BOOL) actionExists: (NSString *)action
onClassNamed: (NSString *)className;
/* Managing custom classes */
- (BOOL) isCustomClass: (NSString *)className;
......@@ -115,6 +119,7 @@
- (NSString *) nonCustomSuperClassOf: (NSString *)className;
- (BOOL) isAction: (NSString *)actionName onCategoryForClassNamed: (NSString *)className;
- (NSString *) classNameForObject: (id)object;
- (NSString *) findClassByName: (NSString *)name;
/* Parsing and creating classes */
- (BOOL) makeSourceAndHeaderFilesForClass: (NSString *)className
......
......@@ -269,9 +269,9 @@
{
BOOL result = NO;
NSString *classNameCopy = [NSString stringWithString: className];
NSString *superClassNameCopy = [NSString stringWithString: superClassName];
NSMutableArray *actionsCopy = [NSMutableArray arrayWithArray: actions];
NSMutableArray *outletsCopy = [NSMutableArray arrayWithArray: outlets];
NSString *superClassNameCopy = (superClassName != nil)?[NSString stringWithString: superClassName]:nil;
NSMutableArray *actionsCopy = (actions != nil)?[NSMutableArray arrayWithArray: actions]:[NSMutableArray array];
NSMutableArray *outletsCopy = (outlets != nil)?[NSMutableArray arrayWithArray: outlets]:[NSMutableArray array];
// We make an autoreleased copy of all of the inputs. This prevents changes
// to the original objects from reflecting here. GJC
......@@ -299,7 +299,10 @@
[classInfo setObject: outletsCopy forKey: @"Outlets"];
[classInfo setObject: actionsCopy forKey: @"Actions"];
[classInfo setObject: superClassNameCopy forKey: @"Super"];
if(superClassNameCopy != nil)
{
[classInfo setObject: superClassNameCopy forKey: @"Super"];
}
[classInformation setObject: classInfo forKey: classNameCopy];
// if it's a custom class add it to the list.
......@@ -947,6 +950,20 @@
return [self classInfoForClassName: className];
}
- (BOOL) actionExists: (NSString *)action
onClassNamed: (NSString *)className
{
NSArray *actions = [self allActionsForClassNamed: className];
return [actions containsObject: action];
}
- (BOOL) outletExists: (NSString *)outlet
onClassNamed: (NSString *)className
{
NSArray *outlets = [self allOutletsForClassNamed: className];
return [outlets containsObject: outlet];
}
- (void) dealloc
{
RELEASE(classInformation);
......@@ -998,7 +1015,7 @@
referenceClassList: [classInformation allKeys]
intoArray: array];
return array;
return [array sortedArrayUsingSelector: @selector(caseInsensitiveCompare:)];
}
- (NSArray *) allCustomSubclassesOf: (NSString *)superClass
......@@ -1009,7 +1026,7 @@
referenceClassList: customClasses
intoArray: array];
return array;
return [array sortedArrayUsingSelector: @selector(caseInsensitiveCompare:)];
}
- (NSArray *) customSubClassesOf: (NSString *)superclass
......@@ -1049,7 +1066,7 @@
}
}
return subclasses;
return [subclasses sortedArrayUsingSelector: @selector(caseInsensitiveCompare:)];
}
- (void) removeClassNamed: (NSString *)className
......@@ -1878,14 +1895,26 @@
}
}
if([self isKnownClass: superClass] &&
[cls isCategory] == NO &&
superClass != nil)
if(([self isKnownClass: superClass] || superClass == nil) &&
[cls isCategory] == NO)
{
if([self isKnownClass: className])
{
if([document removeConnectionsForClassNamed: className])
NSString *title = [NSString stringWithFormat:
_(@"Reparsing Class")];
NSString *msg = [NSString stringWithFormat:
_(@"This may break connections to "
@"actions/outlets to instances of class '%@' "
@"and it's subclasses. Continue?"),
className];
int retval = NSRunAlertPanel(title, msg,_(@"OK"),_(@"Cancel"), nil, nil);
if (retval == NSAlertDefaultReturn)
{
// get the owner and reset the class name to NSApplication.
GormFilesOwner *owner = [document objectForName: @"NSOwner"];
NSString *ownerClassName = [owner className];
// delete the class..
[self removeClassNamed: className];
......@@ -1894,6 +1923,12 @@
withSuperClassNamed: superClass
withActions: actions
withOutlets: outlets];
// refresh the connections.
[document refreshConnectionsForClassNamed: className];
// reset the class name.
[owner setClassName: ownerClassName];
}
}
else
......@@ -1908,7 +1943,7 @@
{
[self addActions: actions forClassNamed: className];
}
else if(superClass != nil)
else if(superClass != nil && [self isKnownClass: superClass] == NO)
{
result = NO;
[NSException raise: NSGenericException
......@@ -2044,6 +2079,7 @@
- (NSArray *) allSuperClassesOf: (NSString *)className
{
NSMutableArray *classes = [NSMutableArray array];
while (![self isRootClass: className] && className != nil)
{
NSDictionary *dict = [self classInfoForClassName: className];
......@@ -2061,7 +2097,8 @@
break;
}
}
return classes;
return classes;
}
- (void) addActions: (NSArray *)actions forClassNamed: (NSString *)className
......@@ -2162,6 +2199,39 @@
return YES;
}
- (NSString *) findClassByName: (NSString *)name
{
NSArray *classNames = [self allClassNames];
NSEnumerator *en = [classNames objectEnumerator];
NSString *className = nil;
int namelen = [name length];
while((className = [en nextObject]) != nil)
{
int classlen = [className length];
if(namelen < classlen)
{
NSComparisonResult result =
[className compare: name
options: NSCaseInsensitiveSearch
range: ((NSRange){0, namelen})];
if(result == NSOrderedSame)
{
break;
}
}
else if(namelen == classlen)
{
if([className caseInsensitiveCompare: name] == NSOrderedSame)
{
break;
}
}
}
return className;
}
- (NSString *) description
{
return [NSString stringWithFormat: @"<%s: %lx> = %@",
......
......@@ -61,6 +61,11 @@
return self;
}
- (void) awakeFromNib
{
[newBrowser setDoubleAction: @selector(ok:)];
}
- (int) browser: (NSBrowser*)sender numberOfRowsInColumn: (int)column
{
int rows = 0;
......@@ -476,7 +481,9 @@ selectCellWithString: (NSString*)title
[oldBrowser loadColumnZero];
[oldBrowser setPath: path];
}
[[(id<IB>)NSApp activeDocument] touch]; /* mark as edited. */
// mark as edited.
[super ok: sender];
[self updateButtons];
}
......
......@@ -41,16 +41,17 @@
- (id)initWithFrame:(NSRect)frameRect
{
self = [super initWithFrame: frameRect];
[self setBackgroundColor: [NSColor darkGrayColor]];
[self setTextColor: [NSColor whiteColor]];
[self setDrawsBackground: YES];
[self setAlignment: NSCenterTextAlignment];
[self setFont: [NSFont boldSystemFontOfSize: 0]];
[self setEditable: NO];
[self setSelectable: NO];
[self setClassName: @"CustomView"];
if(self != nil)
{
[self setBackgroundColor: [NSColor darkGrayColor]];
[self setTextColor: [NSColor whiteColor]];
[self setDrawsBackground: YES];
[self setAlignment: NSCenterTextAlignment];
[self setFont: [NSFont boldSystemFontOfSize: 0]];
[self setEditable: NO];
[self setSelectable: NO];
[self setClassName: @"CustomView"];
}
return self;
}
......
......@@ -31,7 +31,8 @@
#include <GNUstepGUI/GSNibContainer.h>
#include <InterfaceBuilder/InterfaceBuilder.h>
@class GormClassManager, GormClassEditor, GormObjectProxy, GormFilesOwner, GormFilePrefsManager;
@class GormClassManager, GormClassEditor, GormObjectProxy, GormFilesOwner,
GormFilePrefsManager, GormDocumentWindow;
/*
* Trivial classes for connections from objects to their editors, and from
......@@ -61,7 +62,7 @@
GormFirstResponder *firstResponder;
GormObjectProxy *fontManager;
NSMapTable *objToName;
NSWindow *window;
GormDocumentWindow *window;
NSBox *selectionBox;
NSScrollView *scrollView;
NSScrollView *classesScrollView;
......@@ -191,6 +192,12 @@
*/
- (void) changeToViewWithTag: (int)tag;
/**
* returns the view using the specified tag.
* They are 0=objects, 1=images, 2=sounds, 3=classes, 4=file prefs.
*/
- (NSView *)viewWithTag:(int)tag;
/**
* Returns all pasteboard types registered for with the IBResourceManager.
*/
......@@ -207,8 +214,6 @@
- (id) createClassFiles: (id)sender;
- (id) addAttributeToClass: (id)sender;
- (id) remove: (id)sender;
- (id) createClassFiles: (id)sender;
- (id) instantiateClass: (id)sender;
- (void) selectClass: (NSString *)className;
- (void) selectClass: (NSString *)className editClass: (BOOL)flag;
- (BOOL) classIsSelected;
......@@ -251,6 +256,12 @@
- (BOOL) renameConnectionsForClassNamed: (NSString *)name
toName: (NSString *)newName;
/**
* Refresh all connections to any and all instances of className. Checks if
* the class has the action/outlet present and deletes it, if it doesn't.
*/
- (void) refreshConnectionsForClassNamed: (NSString *)className;
/* class loading */
/**
......
This diff is collapsed.
......@@ -97,7 +97,7 @@
defer: NO];
}
[aWindow setFrameTopLeftPoint:
NSMakePoint(220, frame.size.height-100)];
NSMakePoint(230, frame.size.height-100)];
[aWindow setTitle: _(@"My Window")];
[doc setName: @"My Window" forObject: aWindow];
[doc attachObject: aWindow toParent: nil];
......@@ -139,7 +139,7 @@
}
[aWindow setFrameTopLeftPoint:
NSMakePoint(220, frame.size.height-100)];
NSMakePoint(230, frame.size.height-100)];
[aWindow setTitle: _(@"Inspector Window")];
[doc setName: @"InspectorWin" forObject: aWindow];
[doc attachObject: aWindow toParent: nil];
......@@ -169,7 +169,7 @@
}
[aWindow setFrameTopLeftPoint:
NSMakePoint(220, frame.size.height-100)];
NSMakePoint(230, frame.size.height-100)];
[aWindow setTitle: _(@"Palette Window")];
[doc setName: @"PaletteWin" forObject: aWindow];
[doc attachObject: aWindow toParent: nil];
......
#ifndef __INCLUDED_GormDocumentWindow_h
/* GormDocumentWindow.h
*