mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 15:11:37 +00:00
[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:
parent
1a89415bdc
commit
e8ce0d207e
1 changed files with 14 additions and 15 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue