Fix for nib loading. Correct behavior of NSWindowTemplate when loading nibs.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@29184 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2009-12-31 04:39:18 +00:00
parent 63a656b958
commit 2806b5ba47
3 changed files with 20 additions and 0 deletions

View file

@ -1,3 +1,10 @@
2009-12-30 23:40-EST Gregory John Casamento <greg.casamento@gmail.com>
* Plugins/Nib/GormNibWrapperLoader.m: Remove reference to
GSClassSwapper and replace it with NSClassSwapper.
* Plugins/Nib/GormWindowTemplate.m: Override the
baseWindowClass method to return GormNSWindow as appropriate.
2009-12-27 01:17-EST Gregory John Casamento <greg.casamento@gmail.com> 2009-12-27 01:17-EST Gregory John Casamento <greg.casamento@gmail.com>
* Gorm.m * Gorm.m

View file

@ -35,6 +35,8 @@
#include "GormNibWrapperLoader.h" #include "GormNibWrapperLoader.h"
#include "GormWindowTemplate.h" #include "GormWindowTemplate.h"
@class GormNSWindow;
@implementation GormNibWrapperLoader @implementation GormNibWrapperLoader
+ (NSString *) fileType + (NSString *) fileType
{ {
@ -126,6 +128,7 @@
* handling class replacement so that standard objects understood * handling class replacement so that standard objects understood
* by the gui library are converted to their Gorm internal equivalents. * by the gui library are converted to their Gorm internal equivalents.
*/ */
u = [[NSKeyedUnarchiver alloc] initForReadingWithData: data]; u = [[NSKeyedUnarchiver alloc] initForReadingWithData: data];
[u setDelegate: self]; [u setDelegate: self];
@ -138,6 +141,8 @@
forClassName: @"NSCustomView"]; forClassName: @"NSCustomView"];
[u setClass: [GormWindowTemplate class] [u setClass: [GormWindowTemplate class]
forClassName: @"NSWindowTemplate"]; forClassName: @"NSWindowTemplate"];
[u setClass: [GormNSWindow class]
forClassName: @"NSWindow"];
/* /*
* Substitute any classes specified by the palettes... * Substitute any classes specified by the palettes...
@ -316,6 +321,7 @@
result = YES; result = YES;
} }
} }
[NSClassSwapper setIsInInterfaceBuilder: NO];
} }
} }
NS_HANDLER NS_HANDLER

View file

@ -24,6 +24,8 @@
#include "GormWindowTemplate.h" #include "GormWindowTemplate.h"
@class GormNSWindow;
@interface NSWindow (Private) @interface NSWindow (Private)
- (void) _setReleasedWhenClosed: (BOOL)flags; - (void) _setReleasedWhenClosed: (BOOL)flags;
@end @end
@ -46,5 +48,10 @@
return object; return object;
} }
- (Class) baseWindowClass
{
return [GormNSWindow class];
}
@end @end