- Set disc media for disc page sizes (bug #495672).

This commit is contained in:
Tim Waugh 2009-06-24 09:21:13 +00:00
parent aaf08a1064
commit 8809fb7f17
2 changed files with 60 additions and 1 deletions

52
hplip-disc-media.patch Normal file
View File

@ -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);
}

View File

@ -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 <twaugh@redhat.com> 3.9.2-5
- Set disc media for disc page sizes (bug #495672).
* Mon Mar 9 2009 Tim Waugh <twaugh@redhat.com> 3.9.2-4
- Ship libhpmud.so (bug #489059).
- Fixed no-root-config patch (bug #489055).