Use NSNibOwner instead of @"NSOwner". Remove the hard coded "gorm"

extension. Try to use higher level NIB loading methods where possible.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30077 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fredkiefer 2010-03-30 07:54:04 +00:00
parent e523ff6a0e
commit e5373254e4
8 changed files with 102 additions and 98 deletions

View file

@ -25,15 +25,16 @@
Boston, MA 02110-1301, USA.
*/
#include "config.h"
#include "Foundation/NSDictionary.h"
#include "AppKit/NSDataLinkPanel.h"
#include "AppKit/NSDataLinkManager.h"
#include "AppKit/NSDataLink.h"
#include "AppKit/NSGraphics.h"
#include "AppKit/NSView.h"
#include "AppKit/NSNibLoading.h"
#include "GSGuiPrivate.h"
#import "config.h"
#import <Foundation/NSDictionary.h>
#import "AppKit/NSApplication.h"
#import "AppKit/NSDataLinkPanel.h"
#import "AppKit/NSDataLinkManager.h"
#import "AppKit/NSDataLink.h"
#import "AppKit/NSGraphics.h"
#import "AppKit/NSView.h"
#import "AppKit/NSNibLoading.h"
#import "GSGuiPrivate.h"
static NSDataLinkPanel *_sharedDataLinkPanel;
@ -47,19 +48,9 @@ static NSDataLinkPanel *_sharedDataLinkPanel;
@implementation GSDataLinkPanelController
- (id) init
{
NSString *panelPath;
NSDictionary *table;
if ((self = [super init]) != nil)
{
panelPath = [GSGuiBundle() pathForResource: @"GSDataLinkPanel"
ofType: @"gorm"
inDirectory: nil];
NSLog(@"Panel path=%@",panelPath);
table = [NSDictionary dictionaryWithObject: self forKey: @"NSOwner"];
if ([NSBundle loadNibFile: panelPath
externalNameTable: table
withZone: [self zone]] == NO)
if ([NSBundle loadNibNamed: @"GSDataLinkPanel" owner: self] == NO)
{
NSRunAlertPanel(@"Error", @"Could not load data link panel resource",
@"OK", NULL, NULL);