From eddb4ce19b8d25c58a043b1f21bb8865ba27e620 Mon Sep 17 00:00:00 2001 From: gcasa Date: Thu, 24 Jul 2003 03:45:36 +0000 Subject: [PATCH] Added changes to load new .gorm file git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17327 72102866-910b-0410-8b05-ffd578937521 --- Source/NSSpellChecker.m | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Source/NSSpellChecker.m b/Source/NSSpellChecker.m index 9d9e0684d..09dd8177b 100644 --- a/Source/NSSpellChecker.m +++ b/Source/NSSpellChecker.m @@ -5,8 +5,8 @@ Copyright (C) 2001, 1996 Free Software Foundation, Inc. - Author: Gregory John Casamento - Date: 2001 + Author: Gregory John Casamento + Date: 2001,2003 Author: Scott Christley Date: 1996 @@ -256,9 +256,10 @@ static int __documentTag = 0; - init { NSArray *userLanguages = [NSUserDefaults userLanguages]; + NSString *panel = nil; // Set the language to the default for the user. - [super init]; + self = [super init]; _language = [userLanguages objectAtIndex: 0]; _wrapFlag = NO; _position = 0; @@ -268,11 +269,13 @@ static int __documentTag = 0; _ignoredWords = [NSMutableDictionary new]; // Load the gmodel file - if(![GSGuiBundle() loadNibFile: @"SpellPanel.gmodel" + panel = [GSGuiBundle() pathForResource: @"GSSpellPanel" ofType: @"gorm" + inDirectory: nil]; + if(![NSBundle loadNibFile: panel externalNameTable: [NSDictionary dictionaryWithObject: self forKey: @"NSOwner"] withZone: [self zone]]) { - NSLog(@"NIB file load failed for SpellPanel"); + NSLog(@"Model file load failed for GSSpellPanel"); return nil; } @@ -284,6 +287,7 @@ static int __documentTag = 0; { RELEASE(_ignoredWords); RELEASE(_serverProxy); + [super dealloc]; } //