From 8809fb7f17bffd51a680bcb21616ead45662bc61 Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Wed, 24 Jun 2009 09:21:13 +0000 Subject: [PATCH] - Set disc media for disc page sizes (bug #495672). --- hplip-disc-media.patch | 52 ++++++++++++++++++++++++++++++++++++++++++ hplip.spec | 9 +++++++- 2 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 hplip-disc-media.patch diff --git a/hplip-disc-media.patch b/hplip-disc-media.patch new file mode 100644 index 0000000..5f4882b --- /dev/null +++ b/hplip-disc-media.patch @@ -0,0 +1,52 @@ +diff -up hplip-3.9.2/prnt/hpijs/dj9xxvip.cpp.disc-media hplip-3.9.2/prnt/hpijs/dj9xxvip.cpp +--- hplip-3.9.2/prnt/hpijs/dj9xxvip.cpp.disc-media 2009-02-20 00:38:04.000000000 +0000 ++++ hplip-3.9.2/prnt/hpijs/dj9xxvip.cpp 2009-06-24 09:54:12.176317380 +0100 +@@ -500,6 +500,23 @@ DRIVER_ERROR HeaderDJ990::Send() + QUALITY_MODE eQualityMode; + BOOL bDeviceText; + ++ /* select media type and media source for CD/DVD printing ++ * as soon as this size has been selected. ++ * This is convenient for the user. It is also necessary, ++ * as CD/DVD cannot be selected as media type and media source ++ * with the hplip PPD files. ++ */ ++ switch(thePrintContext->thePaperSize) ++ { ++ case CDDVD_80: ++ case CDDVD_120: ++ thePrintContext->SetMediaType(MEDIA_CDDVD); ++ SetMediaType(mediaCDDVD); ++ thePrintContext->SetMediaSource (sourceTrayCDDVD); ++ SetMediaSource (sourceTrayCDDVD); ++ break; ++ } ++ + thePrintContext->GetPrintModeSettings (eQualityMode, eMediaType, eColorMode, bDeviceText); + if (eMediaType == MEDIA_CDDVD) + { +@@ -516,7 +533,9 @@ DRIVER_ERROR HeaderDJ990::Send() + * on what was selected from ppd. + */ + +- SetMediaType (MediaTypeToPcl (eMediaType)); ++ /* This is causing, that CD/DVD cannot be printed at all: ++ */ ++ // SetMediaType (MediaTypeToPcl (eMediaType)); + #endif + + StartSend(); +@@ -733,11 +752,12 @@ void HeaderDJ990::SetMediaSource(MediaSo + msrccount=EscAmplCopy((BYTE*)mediasource,msource,'H'); + if (msource == sourceTrayCDDVD) + { ++ thePrintContext->SetMediaType (MEDIA_CDDVD); + SetMediaType (mediaCDDVD); + SetQuality (qualityPresentation); + return; + } +- if (msource == sourceTray2 || msource > sourceTrayAuto) ++ else if (msource == sourceTray2 || msource > sourceTrayAuto) + { + SetMediaType (mediaPlain); + } diff --git a/hplip.spec b/hplip.spec index c73f12a..1bbc127 100644 --- a/hplip.spec +++ b/hplip.spec @@ -1,7 +1,7 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.9.2 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2+ and MIT Group: System Environment/Daemons Conflicts: system-config-printer < 0.6.132 @@ -22,6 +22,7 @@ Patch6: hplip-strstr-const.patch Patch8: hplip-libsane.patch Patch12: hplip-no-root-config.patch Patch13: hplip-ui-optional.patch +Patch14: hplip-disc-media.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires(pre): /sbin/service @@ -127,6 +128,9 @@ rm -rf $RPM_BUILD_DIR/%{name}-%{version} # Make utils.checkPyQtImport() look for the gui sub-package (bug #243273). %patch13 -p1 -b .ui-optional +# Set disc media for disc page sizes (bug #495672). +%patch14 -p1 -b .disc-media + %build %configure --disable-foomatic-xml-install --disable-cups-install \ --enable-scan-build --enable-gui-build --enable-fax-build \ @@ -327,6 +331,9 @@ fi exit 0 %changelog +* Wed Jun 24 2009 Tim Waugh 3.9.2-5 +- Set disc media for disc page sizes (bug #495672). + * Mon Mar 9 2009 Tim Waugh 3.9.2-4 - Ship libhpmud.so (bug #489059). - Fixed no-root-config patch (bug #489055).