From 10a906ca42c7868a6627c43966d3224790e0e180 Mon Sep 17 00:00:00 2001 From: Gregory John Casamento Date: Sun, 27 Mar 2005 11:16:36 +0000 Subject: [PATCH] Correction for minor bug. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@20981 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 7 +++++++ GormClassEditor.m | 24 ++++++++++++++++++++++++ GormOutlineView.m | 15 --------------- GormPrivate.h | 1 + 4 files changed, 32 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0697edeb..313bde5b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-03-27 06:24 Gregory John Casamento + + * GormClassEditor.m: Added addAttributeToClass here. Also + added a check to prevent changing the outline row count. + * GormOutlineView.m: Removed addAttributeToClass from here. + * GormPrivate.h: Moved addAttributeToClass to class editor. + 2005-03-26 10:18 Gregory John Casamento * install-windows.sh: Installation script for windows. diff --git a/GormClassEditor.m b/GormClassEditor.m index 118c1b04..6cfa2951 100644 --- a/GormClassEditor.m +++ b/GormClassEditor.m @@ -30,6 +30,11 @@ NSString *GormClassPboardType = @"GormClassPboardType"; +@interface GormOutlineView (PrivateMethods) +- (void) _addNewActionToObject: (id)item; +- (void) _addNewOutletToObject: (id)item; +@end + @implementation GormClassEditor - (GormClassEditor*) initWithDocument: (GormDocument*)doc @@ -474,6 +479,25 @@ NSString *GormClassPboardType = @"GormClassPboardType"; } } + +- (void) addAttributeToClass +{ + if (_isEditing == YES) + { + if (_edittype == Actions) + { + [self _addNewActionToObject: _itemBeingEdited]; + } + if (_edittype == Outlets) + { + if([classManager isCustomClass: _itemBeingEdited]) + { + [self _addNewOutletToObject: _itemBeingEdited]; + } + } + } +} + /* - (void) handleNotification: (NSNotification *)notification { diff --git a/GormOutlineView.m b/GormOutlineView.m index 83d9faab..0f699a3a 100644 --- a/GormOutlineView.m +++ b/GormOutlineView.m @@ -633,21 +633,6 @@ static NSColor *darkGreyBlueColor = nil; return _edittype; } -- (void) addAttributeToClass -{ - if (_isEditing == YES) - { - if (_edittype == Actions) - { - [self _addNewActionToObject: _itemBeingEdited]; - } - if (_edittype == Outlets) - { - [self _addNewOutletToObject: _itemBeingEdited]; - } - } -} - - (void) editColumn: (int) columnIndex row: (int) rowIndex withEvent: (NSEvent *) theEvent diff --git a/GormPrivate.h b/GormPrivate.h index 41c0232d..dabc201c 100644 --- a/GormPrivate.h +++ b/GormPrivate.h @@ -184,6 +184,7 @@ extern NSString *GormResizeCellNotification; - (BOOL) currentSelectionIsClass; - (void) editClass; - (void) createSubclass; +- (void) addAttributeToClass; - (void) deleteSelection; @end