[initPrintInfoDefaults] use hardcoded @GNUSTEP_INSTALL_LIBDIR only

for non-GNUstep foundation library.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@11601 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2001-12-02 11:45:24 +00:00
parent 1a89415bdc
commit e8ce0d207e

View file

@ -37,18 +37,6 @@
#include <AppKit/NSPrintInfo.h>
#ifndef NSPrinterAdmin_PATH
#define NSPrinterAdmin_PATH @GNUSTEP_INSTALL_LIBDIR @"/PrinterAdmin"
#endif
#ifndef NSPrintInfo_PAPERFILE
#define NSPrintInfo_PAPERFILE @"PaperSizes"
#endif
#ifndef NSPrintInfo_DEFAULTSTABLE
#define NSPrintInfo_DEFAULTSTABLE @"PrintDefaults"
#endif
#define NSNUMBER(val) [NSNumber numberWithInt: val]
#define DICTSET(dict, obj, key) \
[dict setObject: obj forKey: key]
@ -386,11 +374,22 @@ NSDictionary *paperSizes = nil;
+ initPrintInfoDefaults
{
NSString *defPrinter, *str;
NSBundle *adminBundle;
NSString *path;
NSPrinter *printer;
adminBundle = [NSBundle bundleWithPath:NSPrinterAdmin_PATH];
path = [adminBundle pathForResource:NSPrintInfo_DEFAULTSTABLE ofType:nil];
#ifdef GNUSTEP_BASE_LIBRARY
path = [NSBundle pathForGNUstepResource: @"PrintDefaults"
ofType: nil
inDirectory: @"PrinterAdmin"];
#else
NSBundle *adminBundle;
adminBundle = [NSBundle bundleWithPath: @GNUSTEP_INSTALL_LIBDIR]
path = [adminBundle pathForResource: @"PrintDefaults"
ofType: nil
inDirectory: @"PrinterAdmin"];
#endif
defPrinter = nil;
if (path != nil && [path length] != 0)
{