mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 16:20:38 +00:00
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:
parent
e523ff6a0e
commit
e5373254e4
8 changed files with 102 additions and 98 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue