mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-29 19:47:39 +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
4b8af18a65
commit
c5e1f2e6a2
8 changed files with 102 additions and 98 deletions
|
@ -37,6 +37,7 @@
|
|||
#import <Foundation/NSValue.h>
|
||||
#import "AppKit/NSApplication.h"
|
||||
#import "AppKit/NSForm.h"
|
||||
#import "AppKit/NSNib.h"
|
||||
#import "AppKit/NSNibLoading.h"
|
||||
#import "AppKit/NSPrinter.h"
|
||||
#import "AppKit/NSPrintPanel.h"
|
||||
|
@ -138,15 +139,16 @@ static NSPrintPanel *shared_instance;
|
|||
if (self == nil)
|
||||
return nil;
|
||||
|
||||
panel = [GSGuiBundle() pathForResource: GSPANELNAME ofType: @"gorm"
|
||||
inDirectory: nil];
|
||||
// self will come from a bundle, to get the panel from the GUI library
|
||||
// we have to select that bundle explicitly
|
||||
panel = [GSGuiBundle() pathForNibResource: GSPANELNAME];
|
||||
if (panel == nil)
|
||||
{
|
||||
NSRunAlertPanel(@"Error", @"Could not find print panel resource",
|
||||
@"OK", NULL, NULL);
|
||||
return nil;
|
||||
}
|
||||
table = [NSDictionary dictionaryWithObject: self forKey: @"NSOwner"];
|
||||
table = [NSDictionary dictionaryWithObject: self forKey: NSNibOwner];
|
||||
if ([NSBundle loadNibFile: panel
|
||||
externalNameTable: table
|
||||
withZone: [self zone]] == NO)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue