From 82a46f64344801a22917b8932372b63b7448fd6a Mon Sep 17 00:00:00 2001 From: Adam Fedor Date: Wed, 30 Aug 2000 22:48:59 +0000 Subject: [PATCH] Implement NSForm loading git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7299 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 6 ++++++ Model/GMAppKit.m | 18 ++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/ChangeLog b/ChangeLog index cde94cd75..f9db185c2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2000-08-29 Georg Fleischmann + + * gui/Model/GMAppKit.m + [NSForm (GMArchiverMethods) initWithModelUnarchiver:]: + new method, allows auto alignment of form titles + Thu Aug 31 00:30:15 2000 Nicola Pero * Source/NSSavePanel.m ([-_initWithoutGModel]): Fixed setting of diff --git a/Model/GMAppKit.m b/Model/GMAppKit.m index c09ddb82a..8d34a212c 100644 --- a/Model/GMAppKit.m +++ b/Model/GMAppKit.m @@ -1538,6 +1538,24 @@ void __dummy_GMAppKit_functionForLinking() {} @end /* NSTextFieldCell (GMArchiverMethods) */ +@implementation NSForm (GMArchiverMethods) + +- (id)initWithModelUnarchiver:(GMUnarchiver*)unarchiver +{ int i; + + self = [super initWithModelUnarchiver:unarchiver]; + [self setValidateSize: YES]; + for (i=[self numberOfRows]-1; i>=0; i--) + [[NSNotificationCenter defaultCenter] + addObserver: self + selector: @selector(_setTitleWidthNeedsUpdate:) + name: _NSFormCellDidChangeTitleWidthNotification + object: [self cellAtIndex:i]]; + return self; +} + +@end /* NSForm (GMArchiverMethods) */ + @implementation NSFormCell (GMArchiverMethods) - (void)encodeWithModelArchiver:(GMArchiver*)archiver