Minor fixes for intercell spacing validation, popubutton fixes

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@11084 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 2001-10-05 02:34:59 +00:00
parent bfc6f87df4
commit b316362eef
4 changed files with 19 additions and 4 deletions

View file

@ -1,3 +1,12 @@
2001-10-04 Adam Fedor <fedor@gnu.org>
* GormClassManager.m (-renameClass:): Change sender method to
work with fixed popupButtons.
* GormWindowEditor.m
(-_validateFrame:forViewPtr:withEvent:update:update): Don't compute
new intercell spacing when only onw row or col.
2001-10-03 Adam Fedor <fedor@gnu.org>
* Add support for custom views

View file

@ -30,6 +30,9 @@
);
Super = NSObject;
};
NSPanel = {
Super = NSWindow;
};
NSSlider = {
Super = NSControl;
};

View file

@ -1188,7 +1188,7 @@ selectCellWithString: (NSString*)title
GormClassManager *cm = [(id)[(id)NSApp activeDocument] classManager];
NSLog(@"change superclass");
if ([cm setSuperClassNamed: [sender titleOfSelectedItem]
if ([cm setSuperClassNamed: [sender title]
forClassNamed: [object className]] == NO)
{
NSRunAlertPanel(@"Error", @"Cyclic definition", @"OK", NULL, NULL);

View file

@ -356,9 +356,12 @@ static BOOL done_editing;
if (([theEvent modifierFlags] & NSControlKeyMask) == NSControlKeyMask)
{
/* Keep the cell size the same but increase the intercell spacing. */
if ([view isKindOfClass: [NSForm class]] == NO)
intercellSpace.width = (NSWidth(frame)-cellSize.width*cols)/(cols-1);
intercellSpace.height = (NSHeight(frame)-cellSize.height*rows)/(rows-1);
if ([view isKindOfClass: [NSForm class]] == NO && cols > 1)
intercellSpace.width = (NSWidth(frame)-cellSize.width*cols)
/ (cols-1);
if (rows > 1)
intercellSpace.height = (NSHeight(frame)-cellSize.height*rows)
/ (rows-1);
if (intercellSpace.width < 0)
return NO;
if (intercellSpace.height < 0)