mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 18:11:06 +00:00
Install a generic fallback ppd. Use it for the fallback printer.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@19986 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e8ce1bfa9f
commit
403e326a38
7 changed files with 305 additions and 20 deletions
15
ChangeLog
15
ChangeLog
|
@ -1,3 +1,18 @@
|
|||
2004-09-04 01:34 Alexander Malmberg <alexander@malmberg.org>
|
||||
|
||||
* PrinterTypes/GNUmakefile, PrinterTypes/GNUmakefile.postamble:
|
||||
Revert removal of rules to install .ppd:s.
|
||||
* PrinterTypes/English.lproj/Generic-PostScript_Printer-Postscript.ppd:
|
||||
New file.
|
||||
* Printing/GSLPR/GNUmakefile: Set GNUSTEP_INSTALLATION_DIR.
|
||||
* Printing/GSLPR/GNUmakefile.preamble: Compile with -Wall.
|
||||
* Printing/GSLPR/GSLPRPrinter.m (+printerWithName:): Remove
|
||||
ppdContents variable.
|
||||
(+printersDictionary): Only warn once if a printer hasn't been set
|
||||
in the defaults. Change the type of the fallback printer to
|
||||
Generic-PostScript_Printer-Postscript. Check that the ppd for this
|
||||
printer is found.
|
||||
|
||||
2004-09-04 01:06 Alexander Malmberg <alexander@malmberg.org>
|
||||
|
||||
* Source/GSToolbarView.m (-_insertionIndexAtPoint:): Remove spurious
|
||||
|
|
|
@ -0,0 +1,256 @@
|
|||
*PPD-Adobe: "4.3"
|
||||
*%
|
||||
*% For information on using this, and to obtain the required backend
|
||||
*% script, consult http://www.linuxprinting.org/
|
||||
*%
|
||||
*% This file is published under the GNU General Public License
|
||||
*%
|
||||
*% PPD-O-MATIC (3.0.0 or newer) generated this PPD file. It is for use with
|
||||
*% all programs and environments which use PPD files for dealing with
|
||||
*% printer capability information. The printer must be configured with the
|
||||
*% "foomatic-rip" backend filter script of Foomatic 3.0.0 or newer. This
|
||||
*% file and "foomatic-rip" work together to support PPD-controlled printer
|
||||
*% driver option access with arbitrary free software printer drivers and
|
||||
*% printing spoolers.
|
||||
*%
|
||||
*% To save this file on your disk, wait until the download has completed
|
||||
*% (the animation of the browser logo must stop) and then use the
|
||||
*% "Save as..." command in the "File" menu of your browser or in the
|
||||
*% pop-up manu when you click on this document with the right mouse button.
|
||||
*% DO NOT cut and paste this file into an editor with your mouse. This can
|
||||
*% introduce additional line breaks which lead to unexpected results.
|
||||
*%
|
||||
*% You may save this file as 'Generic-PostScript_Printer-Postscript.ppd'
|
||||
*%
|
||||
*%
|
||||
*FormatVersion: "4.3"
|
||||
*FileVersion: "1.1"
|
||||
*LanguageVersion: English
|
||||
*LanguageEncoding: ISOLatin1
|
||||
*PCFileName: "POSTSCRI.PPD"
|
||||
*Manufacturer: "Generic"
|
||||
*Product: "(PostScript Printer)"
|
||||
*cupsVersion: 1.0
|
||||
*cupsManualCopies: True
|
||||
*cupsModelNumber: 2
|
||||
*cupsFilter: "application/vnd.cups-postscript 0 foomatic-rip"
|
||||
*%pprRIP: foomatic-rip other
|
||||
*ModelName: "Generic PostScript Printer"
|
||||
*ShortNickName: "Generic P.S. Printer Postscript"
|
||||
*NickName: "Generic PostScript Printer Foomatic/Postscript (recommended)"
|
||||
*PSVersion: "(3010.000) 550"
|
||||
*PSVersion: "(3010.000) 651"
|
||||
*PSVersion: "(3010.000) 652"
|
||||
*PSVersion: "(3010.000) 653"
|
||||
*PSVersion: "(3010.000) 704"
|
||||
*PSVersion: "(3010.000) 705"
|
||||
*PSVersion: "(3010.000) 800"
|
||||
*LanguageLevel: "3"
|
||||
*ColorDevice: True
|
||||
*DefaultColorSpace: RGB
|
||||
*FileSystem: False
|
||||
*Throughput: "1"
|
||||
*LandscapeOrientation: Plus90
|
||||
*TTRasterizer: Type42
|
||||
|
||||
|
||||
|
||||
|
||||
*VariablePaperSize: False
|
||||
|
||||
*FoomaticIDs: Generic-PostScript_Printer Postscript
|
||||
*FoomaticRIPCommandLine: "level=%D; printf "%%!\n%%%% %%%%\n%C&qu&&
|
||||
ot;; if (( $level > 0 )); then if (( $level < 99 )); then level=&&
|
||||
" -dLanguageLevel=$level"; else level=""; fi; gs -&&
|
||||
q -dPARANOIDSAFER -dNOPAUSE -dBATCH -sDEVICE=pswrite$level%A%Z -sOutpu&&
|
||||
tFile=- -; else cat; fi"
|
||||
*End
|
||||
|
||||
*OpenGroup: General/General
|
||||
|
||||
*OpenUI *PageSize/Page Size: PickOne
|
||||
*OrderDependency: 100 AnySetup *PageSize
|
||||
*DefaultPageSize: Letter
|
||||
*PageSize Letter/US Letter: "<</PageSize[612 792]/ImagingBBox null>>setpagedevice"
|
||||
*PageSize A4/A4: "<</PageSize[595 842]/ImagingBBox null>>setpagedevice"
|
||||
*PageSize 11x17/11x17: "<</PageSize[792 1224]/ImagingBBox null>>setpagedevice"
|
||||
*PageSize A3/A3: "<</PageSize[842 1191]/ImagingBBox null>>setpagedevice"
|
||||
*PageSize A5/A5: "<</PageSize[421 595]/ImagingBBox null>>setpagedevice"
|
||||
*PageSize B5/B5 (JIS): "<</PageSize[516 729]/ImagingBBox null>>setpagedevice"
|
||||
*PageSize Env10/Envelope #10: "<</PageSize[297 684]/ImagingBBox null>>setpagedevice"
|
||||
*PageSize EnvC5/Envelope C5: "<</PageSize[459 649]/ImagingBBox null>>setpagedevice"
|
||||
*PageSize EnvDL/Envelope DL: "<</PageSize[312 624]/ImagingBBox null>>setpagedevice"
|
||||
*PageSize EnvISOB5/Envelope B5: "<</PageSize[499 709]/ImagingBBox null>>setpagedevice"
|
||||
*PageSize EnvMonarch/Envelope Monarch: "<</PageSize[279 540]/ImagingBBox null>>setpagedevice"
|
||||
*PageSize Executive/Executive: "<</PageSize[522 756]/ImagingBBox null>>setpagedevice"
|
||||
*PageSize Legal/US Legal: "<</PageSize[612 1008]/ImagingBBox null>>setpagedevice"
|
||||
*CloseUI: *PageSize
|
||||
|
||||
*OpenUI *PageRegion: PickOne
|
||||
*OrderDependency: 100 AnySetup *PageRegion
|
||||
*DefaultPageRegion: Letter
|
||||
*PageRegion Letter/US Letter: "<</PageSize[612 792]/ImagingBBox null>>setpagedevice"
|
||||
*PageRegion A4/A4: "<</PageSize[595 842]/ImagingBBox null>>setpagedevice"
|
||||
*PageRegion 11x17/11x17: "<</PageSize[792 1224]/ImagingBBox null>>setpagedevice"
|
||||
*PageRegion A3/A3: "<</PageSize[842 1191]/ImagingBBox null>>setpagedevice"
|
||||
*PageRegion A5/A5: "<</PageSize[421 595]/ImagingBBox null>>setpagedevice"
|
||||
*PageRegion B5/B5 (JIS): "<</PageSize[516 729]/ImagingBBox null>>setpagedevice"
|
||||
*PageRegion Env10/Envelope #10: "<</PageSize[297 684]/ImagingBBox null>>setpagedevice"
|
||||
*PageRegion EnvC5/Envelope C5: "<</PageSize[459 649]/ImagingBBox null>>setpagedevice"
|
||||
*PageRegion EnvDL/Envelope DL: "<</PageSize[312 624]/ImagingBBox null>>setpagedevice"
|
||||
*PageRegion EnvISOB5/Envelope B5: "<</PageSize[499 709]/ImagingBBox null>>setpagedevice"
|
||||
*PageRegion EnvMonarch/Envelope Monarch: "<</PageSize[279 540]/ImagingBBox null>>setpagedevice"
|
||||
*PageRegion Executive/Executive: "<</PageSize[522 756]/ImagingBBox null>>setpagedevice"
|
||||
*PageRegion Legal/US Legal: "<</PageSize[612 1008]/ImagingBBox null>>setpagedevice"
|
||||
*CloseUI: *PageRegion
|
||||
|
||||
*DefaultImageableArea: Letter
|
||||
*ImageableArea Letter/US Letter: "0 0 612 792"
|
||||
*ImageableArea A4/A4: "0 0 595 842"
|
||||
*ImageableArea 11x17/11x17: "0 0 792 1224"
|
||||
*ImageableArea A3/A3: "0 0 842 1191"
|
||||
*ImageableArea A5/A5: "0 0 421 595"
|
||||
*ImageableArea B5/B5 (JIS): "0 0 516 729"
|
||||
*ImageableArea Env10/Envelope #10: "0 0 297 684"
|
||||
*ImageableArea EnvC5/Envelope C5: "0 0 459 649"
|
||||
*ImageableArea EnvDL/Envelope DL: "0 0 312 624"
|
||||
*ImageableArea EnvISOB5/Envelope B5: "0 0 499 709"
|
||||
*ImageableArea EnvMonarch/Envelope Monarch: "0 0 279 540"
|
||||
*ImageableArea Executive/Executive: "0 0 522 756"
|
||||
*ImageableArea Legal/US Legal: "0 0 612 1008"
|
||||
|
||||
*DefaultPaperDimension: Letter
|
||||
*PaperDimension Letter/US Letter: "612 792"
|
||||
*PaperDimension A4/A4: "595 842"
|
||||
*PaperDimension 11x17/11x17: "792 1224"
|
||||
*PaperDimension A3/A3: "842 1191"
|
||||
*PaperDimension A5/A5: "421 595"
|
||||
*PaperDimension B5/B5 (JIS): "516 729"
|
||||
*PaperDimension Env10/Envelope #10: "297 684"
|
||||
*PaperDimension EnvC5/Envelope C5: "459 649"
|
||||
*PaperDimension EnvDL/Envelope DL: "312 624"
|
||||
*PaperDimension EnvISOB5/Envelope B5: "499 709"
|
||||
*PaperDimension EnvMonarch/Envelope Monarch: "279 540"
|
||||
*PaperDimension Executive/Executive: "522 756"
|
||||
*PaperDimension Legal/US Legal: "612 1008"
|
||||
|
||||
*OpenUI *Duplex/Double-Sided Printing: PickOne
|
||||
*FoomaticRIPOption Duplex: enum CmdLine C
|
||||
*OrderDependency: 130 AnySetup *Duplex
|
||||
*DefaultDuplex: Notcapable
|
||||
*Duplex DuplexNoTumble/Long Edge (Standard): "%% FoomaticRIPOptionSetting: Duplex=DuplexNoTumble"
|
||||
*FoomaticRIPOptionSetting Duplex=DuplexNoTumble: "<</Duplex true&&
|
||||
/Tumble false>>setpagedevice\n"
|
||||
*End
|
||||
*Duplex DuplexTumble/Short Edge (Flip): "%% FoomaticRIPOptionSetting: Duplex=DuplexTumble"
|
||||
*FoomaticRIPOptionSetting Duplex=DuplexTumble: "<</Duplex true /&&
|
||||
Tumble true>>setpagedevice\n"
|
||||
*End
|
||||
*Duplex None/Off: "%% FoomaticRIPOptionSetting: Duplex=None"
|
||||
*FoomaticRIPOptionSetting Duplex=None: "<</Duplex false>>s&&
|
||||
etpagedevice\n"
|
||||
*End
|
||||
*Duplex Notcapable/Not capable: "%% FoomaticRIPOptionSetting: Duplex=Notcapable"
|
||||
*FoomaticRIPOptionSetting Duplex=Notcapable: ""
|
||||
*CloseUI: *Duplex
|
||||
|
||||
*OpenUI *Resolution/Resolution: PickOne
|
||||
*FoomaticRIPOption Resolution: enum CmdLine C
|
||||
*OrderDependency: 110 AnySetup *Resolution
|
||||
*DefaultResolution: default
|
||||
*Resolution default/Printer Default: "%% FoomaticRIPOptionSetting: Resolution=default"
|
||||
*FoomaticRIPOptionSetting Resolution=default: ""
|
||||
*Resolution 150x150dpi/150 DPI: "%% FoomaticRIPOptionSetting: Resolution=150x150dpi"
|
||||
*FoomaticRIPOptionSetting Resolution=150x150dpi: "<</HWResolutio&&
|
||||
n[150 150]>>setpagedevice\n"
|
||||
*End
|
||||
*Resolution 300x300dpi/300 DPI: "%% FoomaticRIPOptionSetting: Resolution=300x300dpi"
|
||||
*FoomaticRIPOptionSetting Resolution=300x300dpi: "<</HWResolutio&&
|
||||
n[300 300]>>setpagedevice\n"
|
||||
*End
|
||||
*Resolution 600x600dpi/600 DPI: "%% FoomaticRIPOptionSetting: Resolution=600x600dpi"
|
||||
*FoomaticRIPOptionSetting Resolution=600x600dpi: "<</HWResolutio&&
|
||||
n[600 600]>>setpagedevice\n"
|
||||
*End
|
||||
*Resolution 1200x600dpi/1200x600 DPI: "%% FoomaticRIPOptionSetting: Resolution=1200x600dpi"
|
||||
*FoomaticRIPOptionSetting Resolution=1200x600dpi: "<</HWResoluti&&
|
||||
on[1200 600]>>setpagedevice\n"
|
||||
*End
|
||||
*Resolution 1200x1200dpi/1200 DPI: "%% FoomaticRIPOptionSetting: Resolution=1200x1200dpi"
|
||||
*FoomaticRIPOptionSetting Resolution=1200x1200dpi: "<</HWResolut&&
|
||||
ion[1200 1200]>>setpagedevice\n"
|
||||
*End
|
||||
*Resolution 2400x600dpi/2400x600 DPI: "%% FoomaticRIPOptionSetting: Resolution=2400x600dpi"
|
||||
*FoomaticRIPOptionSetting Resolution=2400x600dpi: "<</HWResoluti&&
|
||||
on[2400 600]>>setpagedevice\n"
|
||||
*End
|
||||
*Resolution 2400x1200dpi/2400x1200 DPI: "%% FoomaticRIPOptionSetting: Resolution=2400x1200dpi"
|
||||
*FoomaticRIPOptionSetting Resolution=2400x1200dpi: "<</HWResolut&&
|
||||
ion[2400 1200]>>setpagedevice\n"
|
||||
*End
|
||||
*Resolution 2400x2400dpi/2400 DPI: "%% FoomaticRIPOptionSetting: Resolution=2400x2400dpi"
|
||||
*FoomaticRIPOptionSetting Resolution=2400x2400dpi: "<</HWResolut&&
|
||||
ion[2400 2400]>>setpagedevice\n"
|
||||
*End
|
||||
*CloseUI: *Resolution
|
||||
|
||||
*CloseGroup: General
|
||||
|
||||
*OpenGroup: Miscellaneous/Miscellaneous
|
||||
|
||||
*OpenUI *PreFilter/GhostScript pre-filtering: PickOne
|
||||
*FoomaticRIPOption PreFilter: enum CmdLine D
|
||||
*OrderDependency: 100 AnySetup *PreFilter
|
||||
*DefaultPreFilter: No
|
||||
*PreFilter EmbedFonts/Embed GhostScript fonts only: "%% FoomaticRIPOptionSetting: PreFilter=EmbedFonts"
|
||||
*FoomaticRIPOptionSetting PreFilter=EmbedFonts: "99"
|
||||
*PreFilter Level1/Convert to PS level 1: "%% FoomaticRIPOptionSetting: PreFilter=Level1"
|
||||
*FoomaticRIPOptionSetting PreFilter=Level1: "1"
|
||||
*PreFilter Level2/Convert to PS level 2: "%% FoomaticRIPOptionSetting: PreFilter=Level2"
|
||||
*FoomaticRIPOptionSetting PreFilter=Level2: "2"
|
||||
*PreFilter No/No pre-filtering: "%% FoomaticRIPOptionSetting: PreFilter=No"
|
||||
*FoomaticRIPOptionSetting PreFilter=No: "0"
|
||||
*CloseUI: *PreFilter
|
||||
|
||||
*CloseGroup: Miscellaneous
|
||||
|
||||
|
||||
*% Generic boilerplate PPD stuff as standard PostScript fonts and so on
|
||||
|
||||
*DefaultFont: Courier
|
||||
*Font AvantGarde-Book: Standard "(001.006S)" Standard ROM
|
||||
*Font AvantGarde-BookOblique: Standard "(001.006S)" Standard ROM
|
||||
*Font AvantGarde-Demi: Standard "(001.007S)" Standard ROM
|
||||
*Font AvantGarde-DemiOblique: Standard "(001.007S)" Standard ROM
|
||||
*Font Bookman-Demi: Standard "(001.004S)" Standard ROM
|
||||
*Font Bookman-DemiItalic: Standard "(001.004S)" Standard ROM
|
||||
*Font Bookman-Light: Standard "(001.004S)" Standard ROM
|
||||
*Font Bookman-LightItalic: Standard "(001.004S)" Standard ROM
|
||||
*Font Courier: Standard "(002.004S)" Standard ROM
|
||||
*Font Courier-Bold: Standard "(002.004S)" Standard ROM
|
||||
*Font Courier-BoldOblique: Standard "(002.004S)" Standard ROM
|
||||
*Font Courier-Oblique: Standard "(002.004S)" Standard ROM
|
||||
*Font Helvetica: Standard "(001.006S)" Standard ROM
|
||||
*Font Helvetica-Bold: Standard "(001.007S)" Standard ROM
|
||||
*Font Helvetica-BoldOblique: Standard "(001.007S)" Standard ROM
|
||||
*Font Helvetica-Narrow: Standard "(001.006S)" Standard ROM
|
||||
*Font Helvetica-Narrow-Bold: Standard "(001.007S)" Standard ROM
|
||||
*Font Helvetica-Narrow-BoldOblique: Standard "(001.007S)" Standard ROM
|
||||
*Font Helvetica-Narrow-Oblique: Standard "(001.006S)" Standard ROM
|
||||
*Font Helvetica-Oblique: Standard "(001.006S)" Standard ROM
|
||||
*Font NewCenturySchlbk-Bold: Standard "(001.009S)" Standard ROM
|
||||
*Font NewCenturySchlbk-BoldItalic: Standard "(001.007S)" Standard ROM
|
||||
*Font NewCenturySchlbk-Italic: Standard "(001.006S)" Standard ROM
|
||||
*Font NewCenturySchlbk-Roman: Standard "(001.007S)" Standard ROM
|
||||
*Font Palatino-Bold: Standard "(001.005S)" Standard ROM
|
||||
*Font Palatino-BoldItalic: Standard "(001.005S)" Standard ROM
|
||||
*Font Palatino-Italic: Standard "(001.005S)" Standard ROM
|
||||
*Font Palatino-Roman: Standard "(001.005S)" Standard ROM
|
||||
*Font Symbol: Special "(001.007S)" Special ROM
|
||||
*Font Times-Bold: Standard "(001.007S)" Standard ROM
|
||||
*Font Times-BoldItalic: Standard "(001.009S)" Standard ROM
|
||||
*Font Times-Italic: Standard "(001.007S)" Standard ROM
|
||||
*Font Times-Roman: Standard "(001.007S)" Standard ROM
|
||||
*Font ZapfChancery-MediumItalic: Standard "(001.007S)" Standard ROM
|
||||
*Font ZapfDingbats: Special "(001.004S)" Standard ROM
|
||||
|
|
@ -29,6 +29,9 @@ include $(GNUSTEP_MAKEFILES)/common.make
|
|||
include ../Version
|
||||
|
||||
RES_INSTALL_DIR = $(GNUSTEP_LIBRARY)/PostScript
|
||||
PPD_INSTALL_DIR = $(GNUSTEP_LIBRARY)/PostScript/PPD
|
||||
|
||||
RESOURCE_DIRS = English.lproj
|
||||
|
||||
RESOURCE_FILES = GSProlog.ps
|
||||
|
||||
|
|
|
@ -41,17 +41,29 @@
|
|||
# Things to do after compiling
|
||||
# after-all::
|
||||
|
||||
$(PPD_INSTALL_DIR):
|
||||
$(MKDIRS) $(PPD_INSTALL_DIR)
|
||||
|
||||
# Things to do before installing
|
||||
# before-install::
|
||||
before-install:: $(PPD_INSTALL_DIR)
|
||||
|
||||
# Things to do after installing
|
||||
after-install::
|
||||
for dirs in $(RESOURCE_DIRS); do \
|
||||
if [ ! -d $(PPD_INSTALL_DIR)/$$dirs ]; then \
|
||||
$(MKDIRS) $(PPD_INSTALL_DIR)/$$dirs ; \
|
||||
fi; \
|
||||
$(INSTALL_DATA) $$dirs/*ppd $(PPD_INSTALL_DIR)/$$dirs/ ; \
|
||||
done; \
|
||||
for file in $(RESOURCE_FILES); do \
|
||||
$(INSTALL_DATA) $$file $(RES_INSTALL_DIR) ; \
|
||||
done
|
||||
|
||||
# Things to do before uninstalling
|
||||
before-uninstall::
|
||||
for file in $(RESOURCE_DIRS); do \
|
||||
rm -rf $(PPD_INSTALL_DIR)/$$file ; \
|
||||
done
|
||||
for file in $(RESOURCE_FILES); do \
|
||||
rm -f $(RES_INSTALL_DIR)/$$file ; \
|
||||
done
|
||||
|
|
|
@ -30,6 +30,7 @@ include $(GNUSTEP_MAKEFILES)/common.make
|
|||
include ../../config.make
|
||||
include ../../Version
|
||||
|
||||
GNUSTEP_INSTALLATION_DIR=$(GNUSTEP_SYSTEM_ROOT)
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
ADDITIONAL_CPPFLAGS +=
|
||||
|
||||
# Additional flags to pass to the Objective-C compiler
|
||||
ADDITIONAL_OBJCFLAGS +=
|
||||
ADDITIONAL_OBJCFLAGS += -Wall
|
||||
|
||||
# Additional flags to pass to the C compiler
|
||||
ADDITIONAL_CFLAGS +=
|
||||
|
@ -33,10 +33,5 @@ ADDITIONAL_TOOL_LIBS +=
|
|||
# WebObjects
|
||||
ADDITIONAL_WO_LIBS +=
|
||||
|
||||
#
|
||||
# Flags dealing with installing and uninstalling
|
||||
#
|
||||
#GNUSTEP_INSTALLATION_DIR=$(GNUSTEP_SYSTEM_ROOT)
|
||||
|
||||
# Additional directories to be created during installation
|
||||
#ADDITIONAL_INSTALL_DIRS +=
|
||||
|
|
|
@ -104,7 +104,6 @@
|
|||
{
|
||||
NSDictionary* printersDict;
|
||||
NSDictionary* printerEntry;
|
||||
NSString* ppdContents;
|
||||
NSPrinter* printer;
|
||||
|
||||
printersDict = [self printersDictionary];
|
||||
|
@ -118,9 +117,6 @@
|
|||
return nil;
|
||||
}
|
||||
|
||||
ppdContents = [NSString stringWithContentsOfFile:
|
||||
[printerEntry objectForKey: @"PPDPath"]];
|
||||
|
||||
NSDebugMLLog(@"GSPrinting", @"Creating NSPrinter with Printer Entry: %@",
|
||||
[printerEntry description]);
|
||||
|
||||
|
@ -331,6 +327,7 @@
|
|||
//
|
||||
+ (NSDictionary*) printersDictionary
|
||||
{
|
||||
static BOOL didWarn;
|
||||
NSUserDefaults* defaults;
|
||||
NSDictionary *printers;
|
||||
|
||||
|
@ -338,7 +335,7 @@
|
|||
|
||||
printers = [defaults objectForKey: @"GSLPRPrinters"];
|
||||
|
||||
if( !printers ) //Not set, make a default printer because we are nice.
|
||||
if (!printers) //Not set, make a default printer because we are nice.
|
||||
{
|
||||
NSString *ppdPath;
|
||||
NSMutableDictionary *printerEntry;
|
||||
|
@ -346,12 +343,15 @@
|
|||
printers = [NSMutableDictionary dictionary];
|
||||
printerEntry = [NSMutableDictionary dictionary];
|
||||
|
||||
ppdPath = [NSBundle pathForLibraryResource: @"Apple_LaserWriter_II_NTX"
|
||||
ofType: @"ppd"
|
||||
inDirectory: @"PostScript/PPD"];
|
||||
ppdPath = [NSBundle
|
||||
pathForLibraryResource: @"Generic-PostScript_Printer-Postscript"
|
||||
ofType: @"ppd"
|
||||
inDirectory: @"PostScript/PPD"];
|
||||
NSAssert(ppdPath,
|
||||
@"Couldn't find the PPD file for the fallback printer.");
|
||||
|
||||
[printerEntry setObject: ppdPath
|
||||
forKey: @"PPDPath"];
|
||||
forKey: @"PPDPath"];
|
||||
|
||||
[printerEntry setObject: @"localhost"
|
||||
forKey: @"Host"];
|
||||
|
@ -365,10 +365,13 @@
|
|||
[(NSMutableDictionary*)printers setObject: printerEntry
|
||||
forKey: @"Unnamed"];
|
||||
|
||||
NSLog(@"Creating a default printer since one is not \
|
||||
in the User Defaults (GSLPRPrinters). Description: %@",
|
||||
[printerEntry description]);
|
||||
}
|
||||
if (!didWarn)
|
||||
{
|
||||
NSLog(@"Creating a default printer since no printer has been set "
|
||||
@"in the user defaults (under the GSLPRPrinters key).");
|
||||
didWarn = YES;
|
||||
}
|
||||
}
|
||||
|
||||
return printers;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue