summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDidier Raboud <odyx@debian.org>2019-09-13 17:03:37 +0200
committerDidier Raboud <odyx@debian.org>2019-09-13 17:03:37 +0200
commit6dfe6cc6ca42f40954f565d09daad62e869f3dcd (patch)
tree3992ee4191ca74f0fbfd2601e26219f0a76dd0d1
parent35bb78bac1ded7cd9409a54d0ceb03f609bb12f1 (diff)
git-debrebase convert-from-dgit-view: drop upstream changes from breakwater
Drop upstream changes, and delete debian/patches, as part of converting to git-debrebase format. Upstream changes will appear as commits. [git-debrebase convert-from-dgit-view drop-patches]
-rw-r--r--Makefile.am34
-rw-r--r--base/g.py6
-rw-r--r--base/pkit.py9
-rw-r--r--base/sixext.py4
-rw-r--r--base/utils.py17
-rwxr-xr-xcheck.py8
-rwxr-xr-xconfigure.in2
-rw-r--r--data/models/models.dat77
-rw-r--r--debian/.rules.kate-swpbin0 -> 399 bytes
-rw-r--r--debian/patches/0021-Add-include-cups-ppd.h-in-various-places-as-CUPS-2.2.patch50
-rw-r--r--debian/patches/0022-Fix-list-wrapping-in-scan.py-to-fix-generated-manpag.patch24
-rw-r--r--debian/patches/0023-Fix-handling-of-unicode-filenames-in-sixext.py.patch29
-rw-r--r--debian/patches/0024-Make-dat2drv-and-locateppd-build-dependent-of-class-.patch45
-rw-r--r--debian/patches/0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch113
-rw-r--r--debian/patches/0026-Call-QMessageBox-constructors-of-PyQT5-with-the-corr.patch473
-rw-r--r--debian/patches/0027-Fixed-incomplete-removal-of-hp-toolbox-features-whic.patch41
-rw-r--r--debian/patches/0028-hp-check-Fix-core.distro-vs.-core.distro_name-mixups.patch52
-rw-r--r--debian/patches/0029-Make-base.g.xint-more-generous-in-what-it-can-take.patch29
-rw-r--r--debian/patches/0030-Fix-linking-of-libhpipp-and-the-ext-python-extension.patch59
-rw-r--r--debian/patches/01_rss.patch127
-rw-r--r--debian/patches/14_charsign_fixes.patch28
-rw-r--r--debian/patches/HP-LaserJet_4000-PostScript-PPD.patch38
-rw-r--r--debian/patches/add-lidil-two-cartridge-modes.patch132
-rw-r--r--debian/patches/cope-with-ErnieFilter-absence.patch81
-rw-r--r--debian/patches/hp-plugin-download-fix.patch40
-rw-r--r--debian/patches/hp-systray-make-menu-appear-in-sni-qt-indicator-with-kde.patch27
-rw-r--r--debian/patches/hp-systray-make-menu-title-visible-in-sni-qt-indicator.patch53
-rw-r--r--debian/patches/hp_photosmart_pro_b9100_support.patch100
-rw-r--r--debian/patches/hpaio-option-duplex.diff45
-rw-r--r--debian/patches/hpfax-bug-function-used-before-importing-log.patch29
-rw-r--r--debian/patches/hpscan-deskjet-3520-aio-allow-non-jpeg-scanning.patch153
-rw-r--r--debian/patches/install-check-plugin.diff31
-rw-r--r--debian/patches/musb-c-do-not-crash-on-usb-failure.patch103
-rw-r--r--debian/patches/order-page-sizes-consistently.patch24
-rw-r--r--debian/patches/pcardext-python3-workaround-upstream.patch149
-rw-r--r--debian/patches/pjl-duplex-binding.patch84
-rw-r--r--debian/patches/series30
-rw-r--r--debian/patches/simple-scan-as-default.patch58
-rw-r--r--debian/patches/try_libhpmud.so.0.patch77
-rw-r--r--debian/patches/ui-patch-upstream-like.patch68
-rwxr-xr-xfax/backend/hpfax.py5
-rw-r--r--io/hpmud/musb.c32
-rw-r--r--pcard/pcardext/pcardext.c59
-rw-r--r--pcard/photocard.py2
-rw-r--r--prnt/drv/hpijs.drv.in20
-rw-r--r--prnt/drv/hpijs.drv.in.template20
-rw-r--r--prnt/hpcups/HPCupsFilter.cpp21
-rw-r--r--prnt/hpcups/HPCupsFilter.h2
-rw-r--r--prnt/hpcups/Pcl3Gui2.cpp17
-rw-r--r--prnt/hpcups/Pcl3Gui2.h1
-rw-r--r--prnt/hpijs/breaks_open.cpp5
-rw-r--r--prnt/hpijs/dj660_maps.cpp5
-rw-r--r--prnt/hpijs/dj690_maps.cpp5
-rw-r--r--prnt/hpijs/dj895_maps.cpp5
-rw-r--r--prnt/hpijs/dj895_maps2.cpp5
-rw-r--r--prnt/hpijs/dj970_maps.cpp6
-rw-r--r--prnt/hpijs/dj970_maps3.cpp3
-rw-r--r--prnt/hpijs/hpcupsfax.cpp1
-rw-r--r--prnt/hpijs/ljcolor.cpp13
-rw-r--r--prnt/hpijs/ljjetready.cpp11
-rw-r--r--prnt/hpijs/ljmono.cpp13
-rw-r--r--prnt/ps/hp-laserjet_4000_series-ps.ppd11
-rwxr-xr-xscan.py6
-rw-r--r--scan/sane/bb_ledm.c47
-rw-r--r--scan/sane/ledm.c12
-rw-r--r--scan/sane/marvell.c10
-rwxr-xr-xscan/sane/scl.c5
-rw-r--r--scan/sane/sclpml.c21
-rw-r--r--scan/sane/soap.c9
-rw-r--r--scan/sane/soapht.c9
-rw-r--r--ui/devmgr4.py16
-rw-r--r--ui/faxaddrbookform.py6
-rw-r--r--ui/faxsendjobform.py6
-rw-r--r--ui/firmwaredialog.py2
-rw-r--r--ui/makecopiesform.py4
-rw-r--r--ui/nodevicesform.py2
-rw-r--r--ui/pluginform2.py4
-rw-r--r--ui/printerform.py2
-rw-r--r--ui/settingsdialog.py4
-rw-r--r--ui/setupform.py10
-rw-r--r--ui/unloadform.py2
-rw-r--r--ui/upgradeform.py4
-rw-r--r--ui5/devmgr5.py14
-rw-r--r--ui5/devmgr5_base.ui31
-rw-r--r--ui5/fabwindow.py2
-rw-r--r--ui5/nodevicesdialog.py3
-rw-r--r--ui5/plugindialog.py2
-rw-r--r--ui5/queuesconf.py2
-rw-r--r--ui5/setupdialog.py6
-rw-r--r--ui5/systemtray.py28
-rw-r--r--ui5/ui_utils.py2
-rw-r--r--ui5/wifisetupdialog_base.ui2
-rwxr-xr-xunload.py5
93 files changed, 270 insertions, 2819 deletions
diff --git a/Makefile.am b/Makefile.am
index a704cddf1..891660d02 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -166,7 +166,7 @@ if !HPLIP_CLASS_DRIVER
dist_hplip_SCRIPTS = hpssd.py __init__.py hpdio.py
endif #HPLIP_CLASS_DRIVER
-dist_noinst_DATA += prnt/drv/hpijs.drv.in.template prnt/drv/hpcups.drv.in.template
+dist_noinst_DATA += prnt/drv/hpijs.drv.in.template prnt/drv/hpcups.drv.in.template prnt/hpcups/libImageProcessor-x86_64.so prnt/hpcups/libImageProcessor-x86_32.so
dist_noinst_SCRIPTS += dat2drv.py install.py hplip-install init-suse-firewall init-iptables-firewall class_rpm_build.sh hplipclassdriver.spec createPPD.sh Makefile_dat2drv hpijs-drv
if !HPLIP_CLASS_DRIVER
@@ -178,10 +178,10 @@ if !HPLIP_CLASS_DRIVER
dist_cmd_SCRIPTS = align.py info.py print.py toolbox.py clean.py colorcal.py unload.py testpage.py makeuri.py check.py fab.py levels.py \
sendfax.py setup.py makecopies.py probe.py timedate.py firmware.py scan.py systray.py plugin.py linefeedcal.py pqdiag.py \
faxsetup.py devicesettings.py printsettings.py query.py pkservice.py wificonfig.py diagnose_plugin.py uninstall.py \
- upgrade.py config_usb_printer.py diagnose_queues.py logcapture.py doctor.py uiscan.py check-plugin.py
+ upgrade.py config_usb_printer.py diagnose_queues.py logcapture.py doctor.py uiscan.py
homedir = $(hplipdir)
-dist_home_DATA =
+dist_home_DATA = check-plugin.py
dist_home_DATA += hplip_clean.sh
# base
@@ -306,7 +306,7 @@ dist_pcard_DATA = pcard/__init__.py pcard/photocard.py
# pcardext
pcardextdir = $(pyexecdir)
pcardext_LTLIBRARIES = pcardext.la
-pcardext_la_LDFLAGS = -module -avoid-version -lpython$(PYTHON_VERSION)m
+pcardext_la_LDFLAGS = -module -avoid-version
pcardext_la_SOURCES = pcard/pcardext/pcardext.c pcard/fat.c
pcardext_la_CFLAGS = -I$(PYTHONINCLUDEDIR)
@@ -321,7 +321,7 @@ lib_LTLIBRARIES += libhpipp.la
libhpipp_la_SOURCES = protocol/hp_ipp.c protocol/hp_ipp.h protocol/hp_ipp_i.h
libhpipp_la_CFLAGS = -DCONFDIR=\"$(hplip_confdir)\"
libhpipp_la_LDFLAGS = -version-info 0:1:0
-libhpipp_la_LIBADD = -lcups libhpmud.la
+libhpipp_la_LIBADD = libhpmud.la
# cupsext
cupsextdir = $(pyexecdir)
@@ -329,7 +329,7 @@ cupsext_LTLIBRARIES = cupsext.la
cupsext_la_LDFLAGS = -module -avoid-version
cupsext_la_SOURCES = prnt/cupsext/cupsext.c prnt/cupsext/cupsext.h
cupsext_la_CFLAGS = -I$(PYTHONINCLUDEDIR) -Iprotocol
-cupsext_la_LIBADD = -lcups -lpython$(PYTHON_VERSION)m libhpipp.la
+cupsext_la_LIBADD = -lcups libhpipp.la
endif #HPLIP_CLASS_DRIVER
if !HPLIP_CLASS_DRIVER
@@ -341,7 +341,7 @@ dist_scan_DATA = scan/__init__.py scan/sane.py
# scanext
scanextdir = $(pyexecdir)
scanext_LTLIBRARIES = scanext.la
-scanext_la_LDFLAGS = -module -avoid-version -lsane -lpython$(PYTHON_VERSION)m
+scanext_la_LDFLAGS = -module -avoid-version -lsane
scanext_la_SOURCES = scan/scanext/scanext.c
scanext_la_CFLAGS = -I$(PYTHONINCLUDEDIR)
endif #SCAN_BUILD
@@ -351,7 +351,7 @@ endif #!HPLIP_CLASS_DRIVER
if !HPLIP_CLASS_DRIVER
hpmudextdir = $(pyexecdir)
hpmudext_LTLIBRARIES = hpmudext.la
-hpmudext_la_LDFLAGS = -module -avoid-version -lpython$(PYTHON_VERSION)m
+hpmudext_la_LDFLAGS = -module -avoid-version
hpmudext_la_SOURCES = io/mudext/hpmudext.c
hpmudext_la_CFLAGS = -I$(PYTHONINCLUDEDIR)
hpmudext_la_LIBADD = libhpmud.la
@@ -559,7 +559,7 @@ hpcups_SOURCES = prnt/hpcups/HPCupsFilter.cpp prnt/hpcups/HPCupsFilter.h prnt/hp
prnt/hpcups/Mode2.cpp prnt/hpcups/Mode2.h prnt/hpcups/Mode3.cpp prnt/hpcups/Mode3.h \
prnt/hpcups/Mode9.cpp prnt/hpcups/Mode9.h prnt/hpcups/Mode10.cpp prnt/hpcups/Mode10.h \
prnt/hpcups/ModeDeltaPlus.cpp prnt/hpcups/ModeDeltaPlus.h prnt/hpcups/ModeJbig.cpp prnt/hpcups/ModeJbig.h \
- prnt/hpcups/EncapsulatorFactory.cpp prnt/hpcups/EncapsulatorFactory.h \
+ prnt/hpcups/ErnieFilter.cpp prnt/hpcups/ErnieFilter.h prnt/hpcups/EncapsulatorFactory.cpp prnt/hpcups/EncapsulatorFactory.h \
prnt/hpcups/Encapsulator.cpp prnt/hpcups/Encapsulator.h prnt/hpcups/Pcl3.cpp prnt/hpcups/Pcl3.h \
prnt/hpcups/Pcl3Gui.cpp prnt/hpcups/Pcl3Gui.h prnt/hpcups/Pcl3Gui2.cpp prnt/hpcups/Pcl3Gui2.h \
prnt/hpcups/LJMono.cpp prnt/hpcups/LJMono.h prnt/hpcups/LJColor.cpp prnt/hpcups/LJColor.h \
@@ -594,7 +594,7 @@ hpcups_SOURCES = prnt/hpcups/HPCupsFilter.cpp prnt/hpcups/HPCupsFilter.h prnt/hp
prnt/hpcups/ImageProcessor.h
hpcups_CXXFLAGS = $(APDK_ENDIAN_FLAG) $(DBUS_CFLAGS)
-hpcups_LDADD = -L./prnt/hpcups/ -ljpeg -ldl -lcups -lcupsimage -lz $(DBUS_LIBS)
+hpcups_LDADD = -L./prnt/hpcups/ -ljpeg -ldl -lImageProcessor -lcups -lcupsimage -lz $(DBUS_LIBS)
#else
#hpcupsdir = $(cupsfilterdir)
#hpcups_PROGRAMS = hpcups
@@ -620,14 +620,12 @@ endif # FAX_BUILD
endif # HPCUPS ONLY
endif # HPCUPS_INSTALL
-if HPLIP_CLASS_DRIVER
dat2drvdir = $(hplipdir)
dat2drv_PROGRAMS = dat2drv
dat2drv_SOURCES = Common.h Dat2drv.cpp Dat2drv.h Normalize.cpp Normalize.h
if GCC_GE_47
dat2drv_CXXFLAGS = -std=c++11
endif
-endif # HPLIP_CLASS_DRIVER
if HPPS_INSTALL
hppsdir = $(cupsfilterdir)
@@ -638,7 +636,6 @@ hpps_LDADD = -lcups $(DBUS_LIBS)
endif #HPPS_INSTALL
-if HPLIP_CLASS_DRIVER
#locate driver
locatedriverdir = $(hplipdir)
locatedriver_PROGRAMS = locatedriver
@@ -646,6 +643,7 @@ locatedriver_SOURCES = FindPPD.cpp FindPPD.h
if GCC_GE_47
locatedriver_CXXFLAGS = -std=c++11
endif
+if HPLIP_CLASS_DRIVER
dist_locatedriver_DATA = locatedriver
endif #HPLIP_CLASS_DRIVER
@@ -686,6 +684,16 @@ endif #HPLIP_CLASS_DRIVER
install-data-hook:
if HPLIP_BUILD
+ if [ \( "$(UNAME)" = "x86_64" -a -d "$(libdir)/" \) ]; then \
+ cp prnt/hpcups/libImageProcessor-x86_64.so $(libdir)/ ; \
+ chmod 775 $(libdir)/libImageProcessor-x86_64.so ; \
+ ln -sf $(libdir)/libImageProcessor-x86_64.so $(libdir)/libImageProcessor.so ; \
+ fi; \
+ if [ \( \( "$(UNAME)" = "i686" -o "$(UNAME)" = "i386" \) -a -d "$(libdir)/" \) ]; then \
+ cp prnt/hpcups/libImageProcessor-x86_32.so $(libdir)/ ; \
+ chmod 775 $(libdir)/libImageProcessor-x86_32.so ; \
+ ln -sf $(libdir)/libImageProcessor-x86_32.so $(libdir)/libImageProcessor.so ; \
+ fi
if !HPLIP_CLASS_DRIVER
# If scanner build, add hpaio entry to sane dll.conf.
if [ "$(scan_build)" = "yes" ]; then \
diff --git a/base/g.py b/base/g.py
index 15e67fc17..f73e23f97 100644
--- a/base/g.py
+++ b/base/g.py
@@ -326,9 +326,9 @@ def cleanup_spinner():
# Convert string to int and return a list.
def xint(ver):
try:
- l = [int(x.translate(None, '+~')) for x in ver.split('.')]
- except ValueError:
- l = []
+ l = [int(x) for x in ver.split('.')]
+ except:
+ pass
return l
# In case of import failure of extension modules, check whether its a mixed python environment issue.
diff --git a/base/pkit.py b/base/pkit.py
index 6a848efcc..f3f1e44d0 100644
--- a/base/pkit.py
+++ b/base/pkit.py
@@ -35,12 +35,9 @@ import dbus
import dbus.service
if PY3:
- try:
- from gi._gobject import MainLoop
- except:
- from gi.repository.GLib import MainLoop
+ from gi import _gobject as gobject
else:
- from gobject import MainLoop
+ import gobject
import warnings
# Ignore: .../dbus/connection.py:242: DeprecationWarning: object.__init__() takes no parameters
@@ -210,7 +207,7 @@ if utils.to_bool(sys_conf.get('configure', 'policy-kit')):
super(BackendService, self).__init__(connection, path)
self.name = dbus.service.BusName(self.SERVICE_NAME, connection)
- self.loop = MainLoop()
+ self.loop = gobject.MainLoop()
self.version = 0
log.set_level("debug")
diff --git a/base/sixext.py b/base/sixext.py
index 311bf72c6..0bf4fc4f4 100644
--- a/base/sixext.py
+++ b/base/sixext.py
@@ -110,11 +110,11 @@ if PY3:
def to_string_utf8(s):
- return s.decode("utf-8", 'ignore')
+ return s.decode("utf-8")
def to_string_latin(s):
- return s.decode("latin-1", 'ignore')
+ return s.decode("latin-1")
def to_unicode(s, enc=None):
diff --git a/base/utils.py b/base/utils.py
index 9f9cfb113..f268cf830 100644
--- a/base/utils.py
+++ b/base/utils.py
@@ -566,21 +566,18 @@ class UserSettings(object): # Note: Deprecated after 2.8.8 in Qt4 (see ui4/ui_ut
# Scan
self.cmd_scan = ''
- path = which('simple-scan')
+ path = which('xsane')
+
if len(path) > 0:
- self.cmd_scan = 'simple-scan %SANE_URI%'
+ self.cmd_scan = 'xsane -V %SANE_URI%'
else:
- path = which('xsane')
+ path = which('kooka')
if len(path) > 0:
- self.cmd_scan = 'xsane -V %SANE_URI%'
+ self.cmd_scan = 'kooka'
else:
- path = which('kooka')
+ path = which('xscanimage')
if len(path) > 0:
- self.cmd_scan = 'kooka'
- else:
- path = which('xscanimage')
- if len(path) > 0:
- self.cmd_scan = 'xscanimage'
+ self.cmd_scan = 'xscanimage'
# Photo Card
path = which('hp-unload')
diff --git a/check.py b/check.py
index 81330b881..5d3509477 100755
--- a/check.py
+++ b/check.py
@@ -199,7 +199,7 @@ class DependenciesCheck(object):
return
elif d == 'hpaio' and not self.scanning_enabled:
return
- elif self.core.distro_name =="rhel" and "5." in self.distro_version:
+ elif self.core.distro =="rhel" and "5." in self.distro_version:
if d in ['dbus','python-devel','python-dbus','pyqt4-dbus','libnetsnmp-devel','gcc','make','reportlab','policykit','sane-devel','cups-ddk']:
return
@@ -305,14 +305,14 @@ class DependenciesCheck(object):
if self.core.distro_version not in vrs and len(vrs):
supported_distro_vrs= vrs[len(vrs)-1]
log.warn(log.bold("%s-%s version is not supported. Using %s-%s versions dependencies to verify and install..." \
- %(self.core.distro_name, self.core.distro_version, self.core.distro_name, supported_distro_vrs)))
+ %(self.core.distro, self.core.distro_version, self.core.distro, supported_distro_vrs)))
tui.header("SYSTEM INFO")
Sts, Kernel_info =utils.run("uname -r -v -o")
Sts, Host_info =utils.run("uname -n")
Sts, Proc_info =utils.run("uname -r -v -o")
log.info(" Kernel: %s Host: %s Proc: %s Distribution: %s %s"\
- %(Kernel_info,Host_info,Proc_info,self.core.distro_name, self.core.distro_version))
+ %(Kernel_info,Host_info,Proc_info,self.core.distro, self.core.distro_version))
log.info(" Bitness: %s bit\n"%utils.getBitness())
tui.header("HPLIP CONFIGURATION")
v = sys_conf.get('hplip', 'version')
@@ -323,7 +323,7 @@ class DependenciesCheck(object):
if self.core.is_auto_installer_support():
log.info("HPLIP-Installation: Auto installation is supported for %s distro %s version " %(self.core.distro_name, self.core.distro_version))
else:
- log.warn("HPLIP-Installation: Auto installation is not supported for %s distro %s version " %(self.core.distro_name, self.core.distro_version))
+ log.warn("HPLIP-Installation: Auto installation is not supported for %s distro %s version " %(self.core.distro, self.core.distro_version))
log.info()
log.info(log.bold("Current contents of '/etc/hp/hplip.conf' file:"))
diff --git a/configure.in b/configure.in
index cb258e324..55d38bf2c 100755
--- a/configure.in
+++ b/configure.in
@@ -591,7 +591,7 @@ fi
if test "$class_driver" = "no" && test "$hpijs_only_build" = "no" && test "$hpcups_only_build" = "no"; then
AC_CHECK_LIB([cups], [cupsDoFileRequest], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find libcups support], 9)])
- AC_CHECK_HEADERS(cups/cups.h cups/ppd.h, ,[AC_MSG_ERROR([cannot find cups-devel support], 3)])
+ AC_CHECK_HEADERS(cups/cups.h, ,[AC_MSG_ERROR([cannot find cups-devel support], 3)])
if test "$libusb01_build" = "yes"; then
AC_CHECK_LIB([usb], [usb_init], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find libusb support], 2)])
AC_CHECK_HEADERS(usb.h, ,[AC_MSG_ERROR([cannot find libusb-devel support], 11)])
diff --git a/data/models/models.dat b/data/models/models.dat
index 064cb32d9..982bd0a96 100644
--- a/data/models/models.dat
+++ b/data/models/models.dat
@@ -52361,83 +52361,6 @@ usb-pid=d12
usb-vid=3f0
wifi-config=0
-[photosmart_pro_b9100_series]
-align-type=1
-clean-type=1
-color-cal-type=3
-copy-type=0
-embedded-server-type=1
-fax-type=0
-fw-download=False
-icon=Photosmart_Pro_B9180.png
-io-mfp-mode=4
-io-mode=1
-io-support=6
-job-storage=0
-linefeed-cal-type=0
-model1=HP Photosmart Pro B9180gp Photo Printer
-model2=HP Photosmart Pro B9180 Photo Printer
-monitor-type=0
-panel-check-type=1
-pcard-type=0
-plugin=0
-plugin-reason=0
-power-settings=0
-pq-diag-type=0
-r-type=0
-r0-agent1-kind=1
-r0-agent1-sku=C9407A
-r0-agent1-type=16
-r0-agent10-kind=2
-r0-agent10-sku=C9417A
-r0-agent10-type=6
-r0-agent11-kind=2
-r0-agent11-sku=C9418A
-r0-agent11-type=7
-r0-agent12-kind=2
-r0-agent12-sku=C9419A
-r0-agent12-type=8
-r0-agent2-kind=1
-r0-agent2-sku=C9406A
-r0-agent2-type=14
-r0-agent3-kind=1
-r0-agent3-sku=C9405A
-r0-agent3-type=13
-r0-agent4-kind=1
-r0-agent4-sku=C9404A
-r0-agent4-type=15
-r0-agent5-kind=2
-r0-agent5-sku=C9412A
-r0-agent5-type=1
-r0-agent6-kind=2
-r0-agent6-sku=C9413A
-r0-agent6-type=19
-r0-agent7-kind=2
-r0-agent7-sku=C9414A
-r0-agent7-type=17
-r0-agent8-kind=2
-r0-agent8-sku=C9415A
-r0-agent8-type=4
-r0-agent9-kind=2
-r0-agent9-sku=C9416A
-r0-agent9-type=5
-scan-src=0
-scan-type=0
-status-battery-check=0
-status-dynamic-counters=0
-status-type=2
-support-released=True
-support-subtype=219b2b
-support-type=2
-support-ver=2.8.4
-tech-class=PSB9100
-family-class=Undefined
-tech-subclass=Normal
-tech-type=2
-usb-pid=bd02
-usb-vid=3f0
-wifi-config=0
-
[hp_deskjet_9300]
align-type=1
clean-type=1
diff --git a/debian/.rules.kate-swp b/debian/.rules.kate-swp
new file mode 100644
index 000000000..72cd92a57
--- /dev/null
+++ b/debian/.rules.kate-swp
Binary files differ
diff --git a/debian/patches/0021-Add-include-cups-ppd.h-in-various-places-as-CUPS-2.2.patch b/debian/patches/0021-Add-include-cups-ppd.h-in-various-places-as-CUPS-2.2.patch
deleted file mode 100644
index e385e8523..000000000
--- a/debian/patches/0021-Add-include-cups-ppd.h-in-various-places-as-CUPS-2.2.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 6b69d434bff391cf855cf74a4270bd377e1fb75c Mon Sep 17 00:00:00 2001
-From: Till Kamppeter <till.kamppeter@canonical.com>
-Date: Sat, 24 Sep 2016 10:37:20 +0200
-Subject: Add 'include <cups/ppd.h>' in various places as CUPS 2.2 moved some
- definitions to ppd.h
-
----
- configure.in | 2 +-
- prnt/hpcups/HPCupsFilter.h | 2 ++
- prnt/hpijs/hpcupsfax.cpp | 1 +
- 3 files changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/configure.in b/configure.in
-index 55d38bf2c..cb258e324 100755
---- a/configure.in
-+++ b/configure.in
-@@ -591,7 +591,7 @@ fi
-
- if test "$class_driver" = "no" && test "$hpijs_only_build" = "no" && test "$hpcups_only_build" = "no"; then
- AC_CHECK_LIB([cups], [cupsDoFileRequest], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find libcups support], 9)])
-- AC_CHECK_HEADERS(cups/cups.h, ,[AC_MSG_ERROR([cannot find cups-devel support], 3)])
-+ AC_CHECK_HEADERS(cups/cups.h cups/ppd.h, ,[AC_MSG_ERROR([cannot find cups-devel support], 3)])
- if test "$libusb01_build" = "yes"; then
- AC_CHECK_LIB([usb], [usb_init], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find libusb support], 2)])
- AC_CHECK_HEADERS(usb.h, ,[AC_MSG_ERROR([cannot find libusb-devel support], 11)])
-diff --git a/prnt/hpcups/HPCupsFilter.h b/prnt/hpcups/HPCupsFilter.h
-index 3d003d5d2..60f858025 100644
---- a/prnt/hpcups/HPCupsFilter.h
-+++ b/prnt/hpcups/HPCupsFilter.h
-@@ -38,6 +38,8 @@
- #include <cups/ppd.h>
- #include "dbuscomm.h"
-
-+#include <cups/ppd.h>
-+
- #define DBITMAPFILEHEADER 14
- #define DBITMAPINFOHEADER 40
-
-diff --git a/prnt/hpijs/hpcupsfax.cpp b/prnt/hpijs/hpcupsfax.cpp
-index 8514775d4..994e50f39 100644
---- a/prnt/hpijs/hpcupsfax.cpp
-+++ b/prnt/hpijs/hpcupsfax.cpp
-@@ -43,6 +43,7 @@
- #include <arpa/inet.h>
- #include <math.h>
- #include <cups/cups.h>
-+#include <cups/ppd.h>
- #include <cups/raster.h>
- #include <string>
- #ifdef FALSE
diff --git a/debian/patches/0022-Fix-list-wrapping-in-scan.py-to-fix-generated-manpag.patch b/debian/patches/0022-Fix-list-wrapping-in-scan.py-to-fix-generated-manpag.patch
deleted file mode 100644
index 2b06aba08..000000000
--- a/debian/patches/0022-Fix-list-wrapping-in-scan.py-to-fix-generated-manpag.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From 1bacf2e62870064a4236a9ee838557f16197e1dd Mon Sep 17 00:00:00 2001
-From: Didier Raboud <odyx@debian.org>
-Date: Mon, 3 Oct 2016 11:16:48 +0200
-Subject: Fix list wrapping in scan.py to fix generated manpage
-
----
- scan.py | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/scan.py b/scan.py
-index e3437848a..19b5a6353 100755
---- a/scan.py
-+++ b/scan.py
-@@ -250,8 +250,8 @@ try:
- extra_options=[utils.USAGE_SPACE,
- ("[OPTIONS] (General)", "", "header", False),
- ("Scan destinations:", "-s<dest_list> or --dest=<dest_list>", "option", False),
-- ("", "where <dest_list> is a comma separated list containing one or more of: 'file'\*, ", "option", False),
-- ("", "'viewer', 'editor', 'pdf', or 'print'. Use only commas between values, no spaces.", "option", False),
-+ ("", "where <dest_list> is a comma separated list containing one or more of: 'file'", "option", False),
-+ ("", ", 'viewer', 'editor', 'pdf', or 'print'. Use only commas between values, no spaces.", "option", False),
- ("Scan mode:", "-m<mode> or --mode=<mode>. Where <mode> is 'gray'\*, 'color' or 'lineart'.", "option", False),
- ("Scanning resolution:", "-r<resolution_in_dpi> or --res=<resolution_in_dpi> or --resolution=<resolution_in_dpi>", "option", False),
- ("", "where 300 is default.", "option", False),
diff --git a/debian/patches/0023-Fix-handling-of-unicode-filenames-in-sixext.py.patch b/debian/patches/0023-Fix-handling-of-unicode-filenames-in-sixext.py.patch
deleted file mode 100644
index 16b1281b5..000000000
--- a/debian/patches/0023-Fix-handling-of-unicode-filenames-in-sixext.py.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 2ee6e2227e1fe8a4c19a4a38039e1019f72ebea4 Mon Sep 17 00:00:00 2001
-From: Gaurav Sood <gaurav-sood@invalid-email.launchpad.net>
-Date: Thu, 4 May 2017 18:32:08 +0200
-Subject: Fix handling of unicode filenames in sixext.py
-
-LP: #1480152
-Closes: #861731
----
- base/sixext.py | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/base/sixext.py b/base/sixext.py
-index 0bf4fc4f4..311bf72c6 100644
---- a/base/sixext.py
-+++ b/base/sixext.py
-@@ -110,11 +110,11 @@ if PY3:
-
-
- def to_string_utf8(s):
-- return s.decode("utf-8")
-+ return s.decode("utf-8", 'ignore')
-
-
- def to_string_latin(s):
-- return s.decode("latin-1")
-+ return s.decode("latin-1", 'ignore')
-
-
- def to_unicode(s, enc=None):
diff --git a/debian/patches/0024-Make-dat2drv-and-locateppd-build-dependent-of-class-.patch b/debian/patches/0024-Make-dat2drv-and-locateppd-build-dependent-of-class-.patch
deleted file mode 100644
index 1fea45017..000000000
--- a/debian/patches/0024-Make-dat2drv-and-locateppd-build-dependent-of-class-.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From f6b7497ac15dd826fb87714bf50a4274ba9ebaad Mon Sep 17 00:00:00 2001
-From: Didier Raboud <odyx@debian.org>
-Date: Mon, 12 Mar 2018 13:37:19 +0100
-Subject: Make dat2drv and locateppd build dependent of class driver enabling;
- copes with its source code removal from source
-
----
- Makefile.am | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 2db759c03..b9381e277 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -620,12 +620,14 @@ endif # FAX_BUILD
- endif # HPCUPS ONLY
- endif # HPCUPS_INSTALL
-
-+if HPLIP_CLASS_DRIVER
- dat2drvdir = $(hplipdir)
- dat2drv_PROGRAMS = dat2drv
- dat2drv_SOURCES = Common.h Dat2drv.cpp Dat2drv.h Normalize.cpp Normalize.h
- if GCC_GE_47
- dat2drv_CXXFLAGS = -std=c++11
- endif
-+endif # HPLIP_CLASS_DRIVER
-
- if HPPS_INSTALL
- hppsdir = $(cupsfilterdir)
-@@ -636,6 +638,7 @@ hpps_LDADD = -lcups $(DBUS_LIBS)
- endif #HPPS_INSTALL
-
-
-+if HPLIP_CLASS_DRIVER
- #locate driver
- locatedriverdir = $(hplipdir)
- locatedriver_PROGRAMS = locatedriver
-@@ -643,7 +646,6 @@ locatedriver_SOURCES = FindPPD.cpp FindPPD.h
- if GCC_GE_47
- locatedriver_CXXFLAGS = -std=c++11
- endif
--if HPLIP_CLASS_DRIVER
- dist_locatedriver_DATA = locatedriver
- endif #HPLIP_CLASS_DRIVER
-
diff --git a/debian/patches/0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch b/debian/patches/0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch
deleted file mode 100644
index 7caa0631a..000000000
--- a/debian/patches/0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-From bbf260b0e3f2feb7687cbaac2c08aa2ab5e71ba2 Mon Sep 17 00:00:00 2001
-From: Didier Raboud <odyx@debian.org>
-Date: Tue, 21 Aug 2018 18:18:10 +0200
-Subject: Remove all ImageProcessor functionality, which is closed-source
-
----
- Makefile.am | 14 ++------------
- prnt/hpcups/HPCupsFilter.cpp | 21 ---------------------
- 2 files changed, 2 insertions(+), 33 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index b9381e277..839561b10 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -166,7 +166,7 @@ if !HPLIP_CLASS_DRIVER
- dist_hplip_SCRIPTS = hpssd.py __init__.py hpdio.py
- endif #HPLIP_CLASS_DRIVER
-
--dist_noinst_DATA += prnt/drv/hpijs.drv.in.template prnt/drv/hpcups.drv.in.template prnt/hpcups/libImageProcessor-x86_64.so prnt/hpcups/libImageProcessor-x86_32.so
-+dist_noinst_DATA += prnt/drv/hpijs.drv.in.template prnt/drv/hpcups.drv.in.template
- dist_noinst_SCRIPTS += dat2drv.py install.py hplip-install init-suse-firewall init-iptables-firewall class_rpm_build.sh hplipclassdriver.spec createPPD.sh Makefile_dat2drv hpijs-drv
-
- if !HPLIP_CLASS_DRIVER
-@@ -594,7 +594,7 @@ hpcups_SOURCES = prnt/hpcups/HPCupsFilter.cpp prnt/hpcups/HPCupsFilter.h prnt/hp
- prnt/hpcups/ImageProcessor.h
-
- hpcups_CXXFLAGS = $(APDK_ENDIAN_FLAG) $(DBUS_CFLAGS)
--hpcups_LDADD = -L./prnt/hpcups/ -ljpeg -ldl -lImageProcessor -lcups -lcupsimage -lz $(DBUS_LIBS)
-+hpcups_LDADD = -L./prnt/hpcups/ -ljpeg -ldl -lcups -lcupsimage -lz $(DBUS_LIBS)
- #else
- #hpcupsdir = $(cupsfilterdir)
- #hpcups_PROGRAMS = hpcups
-@@ -686,16 +686,6 @@ endif #HPLIP_CLASS_DRIVER
-
- install-data-hook:
- if HPLIP_BUILD
-- if [ \( "$(UNAME)" = "x86_64" -a -d "$(libdir)/" \) ]; then \
-- cp prnt/hpcups/libImageProcessor-x86_64.so $(libdir)/ ; \
-- chmod 775 $(libdir)/libImageProcessor-x86_64.so ; \
-- ln -sf $(libdir)/libImageProcessor-x86_64.so $(libdir)/libImageProcessor.so ; \
-- fi; \
-- if [ \( \( "$(UNAME)" = "i686" -o "$(UNAME)" = "i386" \) -a -d "$(libdir)/" \) ]; then \
-- cp prnt/hpcups/libImageProcessor-x86_32.so $(libdir)/ ; \
-- chmod 775 $(libdir)/libImageProcessor-x86_32.so ; \
-- ln -sf $(libdir)/libImageProcessor-x86_32.so $(libdir)/libImageProcessor.so ; \
-- fi
- if !HPLIP_CLASS_DRIVER
- # If scanner build, add hpaio entry to sane dll.conf.
- if [ "$(scan_build)" = "yes" ]; then \
-diff --git a/prnt/hpcups/HPCupsFilter.cpp b/prnt/hpcups/HPCupsFilter.cpp
-index 5b282d83f..0bacfafac 100644
---- a/prnt/hpcups/HPCupsFilter.cpp
-+++ b/prnt/hpcups/HPCupsFilter.cpp
-@@ -31,7 +31,6 @@
- \*****************************************************************************/
-
- #include "HPCupsFilter.h"
--#include "ImageProcessor.h"
-
- #include <signal.h>
- #include <sys/wait.h>
-@@ -637,16 +636,10 @@ int HPCupsFilter::processRasterData(cups_raster_t *cups_raster)
-
-
- sprintf(hpPreProcessedRasterFile, "%s/hp_%s_cups_SwapedPagesXXXXXX",CUPS_TMP_DIR, m_JA.user_name);
-- image_processor_t* imageProcessor = imageProcessorCreate();
-
- while (cupsRasterReadHeader2(cups_raster, &cups_header))
- {
-
-- IMAGE_PROCESSOR_ERROR result = imageProcessorStartPage(imageProcessor, &cups_header);
-- if (result != IPE_SUCCESS){
-- dbglog("DEBUG: imageProcessorStartPage failed result = %d\n", result);
-- }
--
- current_page_number++;
-
- if (current_page_number == 1) {
-@@ -745,12 +738,6 @@ int HPCupsFilter::processRasterData(cups_raster_t *cups_raster)
- color_raster = rgbRaster;
- black_raster = kRaster;
-
-- result = imageProcessorProcessLine(imageProcessor, m_pPrinterBuffer, cups_header.cupsBytesPerLine);
-- if (result != IPE_SUCCESS){
-- dbglog("DEBUG: imageProcessorProcessLine failed result = %d\n", result);
-- }
--
--
- if ((y == 0) && !is_ljmono) {
- //For ljmono, make sure that first line is not a blankRaster line.Otherwise printer
- //may not skip blank lines before actual data
-@@ -780,12 +767,6 @@ int HPCupsFilter::processRasterData(cups_raster_t *cups_raster)
- }
- } // for() loop end
-
-- result = imageProcessorEndPage(imageProcessor);
-- if (result != IPE_SUCCESS){
-- dbglog("DEBUG: imageProcessorEndPage failed result = %d\n", result);
-- }
--
--
- m_Job.NewPage();
- if (err != NO_ERROR) {
- break;
-@@ -800,8 +781,6 @@ int HPCupsFilter::processRasterData(cups_raster_t *cups_raster)
- rgbRaster = NULL;
- }
-
-- imageProcessorDestroy(imageProcessor);
--
- unlink(hpPreProcessedRasterFile);
- return ret_status;
- }
diff --git a/debian/patches/0026-Call-QMessageBox-constructors-of-PyQT5-with-the-corr.patch b/debian/patches/0026-Call-QMessageBox-constructors-of-PyQT5-with-the-corr.patch
deleted file mode 100644
index 9cc5aaf06..000000000
--- a/debian/patches/0026-Call-QMessageBox-constructors-of-PyQT5-with-the-corr.patch
+++ /dev/null
@@ -1,473 +0,0 @@
-From ba8b2d6ee6e60e3c5d3e521170323e58dbc0a64e Mon Sep 17 00:00:00 2001
-From: Till Kamppeter <till.kamppeter@gmail.com>
-Date: Wed, 3 Oct 2018 15:13:00 +0200
-Subject: Call QMessageBox constructors of PyQT5 with the correct parameters
-
-The whole Python source code of HPLIP contains 40 incorrect calls of
-the QMessageBox constructurs, mostly the list of buttons was given as
-separate arguments instead of a bitwise OR of each button's
-representation value. If the flow of the code hits one of these
-calls (usually when some error or warnings message should be
-displayed or an "Are you sure?" question asked) the GUI app crashes.
-See https://pythonspot.com/pyqt5-messagebox/ for QMessageBox
-documentation.
-This patch corrects all these calls.
-
-Bug-Debian: https://bugs.debian.org/912768
-Bug-Ubuntu: https://bugs.launchpad.net/bugs/1745383
----
- ui/devmgr4.py | 16 ++++++++--------
- ui/faxaddrbookform.py | 6 +++---
- ui/faxsendjobform.py | 6 +++---
- ui/firmwaredialog.py | 2 +-
- ui/makecopiesform.py | 4 ++--
- ui/nodevicesform.py | 2 +-
- ui/pluginform2.py | 4 ++--
- ui/printerform.py | 2 +-
- ui/settingsdialog.py | 4 ++--
- ui/setupform.py | 10 +++++-----
- ui/unloadform.py | 2 +-
- ui/upgradeform.py | 4 ++--
- ui5/devmgr5.py | 6 ++----
- ui5/fabwindow.py | 2 +-
- ui5/nodevicesdialog.py | 3 +--
- ui5/plugindialog.py | 2 +-
- ui5/queuesconf.py | 2 +-
- ui5/setupdialog.py | 6 +++---
- 18 files changed, 40 insertions(+), 43 deletions(-)
-
-diff --git a/ui/devmgr4.py b/ui/devmgr4.py
-index cc2552f91..a868ccac0 100644
---- a/ui/devmgr4.py
-+++ b/ui/devmgr4.py
-@@ -1422,7 +1422,7 @@ class DevMgr4(DevMgr4_base):
- QMessageBox.critical(self,
- self.caption(),
- self.__tr("<b>Unable to find an appropriate su/sudo utility to run hp-plugin.</b><p>Install kdesu, gnomesu, or gksu.</p>"),
-- QMessageBox.Ok,
-+ QMessageBox.Ok |\
- QMessageBox.NoButton,
- QMessageBox.NoButton)
- else:
-@@ -2854,7 +2854,7 @@ class DevMgr4(DevMgr4_base):
- x = QMessageBox.critical(self,
- self.caption(),
- self.__tr("<b>Annoying Confirmation: Are you sure you want to remove this device?</b>"),
-- QMessageBox.Yes,
-+ QMessageBox.Yes |\
- QMessageBox.No | QMessageBox.Default,
- QMessageBox.NoButton)
- if x == QMessageBox.Yes:
-@@ -2949,7 +2949,7 @@ class DevMgr4(DevMgr4_base):
- QMessageBox.critical(self,
- self.caption(),
- error_text,
-- QMessageBox.Ok,
-+ QMessageBox.Ok |\
- QMessageBox.NoButton,
- QMessageBox.NoButton)
-
-@@ -2958,7 +2958,7 @@ class DevMgr4(DevMgr4_base):
- QMessageBox.warning(self,
- self.caption(),
- msg,
-- QMessageBox.Ok,
-+ QMessageBox.Ok |\
- QMessageBox.NoButton,
- QMessageBox.NoButton)
-
-@@ -3115,7 +3115,7 @@ class ScrollTestpageView(ScrollView):
- QMessageBox.information(self,
- self.caption(),
- self.__tr("<p><b>A test page should be printing on your printer.</b><p>If the page fails to print, please visit http://hplip.sourceforge.net for troubleshooting and support."),
-- QMessageBox.Ok,
-+ QMessageBox.Ok |\
- QMessageBox.NoButton,
- QMessageBox.NoButton)
-
-@@ -3130,7 +3130,7 @@ class ScrollTestpageView(ScrollView):
- QMessageBox.critical(self,
- self.caption(),
- error_text,
-- QMessageBox.Ok,
-+ QMessageBox.Ok |\
- QMessageBox.NoButton,
- QMessageBox.NoButton)
-
-@@ -3272,7 +3272,7 @@ class ScrollColorCalView(ScrollView):
- QMessageBox.information(self,
- self.caption(),
- self.__tr("<p><b>A test page should be printing on your printer.</b><p>If the page fails to print, please visit http://hplip.sourceforge.net for troubleshooting and support."),
-- QMessageBox.Ok,
-+ QMessageBox.Ok |\
- QMessageBox.NoButton,
- QMessageBox.NoButton)
-
-@@ -3287,7 +3287,7 @@ class ScrollColorCalView(ScrollView):
- QMessageBox.critical(self,
- self.caption(),
- error_text,
-- QMessageBox.Ok,
-+ QMessageBox.Ok |\
- QMessageBox.NoButton,
- QMessageBox.NoButton)
-
-diff --git a/ui/faxaddrbookform.py b/ui/faxaddrbookform.py
-index 109462207..b23364410 100644
---- a/ui/faxaddrbookform.py
-+++ b/ui/faxaddrbookform.py
-@@ -228,7 +228,7 @@ class FaxAddrBookGroupsForm(FaxAddrBookGroupsForm_base):
- x = QMessageBox.critical(self,
- self.caption(),
- self.__tr("<b>Annoying Confirmation: Are you sure you want to delete this group?</b>"),
-- QMessageBox.Yes,
-+ QMessageBox.Yes |\
- QMessageBox.No | QMessageBox.Default,
- QMessageBox.NoButton)
- if x == QMessageBox.Yes:
-@@ -421,7 +421,7 @@ class FaxAddrBookForm(FaxAddrBookForm_base):
- if QMessageBox.critical(self,
- self.caption(),
- self.__tr("<b>Annoying Confirmation: Are you sure you want to delete this address book entry?</b>"),
-- QMessageBox.Yes,
-+ QMessageBox.Yes |\
- QMessageBox.No | QMessageBox.Default,
- QMessageBox.NoButton) == QMessageBox.Yes:
- db.delete(self.current.entry['name'])
-@@ -451,7 +451,7 @@ class FaxAddrBookForm(FaxAddrBookForm_base):
- QMessageBox.critical(self,
- self.caption(),
- QString(error_text),
-- QMessageBox.Ok,
-+ QMessageBox.Ok |\
- QMessageBox.NoButton,
- QMessageBox.NoButton)
-
-diff --git a/ui/faxsendjobform.py b/ui/faxsendjobform.py
-index 106215c5e..69f424c42 100644
---- a/ui/faxsendjobform.py
-+++ b/ui/faxsendjobform.py
-@@ -210,7 +210,7 @@ class FaxSendJobForm(QMainWindow):
- QMessageBox.information(self,
- self.caption(),
- self.__tr("<p><b>Fax send completed successfully.</b>"),
-- QMessageBox.Ok,
-+ QMessageBox.Ok |\
- QMessageBox.NoButton,
- QMessageBox.NoButton)
-
-@@ -219,7 +219,7 @@ class FaxSendJobForm(QMainWindow):
- QMessageBox.critical(self,
- self.caption(),
- error_text,
-- QMessageBox.Ok,
-+ QMessageBox.Ok |\
- QMessageBox.NoButton,
- QMessageBox.NoButton)
-
-@@ -228,7 +228,7 @@ class FaxSendJobForm(QMainWindow):
- QMessageBox.warning(self,
- self.caption(),
- error_text,
-- QMessageBox.Ok,
-+ QMessageBox.Ok |\
- QMessageBox.NoButton,
- QMessageBox.NoButton)
-
-diff --git a/ui/firmwaredialog.py b/ui/firmwaredialog.py
-index 16b313374..0bcee1164 100644
---- a/ui/firmwaredialog.py
-+++ b/ui/firmwaredialog.py
-@@ -109,7 +109,7 @@ class FirmwareDialog(QDialog, FirmwareDialog_Base):
- QMessageBox.critical(self,
- self.caption(),
- error_text,
-- QMessageBox.Ok,
-+ QMessageBox.Ok |\
- QMessageBox.NoButton,
- QMessageBox.NoButton)
-
-diff --git a/ui/makecopiesform.py b/ui/makecopiesform.py
-index 27f144b36..0fbb573e3 100644
---- a/ui/makecopiesform.py
-+++ b/ui/makecopiesform.py
-@@ -156,7 +156,7 @@ class MakeCopiesForm(QMainWindow):
- QMessageBox.critical(self,
- self.caption(),
- error_text,
-- QMessageBox.Ok,
-+ QMessageBox.Ok |\
- QMessageBox.NoButton,
- QMessageBox.NoButton)
-
-@@ -164,7 +164,7 @@ class MakeCopiesForm(QMainWindow):
- QMessageBox.warning(self,
- self.caption(),
- msg,
-- QMessageBox.Ok,
-+ QMessageBox.Ok |\
- QMessageBox.NoButton,
- QMessageBox.NoButton)
-
-diff --git a/ui/nodevicesform.py b/ui/nodevicesform.py
-index 01f6ae53b..57a696375 100644
---- a/ui/nodevicesform.py
-+++ b/ui/nodevicesform.py
-@@ -67,7 +67,7 @@ class NoDevicesForm(NoDevicesForm_base):
- QMessageBox.critical(self,
- self.caption(),
- self.__tr("<b>An error occurred.</b><p>Please re-start the Device Manager and try again."),
-- QMessageBox.Ok,
-+ QMessageBox.Ok |\
- QMessageBox.NoButton,
- QMessageBox.NoButton)
-
-diff --git a/ui/pluginform2.py b/ui/pluginform2.py
-index 64e64aa77..76cb0238b 100644
---- a/ui/pluginform2.py
-+++ b/ui/pluginform2.py
-@@ -173,7 +173,7 @@ class PluginForm2(PluginForm2_base):
- QMessageBox.critical(self,
- self.caption(),
- error_text,
-- QMessageBox.Ok,
-+ QMessageBox.Ok |\
- QMessageBox.NoButton,
- QMessageBox.NoButton)
-
-@@ -181,7 +181,7 @@ class PluginForm2(PluginForm2_base):
- QMessageBox.information(self,
- self.caption(),
- text,
-- QMessageBox.Ok,
-+ QMessageBox.Ok |\
- QMessageBox.NoButton,
- QMessageBox.NoButton)
-
-diff --git a/ui/printerform.py b/ui/printerform.py
-index 0c6c4f39e..7c10ab07b 100644
---- a/ui/printerform.py
-+++ b/ui/printerform.py
-@@ -154,7 +154,7 @@ class PrinterForm(QMainWindow):
- QMessageBox.critical(self,
- self.caption(),
- error_text,
-- QMessageBox.Ok,
-+ QMessageBox.Ok |\
- QMessageBox.NoButton,
- QMessageBox.NoButton)
-
-diff --git a/ui/settingsdialog.py b/ui/settingsdialog.py
-index 92da22546..24f02fd84 100644
---- a/ui/settingsdialog.py
-+++ b/ui/settingsdialog.py
-@@ -146,7 +146,7 @@ class SettingsDialog(SettingsDialog_base):
- ## QMessageBox.warning(self,
- ## self.caption(),
- ## self.__tr("<b>One or more email addresses are missing.</b><p>Please enter this information and try again."),
--## QMessageBox.Ok,
-+## QMessageBox.Ok |\
- ## QMessageBox.NoButton,
- ## QMessageBox.NoButton)
- ## return
-@@ -163,7 +163,7 @@ class SettingsDialog(SettingsDialog_base):
- ## QMessageBox.information(self,
- ## self.caption(),
- ## self.__tr("<p><b>Please check your email for a test message.</b><p>If the message doesn't arrive, please check your settings and try again."),
--## QMessageBox.Ok,
-+## QMessageBox.Ok |\
- ## QMessageBox.NoButton,
- ## QMessageBox.NoButton)
-
-diff --git a/ui/setupform.py b/ui/setupform.py
-index 307917b02..78863fdd8 100644
---- a/ui/setupform.py
-+++ b/ui/setupform.py
-@@ -602,7 +602,7 @@ class SetupForm(SetupForm_base):
- if ( QMessageBox.warning(self,
- self.caption(),
- warn_text,
-- QMessageBox.Yes,
-+ QMessageBox.Yes |\
- QMessageBox.No,
- QMessageBox.NoButton) == QMessageBox.Yes ):
-
-@@ -804,7 +804,7 @@ class SetupForm(SetupForm_base):
- if QMessageBox.critical(self,
- self.caption(),
- error_text,
-- QMessageBox.Retry | QMessageBox.Default,
-+ QMessageBox.Retry | QMessageBox.Default |\
- QMessageBox.Cancel | QMessageBox.Escape,
- QMessageBox.NoButton) == QMessageBox.Cancel:
- break
-@@ -832,7 +832,7 @@ class SetupForm(SetupForm_base):
- if QMessageBox.critical(self,
- self.caption(),
- error_text,
-- QMessageBox.Retry | QMessageBox.Default,
-+ QMessageBox.Retry | QMessageBox.Default |\
- QMessageBox.Cancel | QMessageBox.Escape,
- QMessageBox.NoButton) == QMessageBox.Cancel:
- break
-@@ -1003,7 +1003,7 @@ class SetupForm(SetupForm_base):
- QMessageBox.critical(self,
- self.caption(),
- error_text,
-- QMessageBox.Ok,
-+ QMessageBox.Ok |\
- QMessageBox.NoButton,
- QMessageBox.NoButton)
-
-@@ -1011,7 +1011,7 @@ class SetupForm(SetupForm_base):
- QMessageBox.warning(self,
- self.caption(),
- error_text,
-- QMessageBox.Ok,
-+ QMessageBox.Ok |\
- QMessageBox.NoButton,
- QMessageBox.NoButton)
-
-diff --git a/ui/unloadform.py b/ui/unloadform.py
-index 8397a689c..ae363e01e 100644
---- a/ui/unloadform.py
-+++ b/ui/unloadform.py
-@@ -135,7 +135,7 @@ class UnloadForm(QMainWindow):
- QMessageBox.critical(self,
- self.caption(),
- error_text,
-- QMessageBox.Ok,
-+ QMessageBox.Ok |\
- QMessageBox.NoButton,
- QMessageBox.NoButton)
-
-diff --git a/ui/upgradeform.py b/ui/upgradeform.py
-index 6b9acf5cc..d0b418419 100644
---- a/ui/upgradeform.py
-+++ b/ui/upgradeform.py
-@@ -118,7 +118,7 @@ class UpgradeForm(UpgradeForm_base):
- QMessageBox.critical(self,
- self.caption(),
- error_text,
-- QMessageBox.Ok,
-+ QMessageBox.Ok |\
- QMessageBox.NoButton,
- QMessageBox.NoButton)
-
-@@ -126,7 +126,7 @@ class UpgradeForm(UpgradeForm_base):
- QMessageBox.information(self,
- self.caption(),
- text,
-- QMessageBox.Ok,
-+ QMessageBox.Ok |\
- QMessageBox.NoButton,
- QMessageBox.NoButton)
-
-diff --git a/ui5/devmgr5.py b/ui5/devmgr5.py
-index 495883f72..0ca016820 100644
---- a/ui5/devmgr5.py
-+++ b/ui5/devmgr5.py
-@@ -139,8 +139,7 @@ class PluginInstall(QObject):
- install_plugin = QMessageBox.warning(self.parent,
- self.parent.windowTitle(),
- self.__tr("<b>The HPLIP plugin is already installed.</b><p>Do you want to continue and re-install it?"),
-- QMessageBox.Yes,
-- QMessageBox.No,
-+ QMessageBox.Yes | QMessageBox.No,
- QMessageBox.NoButton) == QMessageBox.Yes
-
- if install_plugin:
-@@ -149,8 +148,7 @@ class PluginInstall(QObject):
- QMessageBox.critical(self.parent,
- self.parent.windowTitle(),
- self.__tr("<b>Unable to find an appropriate su/sudo utility to run hp-plugin.</b><p>Install kdesu, gnomesu, or gksu.</p>"),
-- QMessageBox.Ok,
-- QMessageBox.NoButton,
-+ QMessageBox.Ok | QMessageBox.NoButton,
- QMessageBox.NoButton)
-
-
-diff --git a/ui5/fabwindow.py b/ui5/fabwindow.py
-index 488b6bbd5..0b95c94f1 100644
---- a/ui5/fabwindow.py
-+++ b/ui5/fabwindow.py
-@@ -344,7 +344,7 @@ class FABWindow(QMainWindow, Ui_MainWindow):
- new_name = to_unicode(self.NameLineEdit.text())
- if new_name != self.name:
- if QMessageBox.question(self, self.__tr("Rename?"), "Rename '%s' to '%s'?"%(self.name,new_name), \
-- QMessageBox.Yes | QMessageBox.No) == QMessageBox.Yes:
-+ QMessageBox.Yes | QMessageBox.No, QMessageBox.No) == QMessageBox.Yes:
-
- self.db.rename(self.name, new_name)
- log.debug("Rename %s to %s" % (self.name, new_name))
-diff --git a/ui5/nodevicesdialog.py b/ui5/nodevicesdialog.py
-index 6083f6d4b..ca86bfcda 100644
---- a/ui5/nodevicesdialog.py
-+++ b/ui5/nodevicesdialog.py
-@@ -64,8 +64,7 @@ class NoDevicesDialog(QDialog, Ui_NoDevicesDialog_base):
- QMessageBox.critical(self,
- self.windowTitle(),
- self.__tr("<b>An error occurred.</b><p>Please re-start the Device Manager and try again."),
-- QMessageBox.Ok,
-- QMessageBox.NoButton,
-+ QMessageBox.Ok | QMessageBox.NoButton,
- QMessageBox.NoButton)
-
-
-diff --git a/ui5/plugindialog.py b/ui5/plugindialog.py
-index e3007f911..1c6b33868 100644
---- a/ui5/plugindialog.py
-+++ b/ui5/plugindialog.py
-@@ -252,7 +252,7 @@ class PluginDialog(QDialog, Ui_Dialog):
-
- if QMessageBox.question(self, " ",
- self.__tr("<b>%s</b><p>Without this, it is not possible to authenticate and validate the plug-in prior to installation.</p>Do you still want to install the plug-in?" %error_str),
-- QMessageBox.Yes | QMessageBox.No) != QMessageBox.Yes:
-+ QMessageBox.Yes | QMessageBox.No, QMessageBox.No) != QMessageBox.Yes:
-
- self.pluginObj.deleteInstallationFiles(download_plugin_file)
- self.close()
-diff --git a/ui5/queuesconf.py b/ui5/queuesconf.py
-index cf2206490..e3c2a0278 100644
---- a/ui5/queuesconf.py
-+++ b/ui5/queuesconf.py
-@@ -245,7 +245,7 @@ class QueuesDiagnose(QDialog, Ui_Dialog):
-
- if QMessageBox.question(self, " ",
- self.__tr("<b>%s</b><p>Without this, it is not possible to authenticate and validate this tool prior to installation.</p>Do you still want to run Smart Install disabler?" %error_str),
-- QMessageBox.Yes | QMessageBox.No) == QMessageBox.Yes:
-+ QMessageBox.Yes | QMessageBox.No, QMessageBox.No) == QMessageBox.Yes:
- # Disabling without verification.
- sts, out = utils.run("sh %s"%smart_install_run)
-
-diff --git a/ui5/setupdialog.py b/ui5/setupdialog.py
-index fbfe5ac9b..120ee1587 100644
---- a/ui5/setupdialog.py
-+++ b/ui5/setupdialog.py
-@@ -873,7 +873,7 @@ class SetupDialog(QDialog, Ui_Dialog):
- self.windowTitle(),
- warn_text,
- QMessageBox.Yes|\
-- QMessageBox.No|\
-+ QMessageBox.No,
- QMessageBox.NoButton) == QMessageBox.Yes ):
- i = 2
- while True:
-@@ -1108,7 +1108,7 @@ class SetupDialog(QDialog, Ui_Dialog):
- if QMessageBox.critical(self,
- self.windowTitle(),
- error_text,
-- QMessageBox.Retry | QMessageBox.Default,
-+ QMessageBox.Retry | QMessageBox.Default |\
- QMessageBox.Cancel | QMessageBox.Escape,
- QMessageBox.NoButton) == QMessageBox.Cancel:
- break
-@@ -1138,7 +1138,7 @@ class SetupDialog(QDialog, Ui_Dialog):
- if QMessageBox.critical(self,
- self.windowTitle(),
- error_text,
-- QMessageBox.Retry | QMessageBox.Default,
-+ QMessageBox.Retry | QMessageBox.Default |\
- QMessageBox.Cancel | QMessageBox.Escape,
- QMessageBox.NoButton) == QMessageBox.Cancel:
- break
diff --git a/debian/patches/0027-Fixed-incomplete-removal-of-hp-toolbox-features-whic.patch b/debian/patches/0027-Fixed-incomplete-removal-of-hp-toolbox-features-whic.patch
deleted file mode 100644
index 834be61b6..000000000
--- a/debian/patches/0027-Fixed-incomplete-removal-of-hp-toolbox-features-whic.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 25ce5194c55bbf80591815f8ad0c197c11e49402 Mon Sep 17 00:00:00 2001
-From: Till Kamppeter <till.kamppeter@gmail.com>
-Date: Wed, 3 Oct 2018 15:13:00 +0200
-Subject: Fixed incomplete removal of hp-toolbox features, which caused the
- hp-toolbox not to start
-
-Looking into the ui5/devmgr5.py of the HPLIP Python source code it
-seems that some features got removed by commenting them out, but this
-removal seems not to have been completed, making non-existing objects
-being called during the start of hp-toolbox and so it crashes right
-away.
-
-This patch completes the commenting-out and so makes hp-toolbox start
-up and work again.
-
-Bug-Debian: https://bugs.debian.org/912768
-Bug-Ubuntu: https://bugs.launchpad.net/bugs/1789184
----
- ui5/devmgr5.py | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/ui5/devmgr5.py b/ui5/devmgr5.py
-index 0ca016820..9d4e82c58 100644
---- a/ui5/devmgr5.py
-+++ b/ui5/devmgr5.py
-@@ -319,11 +319,11 @@ class DevMgr5(Ui_MainWindow_Derived, Ui_MainWindow, QMainWindow):
- self.PreferencesAction.setIcon(QIcon(load_pixmap('settings', '16x16')))
- self.PreferencesAction.triggered.connect(self.PreferencesAction_activated)
-
-- self.DiagnoseQueueAction.setIcon(QIcon(load_pixmap('warning', '16x16')))
-- self.DiagnoseQueueAction.triggered.connect(self.DiagnoseQueueAction_activated)
-+ #self.DiagnoseQueueAction.setIcon(QIcon(load_pixmap('warning', '16x16')))
-+ #self.DiagnoseQueueAction.triggered.connect(self.DiagnoseQueueAction_activated)
-
-- self.DiagnoseHPLIPAction.setIcon(QIcon(load_pixmap('troubleshoot', '16x16')))
-- self.DiagnoseHPLIPAction.triggered.connect(self.DiagnoseHPLIP_activated)
-+ #self.DiagnoseHPLIPAction.setIcon(QIcon(load_pixmap('troubleshoot', '16x16')))
-+ #self.DiagnoseHPLIPAction.triggered.connect(self.DiagnoseHPLIP_activated)
-
- self.ContentsAction.setIcon(QIcon(load_pixmap("help", "16x16")))
- self.ContentsAction.triggered.connect(self.helpContents)
diff --git a/debian/patches/0028-hp-check-Fix-core.distro-vs.-core.distro_name-mixups.patch b/debian/patches/0028-hp-check-Fix-core.distro-vs.-core.distro_name-mixups.patch
deleted file mode 100644
index c55974cd5..000000000
--- a/debian/patches/0028-hp-check-Fix-core.distro-vs.-core.distro_name-mixups.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 14734a2c50364cfcc3ae69c115990d967c690c13 Mon Sep 17 00:00:00 2001
-From: Francois Gouget <fgouget@free.fr>
-Date: Sat, 6 May 2017 00:00:52 +0200
-Subject: hp-check: Fix core.distro vs. core.distro_name mixups.
-
-core.distro is the index of the distribution and is thus not suitable
-for traces and information messages.
-
-Bug-Ubuntu: https://bugs.launchpad.net/bugs/1688684
----
- check.py | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/check.py b/check.py
-index 5d3509477..81330b881 100755
---- a/check.py
-+++ b/check.py
-@@ -199,7 +199,7 @@ class DependenciesCheck(object):
- return
- elif d == 'hpaio' and not self.scanning_enabled:
- return
-- elif self.core.distro =="rhel" and "5." in self.distro_version:
-+ elif self.core.distro_name =="rhel" and "5." in self.distro_version:
- if d in ['dbus','python-devel','python-dbus','pyqt4-dbus','libnetsnmp-devel','gcc','make','reportlab','policykit','sane-devel','cups-ddk']:
- return
-
-@@ -305,14 +305,14 @@ class DependenciesCheck(object):
- if self.core.distro_version not in vrs and len(vrs):
- supported_distro_vrs= vrs[len(vrs)-1]
- log.warn(log.bold("%s-%s version is not supported. Using %s-%s versions dependencies to verify and install..." \
-- %(self.core.distro, self.core.distro_version, self.core.distro, supported_distro_vrs)))
-+ %(self.core.distro_name, self.core.distro_version, self.core.distro_name, supported_distro_vrs)))
-
- tui.header("SYSTEM INFO")
- Sts, Kernel_info =utils.run("uname -r -v -o")
- Sts, Host_info =utils.run("uname -n")
- Sts, Proc_info =utils.run("uname -r -v -o")
- log.info(" Kernel: %s Host: %s Proc: %s Distribution: %s %s"\
-- %(Kernel_info,Host_info,Proc_info,self.core.distro, self.core.distro_version))
-+ %(Kernel_info,Host_info,Proc_info,self.core.distro_name, self.core.distro_version))
- log.info(" Bitness: %s bit\n"%utils.getBitness())
- tui.header("HPLIP CONFIGURATION")
- v = sys_conf.get('hplip', 'version')
-@@ -323,7 +323,7 @@ class DependenciesCheck(object):
- if self.core.is_auto_installer_support():
- log.info("HPLIP-Installation: Auto installation is supported for %s distro %s version " %(self.core.distro_name, self.core.distro_version))
- else:
-- log.warn("HPLIP-Installation: Auto installation is not supported for %s distro %s version " %(self.core.distro, self.core.distro_version))
-+ log.warn("HPLIP-Installation: Auto installation is not supported for %s distro %s version " %(self.core.distro_name, self.core.distro_version))
-
- log.info()
- log.info(log.bold("Current contents of '/etc/hp/hplip.conf' file:"))
diff --git a/debian/patches/0029-Make-base.g.xint-more-generous-in-what-it-can-take.patch b/debian/patches/0029-Make-base.g.xint-more-generous-in-what-it-can-take.patch
deleted file mode 100644
index 02e85ad7f..000000000
--- a/debian/patches/0029-Make-base.g.xint-more-generous-in-what-it-can-take.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From e25b287a1a2bc476ba933904c1d9b9c339e4761d Mon Sep 17 00:00:00 2001
-From: Didier Raboud <odyx@debian.org>
-Date: Tue, 6 Nov 2018 17:57:40 +0100
-Subject: Make base.g.xint more generous in what it can take
-
-Fixes hp-doctor in python with version '2.7.15+'
-
-Closes: #912765
----
- base/g.py | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/base/g.py b/base/g.py
-index f73e23f97..15e67fc17 100644
---- a/base/g.py
-+++ b/base/g.py
-@@ -326,9 +326,9 @@ def cleanup_spinner():
- # Convert string to int and return a list.
- def xint(ver):
- try:
-- l = [int(x) for x in ver.split('.')]
-- except:
-- pass
-+ l = [int(x.translate(None, '+~')) for x in ver.split('.')]
-+ except ValueError:
-+ l = []
- return l
-
- # In case of import failure of extension modules, check whether its a mixed python environment issue.
diff --git a/debian/patches/0030-Fix-linking-of-libhpipp-and-the-ext-python-extension.patch b/debian/patches/0030-Fix-linking-of-libhpipp-and-the-ext-python-extension.patch
deleted file mode 100644
index 74389248d..000000000
--- a/debian/patches/0030-Fix-linking-of-libhpipp-and-the-ext-python-extension.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From c2b8d4e8a3002f319473cc92448d37584901231f Mon Sep 17 00:00:00 2001
-From: Didier Raboud <odyx@debian.org>
-Date: Thu, 6 Dec 2018 20:37:59 +0100
-Subject: Fix linking of libhpipp and the *ext python extensions
-
-Closes: #886391
----
- Makefile.am | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 839561b10..a704cddf1 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -306,7 +306,7 @@ dist_pcard_DATA = pcard/__init__.py pcard/photocard.py
- # pcardext
- pcardextdir = $(pyexecdir)
- pcardext_LTLIBRARIES = pcardext.la
--pcardext_la_LDFLAGS = -module -avoid-version
-+pcardext_la_LDFLAGS = -module -avoid-version -lpython$(PYTHON_VERSION)m
- pcardext_la_SOURCES = pcard/pcardext/pcardext.c pcard/fat.c
- pcardext_la_CFLAGS = -I$(PYTHONINCLUDEDIR)
-
-@@ -321,7 +321,7 @@ lib_LTLIBRARIES += libhpipp.la
- libhpipp_la_SOURCES = protocol/hp_ipp.c protocol/hp_ipp.h protocol/hp_ipp_i.h
- libhpipp_la_CFLAGS = -DCONFDIR=\"$(hplip_confdir)\"
- libhpipp_la_LDFLAGS = -version-info 0:1:0
--libhpipp_la_LIBADD = libhpmud.la
-+libhpipp_la_LIBADD = -lcups libhpmud.la
-
- # cupsext
- cupsextdir = $(pyexecdir)
-@@ -329,7 +329,7 @@ cupsext_LTLIBRARIES = cupsext.la
- cupsext_la_LDFLAGS = -module -avoid-version
- cupsext_la_SOURCES = prnt/cupsext/cupsext.c prnt/cupsext/cupsext.h
- cupsext_la_CFLAGS = -I$(PYTHONINCLUDEDIR) -Iprotocol
--cupsext_la_LIBADD = -lcups libhpipp.la
-+cupsext_la_LIBADD = -lcups -lpython$(PYTHON_VERSION)m libhpipp.la
- endif #HPLIP_CLASS_DRIVER
-
- if !HPLIP_CLASS_DRIVER
-@@ -341,7 +341,7 @@ dist_scan_DATA = scan/__init__.py scan/sane.py
- # scanext
- scanextdir = $(pyexecdir)
- scanext_LTLIBRARIES = scanext.la
--scanext_la_LDFLAGS = -module -avoid-version -lsane
-+scanext_la_LDFLAGS = -module -avoid-version -lsane -lpython$(PYTHON_VERSION)m
- scanext_la_SOURCES = scan/scanext/scanext.c
- scanext_la_CFLAGS = -I$(PYTHONINCLUDEDIR)
- endif #SCAN_BUILD
-@@ -351,7 +351,7 @@ endif #!HPLIP_CLASS_DRIVER
- if !HPLIP_CLASS_DRIVER
- hpmudextdir = $(pyexecdir)
- hpmudext_LTLIBRARIES = hpmudext.la
--hpmudext_la_LDFLAGS = -module -avoid-version
-+hpmudext_la_LDFLAGS = -module -avoid-version -lpython$(PYTHON_VERSION)m
- hpmudext_la_SOURCES = io/mudext/hpmudext.c
- hpmudext_la_CFLAGS = -I$(PYTHONINCLUDEDIR)
- hpmudext_la_LIBADD = libhpmud.la
diff --git a/debian/patches/01_rss.patch b/debian/patches/01_rss.patch
deleted file mode 100644
index e4981a12e..000000000
--- a/debian/patches/01_rss.patch
+++ /dev/null
@@ -1,127 +0,0 @@
-From a253e097f257bb1f4332f261958d4cb771e5ade2 Mon Sep 17 00:00:00 2001
-From: Torsten Landschoff <torsten@pulsar.galaxy>
-Date: Fri, 22 Jul 2016 09:32:51 +0200
-Subject: Blank-ink-only patch by Richard Spencer-Smith
-
-Patch-Name: 01_rss.patch
----
- prnt/hpijs/breaks_open.cpp | 5 ++++-
- prnt/hpijs/dj660_maps.cpp | 5 ++++-
- prnt/hpijs/dj690_maps.cpp | 5 ++++-
- prnt/hpijs/dj895_maps.cpp | 5 ++++-
- prnt/hpijs/dj895_maps2.cpp | 5 ++++-
- prnt/hpijs/dj970_maps.cpp | 6 +++++-
- prnt/hpijs/dj970_maps3.cpp | 3 ++-
- 7 files changed, 27 insertions(+), 7 deletions(-)
-
-diff --git a/prnt/hpijs/breaks_open.cpp b/prnt/hpijs/breaks_open.cpp
-index ebfdb95d0..4d8fdf475 100644
---- a/prnt/hpijs/breaks_open.cpp
-+++ b/prnt/hpijs/breaks_open.cpp
-@@ -1078,7 +1078,10 @@ const unsigned char HT600x6004level970_open[1024]=
-
- {
- 0, 0, 255, 0,
--0, 1, 255, 0,
-+// 2001.06.16 mrb: changed the value to 0. With the original "1"
-+// the printer sometimes prints empty lines...
-+//0, 1, 255, 0,
-+0, 0, 255, 0,
- 0, 3, 255, 0,
- 0, 5, 255, 0,
- 0, 7, 255, 0,
-diff --git a/prnt/hpijs/dj660_maps.cpp b/prnt/hpijs/dj660_maps.cpp
-index 7f29cbba7..6da224f99 100644
---- a/prnt/hpijs/dj660_maps.cpp
-+++ b/prnt/hpijs/dj660_maps.cpp
-@@ -38,7 +38,10 @@ APDK_BEGIN_NAMESPACE
- //const
- uint32_t ulMapDJ660_CCM_KCMY[ 9 * 9 * 9 ]=
- {
-- 422720226UL, 142187374UL, 94354238UL, 62442785UL, 45668877UL, 27648516UL, 8972032UL, 7335680UL, 5895424UL,
-+// 2001.06.14 mrb: Replaced the first entry so the printer will
-+// use only the black pen when he should print real black.
-+// 422720226UL, 142187374UL, 94354238UL, 62442785UL, 45668877UL, 27648516UL, 8972032UL, 7335680UL, 5895424UL,
-+ 226UL, 142187374UL, 94354238UL, 62442785UL, 45668877UL, 27648516UL, 8972032UL, 7335680UL, 5895424UL,
- 2519110233UL, 807846483UL, 391693109UL, 260029471UL, 143570703UL, 42776580UL, 8501760UL, 7782400UL, 6539520UL,
- 3072173868UL, 1881129514UL, 841465387UL, 524792087UL, 358391818UL, 174364420UL, 40408577UL, 6920704UL, 6530560UL,
- 3407591425UL, 2551891200UL, 1612695808UL, 824489479UL, 506699268UL, 306153730UL, 105283329UL, 5144320UL, 5737216UL,
-diff --git a/prnt/hpijs/dj690_maps.cpp b/prnt/hpijs/dj690_maps.cpp
-index a8248c6f1..df0c5270f 100644
---- a/prnt/hpijs/dj690_maps.cpp
-+++ b/prnt/hpijs/dj690_maps.cpp
-@@ -38,7 +38,10 @@ APDK_BEGIN_NAMESPACE
- uint32_t ulMapDJ690_CMYK[ 9 * 9 * 9 ]=
- // DJ690_CMYK
- {
-- 337848575UL, 37838470UL, 155209268UL, 137905152UL, 36454656UL, 2310144UL,
-+// 2001.06.14 mrb: Replaced the first entry so the printer will
-+// use only the black pen when he should print real black.
-+// 337848575UL, 37838470UL, 155209268UL, 137905152UL, 36454656UL, 2310144UL,
-+ 226UL, 37838470UL, 155209268UL, 137905152UL, 36454656UL, 2310144UL,
- 2179072UL, 2051072UL, 1733120UL, 2013280119UL, 385897321UL, 303379741UL,
- 270610688UL, 102772224UL, 1844992UL, 1911552UL, 1847296UL, 1784832UL,
- 2080387626UL, 1157643294UL, 452996881UL, 335555072UL, 202384384UL, 50991872UL,
-diff --git a/prnt/hpijs/dj895_maps.cpp b/prnt/hpijs/dj895_maps.cpp
-index ff23db5b4..54da57d17 100644
---- a/prnt/hpijs/dj895_maps.cpp
-+++ b/prnt/hpijs/dj895_maps.cpp
-@@ -37,7 +37,10 @@ APDK_BEGIN_NAMESPACE
-
- uint32_t ulMapDJ895_KCMY[ 9*9*9 ]=
- {
--1819176703UL, 79494215UL, 112983330UL, 79035667UL, 78183948UL, 60489224UL, 59571718UL, 42007811UL, 7405312UL,
-+// 2001.06.14 mrb: Replaced the first entry so the printer will
-+// use only the black pen when he should print real black.
-+//1819176703UL, 79494215UL, 112983330UL, 79035667UL, 78183948UL, 60489224UL, 59571718UL, 42007811UL, 7405312UL,
-+226UL, 79494215UL, 112983330UL, 79035667UL, 78183948UL, 60489224UL, 59571718UL, 42007811UL, 7405312UL,
- 4230922555UL, 655358293UL, 176553263UL, 128253208UL, 61209869UL, 60751368UL, 26606852UL, 9305345UL, 8650496UL,
- 4248940299UL, 3776766759UL, 756415798UL, 308083743UL, 142671120UL, 59440646UL, 9239553UL, 9109248UL, 8779520UL,
- 4248086274UL, 4214276619UL, 2786390812UL, 942206231UL, 491516427UL, 224131588UL, 6616320UL, 7399168UL, 7857664UL,
-diff --git a/prnt/hpijs/dj895_maps2.cpp b/prnt/hpijs/dj895_maps2.cpp
-index 2f6d85779..8ab12d8a5 100644
---- a/prnt/hpijs/dj895_maps2.cpp
-+++ b/prnt/hpijs/dj895_maps2.cpp
-@@ -163,7 +163,10 @@ uint32_t ulMapDJ895_HB_KCMY[ 9*9*9 ]=
-
- uint32_t ulMapDJ895_Binary_KCMY[ 9*9*9 ]=
- {
--1819176648UL, 64158794UL, 80805158UL, 80215318UL, 62389519UL, 61406730UL,
-+// 2001.06.14 mrb: Replaced the first entry so the printer will
-+// use only the black pen when he should print real black.
-+//1819176648UL, 64158794UL, 80805158UL, 80215318UL, 62389519UL, 61406730UL,
-+226UL, 64158794UL, 80805158UL, 80215318UL, 62389519UL, 61406730UL,
- 60292615UL, 42401028UL, 7601920UL, 4230922301UL, 571406681UL, 160889651UL,
- 113048859UL, 62717200UL, 45415944UL, 27917573UL, 10419457UL, 9238272UL,
- 4248940557UL, 3743081259UL, 790296119UL, 325515810UL, 127007505UL, 27196678UL,
-diff --git a/prnt/hpijs/dj970_maps.cpp b/prnt/hpijs/dj970_maps.cpp
-index d5d25d54e..1f696f035 100644
---- a/prnt/hpijs/dj970_maps.cpp
-+++ b/prnt/hpijs/dj970_maps.cpp
-@@ -127,7 +127,11 @@ uint32_t ulMapGRAY_K_6x6x1[] =
-
- uint32_t ulMapDJ970_KCMY[ 9*9*9 ]=
- {
-- 673723135UL, 26007371UL, 9756717UL, 10020638UL, 10022677UL, 10153743UL,
-+// 2003.06.05 rss: Replaced the first entry so the printer will
-+// (hopefully) use only the black pen when he should print real black.
-+// Please report as a bug if it doesn't, or something worse happens.
-+// 673723135UL, 26007371UL, 9756717UL, 10020638UL, 10022677UL, 10153743UL,
-+ 226UL, 26007371UL, 9756717UL, 10020638UL, 10022677UL, 10153743UL,
- 10285066UL, 10416133UL, 9169408UL, 3405886809UL, 59743UL, 23980849UL,
- 9366812UL, 10153744UL, 10285066UL, 10153990UL, 10087424UL, 9169408UL,
- 3858807091UL, 2197868343UL, 60220UL, 4714015UL, 7270155UL, 8646656UL,
-diff --git a/prnt/hpijs/dj970_maps3.cpp b/prnt/hpijs/dj970_maps3.cpp
-index fcf38774a..04c631b0d 100644
---- a/prnt/hpijs/dj970_maps3.cpp
-+++ b/prnt/hpijs/dj970_maps3.cpp
-@@ -37,7 +37,8 @@ APDK_BEGIN_NAMESPACE
-
- uint32_t ulMapDJ970_Draft_KCMY[ 9*9*9 ]=
- {
--1802205183UL, 22740362UL, 5832524UL, 5635892UL, 5570340UL, 5308188UL,
-+//1802205183UL, 22740362UL, 5832524UL, 5635892UL, 5570340UL, 5308188UL,
-+ 226UL, 22740362UL, 5832524UL, 5635892UL, 5570340UL, 5308188UL,
- 5308180UL, 5504778UL, 5504768UL, 4278239136UL, 65446UL, 4194132UL,
- 5308210UL, 5373728UL, 5308182UL, 5504784UL, 5504776UL, 5504768UL,
- 4278498896UL, 1862336354UL, 65388UL, 2621242UL, 4128540UL, 4718348UL,
diff --git a/debian/patches/14_charsign_fixes.patch b/debian/patches/14_charsign_fixes.patch
deleted file mode 100644
index 093f78584..000000000
--- a/debian/patches/14_charsign_fixes.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From f4912bfcedc31d65bbd534ccfa4c5e501b24761e Mon Sep 17 00:00:00 2001
-From: Till Kamppeter <till.kamppeter@gmail.com>
-Date: Fri, 22 Jul 2016 09:32:52 +0200
-Subject: some missing charsign
-
-Patch-Name: 14_charsign_fixes.patch
----
- scan/sane/scl.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/scan/sane/scl.c b/scan/sane/scl.c
-index cc640f444..eccd99052 100755
---- a/scan/sane/scl.c
-+++ b/scan/sane/scl.c
-@@ -37,10 +37,11 @@
- #define DEBUG_DECLARE_ONLY
- #include "sanei_debug.h"
-
--static int SclBufferIsPartialReply( unsigned char * data, int datalen )
-+static int SclBufferIsPartialReply( void * dataptr, int datalen )
- {
- int i = 0, value = 0;
-- unsigned char d;
-+ unsigned char * const data = dataptr;
-+ unsigned int d;
-
- if( i >= datalen )
- {
diff --git a/debian/patches/HP-LaserJet_4000-PostScript-PPD.patch b/debian/patches/HP-LaserJet_4000-PostScript-PPD.patch
deleted file mode 100644
index 7c20c4aae..000000000
--- a/debian/patches/HP-LaserJet_4000-PostScript-PPD.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 5ecac1696d58ab7552267f32567cc8b3fb6b19eb Mon Sep 17 00:00:00 2001
-From: Jean Tourrilhes <jt@hpl.hp.com>
-Date: Fri, 22 Jul 2016 09:33:10 +0200
-Subject: LaserJet PostScript 4000 PPD bugfix
-
-The PostScript PPD for the HP LaserJet 4000 is buggy, and prevent printing complex documents.
-The 4000 and 4050 are pretty much the same printer. The fix was to extract the missing snipset from the PPD for the 4050 and put it in the PPD for the 4000.
-
-Origin: vendor
-Bug: https://bugs.launchpad.net/hplip/+bug/1298194
-Bug-Debian: https://bugs.debian.org/742766
-Patch-Name: HP-LaserJet_4000-PostScript-PPD.patch
----
- prnt/ps/hp-laserjet_4000_series-ps.ppd | 11 +++++++++++
- 1 file changed, 11 insertions(+)
-
-diff --git a/prnt/ps/hp-laserjet_4000_series-ps.ppd b/prnt/ps/hp-laserjet_4000_series-ps.ppd
-index db1248c45..66c403271 100644
---- a/prnt/ps/hp-laserjet_4000_series-ps.ppd
-+++ b/prnt/ps/hp-laserjet_4000_series-ps.ppd
-@@ -97,6 +97,17 @@
- *SuggestedWaitTimeout: "120"
- *PrintPSErrors: True
-
-+*% =================================
-+*% PostScript Patches
-+*% =================================
-+*JobPatchFile 1: "
-+/limitinterpolate { dup type /dicttype eq { dup /Interpolate known { dup /Interpolate get {
-+ 1 1 idtransform 2 index /ImageMatrix get dtransform exch abs 1 exch div exch abs 1 exch div 2 copy lt
-+ { exch }if pop 4 lt { dup /Interpolate false put } if } if } if } if
-+} bind def
-+/image { limitinterpolate systemdict /image get exec } bind def
-+/imagemask { limitinterpolate systemdict /imagemask get exec } bind def"
-+*End
-
- *% ===================================
- *% Installable Options
diff --git a/debian/patches/add-lidil-two-cartridge-modes.patch b/debian/patches/add-lidil-two-cartridge-modes.patch
deleted file mode 100644
index efd000ea8..000000000
--- a/debian/patches/add-lidil-two-cartridge-modes.patch
+++ /dev/null
@@ -1,132 +0,0 @@
-From 8b436f4ee7b55718ae5c891d1f7052cd05e720ce Mon Sep 17 00:00:00 2001
-From: Till Kamppeter <till.kamppeter@gmail.com>
-Date: Fri, 22 Jul 2016 09:32:58 +0200
-Subject: For the Lidil printers, enable two-cartridge modes (black and color
- cartridge) in the hpcups driver and assign the choices of the "Printout Mode"
- option to two-cartridge modes in the hpijs driver
-
-LP: #235399
-Patch-Name: add-lidil-two-cartridge-modes.patch
----
- prnt/drv/hpijs.drv.in | 20 ++++++++++----------
- prnt/drv/hpijs.drv.in.template | 20 ++++++++++----------
- 2 files changed, 20 insertions(+), 20 deletions(-)
-
-diff --git a/prnt/drv/hpijs.drv.in b/prnt/drv/hpijs.drv.in
-index 293763ffc..b115b3b4d 100644
---- a/prnt/drv/hpijs.drv.in
-+++ b/prnt/drv/hpijs.drv.in
-@@ -4278,16 +4278,16 @@ le=- -"
- r=&quot;HEWLETT-PACKARD&quot; -sDeviceModel=&quot;deskjet 3320&quot;"
- Attribute "FoomaticRIPOption" "PrintoutMode" "enum Composite B"
- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Draft" "Quality=300DraftColorCM&&
--Y"
-+YK"
- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Draft.Gray" "Quality=300DraftGr&&
- ayscaleK"
-- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Normal" "Quality=300ColorCMY"
-+ Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Normal" "Quality=300ColorCMYK"
- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Normal.Gray" "Quality=300Graysc&&
- aleK"
-- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=High" "Quality=600ColorCMY"
-+ Attribute "FoomaticRIPOptionSetting" "PrintoutMode=High" "Quality=600ColorCMYK"
- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=High.Gray" "Quality=600Grayscal&&
- eK"
-- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Photo" "Quality=600PhotoCMY"
-+ Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Photo" "Quality=600PhotoCMYK"
- Attribute "FoomaticRIPOption" "PageSize" "enum CmdLine A"
- Attribute "FoomaticRIPOptionSetting" "PageSize=Letter" " -dDEVICEWIDTHPOINTS=612 -&&
- dDEVICEHEIGHTPOINTS=792"
-@@ -4746,13 +4746,13 @@ le=- -"
- r=&quot;HEWLETT-PACKARD&quot; -sDeviceModel=&quot;deskjet 3600&quot;"
- Attribute "FoomaticRIPOption" "PrintoutMode" "enum Composite B"
- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Draft" "Quality=300DraftColorCM&&
--Y"
-+YK"
- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Draft.Gray" "Quality=300DraftGr&&
- ayscaleK"
-- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Normal" "Quality=300ColorCMY"
-+ Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Normal" "Quality=300ColorCMYK"
- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Normal.Gray" "Quality=300Graysc&&
- aleK"
-- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=High" "Quality=600ColorCMY"
-+ Attribute "FoomaticRIPOptionSetting" "PrintoutMode=High" "Quality=600ColorCMYK"
- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=High.Gray" "Quality=600Grayscal&&
- eK"
- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Photo" "Quality=600PhotoCMYKFul&&
-@@ -5205,13 +5205,13 @@ er=&quot;HEWLETT-PACKARD&quot; -sDeviceModel=&quot;Deskjet D4100&quot;&&
- "
- Attribute "FoomaticRIPOption" "PrintoutMode" "enum Composite B"
- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Draft" "Quality=600DraftColorCM&&
--Y"
-+YK"
- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Draft.Gray" "Quality=600DraftGr&&
- ayscaleK"
-- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Normal" "Quality=600ColorCMY"
-+ Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Normal" "Quality=600ColorCMYK"
- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Normal.Gray" "Quality=600Graysc&&
- aleK"
-- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=High" "Quality=600ColorCMY"
-+ Attribute "FoomaticRIPOptionSetting" "PrintoutMode=High" "Quality=600ColorCMYK"
- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=High.Gray" "Quality=600Grayscal&&
- eK"
- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Photo" "Quality=600PhotoCMYKFul&&
-diff --git a/prnt/drv/hpijs.drv.in.template b/prnt/drv/hpijs.drv.in.template
-index 3ae87af0f..0c60fdcba 100644
---- a/prnt/drv/hpijs.drv.in.template
-+++ b/prnt/drv/hpijs.drv.in.template
-@@ -2220,16 +2220,16 @@ le=- -"
- r=&quot;HEWLETT-PACKARD&quot; -sDeviceModel=&quot;deskjet 3320&quot;"
- Attribute "FoomaticRIPOption" "PrintoutMode" "enum Composite B"
- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Draft" "Quality=300DraftColorCM&&
--Y"
-+YK"
- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Draft.Gray" "Quality=300DraftGr&&
- ayscaleK"
-- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Normal" "Quality=300ColorCMY"
-+ Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Normal" "Quality=300ColorCMYK"
- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Normal.Gray" "Quality=300Graysc&&
- aleK"
-- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=High" "Quality=600ColorCMY"
-+ Attribute "FoomaticRIPOptionSetting" "PrintoutMode=High" "Quality=600ColorCMYK"
- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=High.Gray" "Quality=600Grayscal&&
- eK"
-- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Photo" "Quality=600PhotoCMY"
-+ Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Photo" "Quality=600PhotoCMYK"
- Attribute "FoomaticRIPOption" "PageSize" "enum CmdLine A"
- Attribute "FoomaticRIPOptionSetting" "PageSize=Letter" " -dDEVICEWIDTHPOINTS=612 -&&
- dDEVICEHEIGHTPOINTS=792"
-@@ -2402,13 +2402,13 @@ le=- -"
- r=&quot;HEWLETT-PACKARD&quot; -sDeviceModel=&quot;deskjet 3600&quot;"
- Attribute "FoomaticRIPOption" "PrintoutMode" "enum Composite B"
- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Draft" "Quality=300DraftColorCM&&
--Y"
-+YK"
- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Draft.Gray" "Quality=300DraftGr&&
- ayscaleK"
-- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Normal" "Quality=300ColorCMY"
-+ Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Normal" "Quality=300ColorCMYK"
- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Normal.Gray" "Quality=300Graysc&&
- aleK"
-- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=High" "Quality=600ColorCMY"
-+ Attribute "FoomaticRIPOptionSetting" "PrintoutMode=High" "Quality=600ColorCMYK"
- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=High.Gray" "Quality=600Grayscal&&
- eK"
- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Photo" "Quality=600PhotoCMYKFul&&
-@@ -2598,13 +2598,13 @@ er=&quot;HEWLETT-PACKARD&quot; -sDeviceModel=&quot;Deskjet D4100&quot;&&
- "
- Attribute "FoomaticRIPOption" "PrintoutMode" "enum Composite B"
- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Draft" "Quality=600DraftColorCM&&
--Y"
-+YK"
- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Draft.Gray" "Quality=600DraftGr&&
- ayscaleK"
-- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Normal" "Quality=600ColorCMY"
-+ Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Normal" "Quality=600ColorCMYK"
- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Normal.Gray" "Quality=600Graysc&&
- aleK"
-- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=High" "Quality=600ColorCMY"
-+ Attribute "FoomaticRIPOptionSetting" "PrintoutMode=High" "Quality=600ColorCMYK"
- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=High.Gray" "Quality=600Grayscal&&
- eK"
- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Photo" "Quality=600PhotoCMYKFul&&
diff --git a/debian/patches/cope-with-ErnieFilter-absence.patch b/debian/patches/cope-with-ErnieFilter-absence.patch
deleted file mode 100644
index fd60b014e..000000000
--- a/debian/patches/cope-with-ErnieFilter-absence.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-From 04f466a6978e9de0cd8b534c1c05fde55e0b16c4 Mon Sep 17 00:00:00 2001
-From: Didier Raboud <odyx@debian.org>
-Date: Fri, 22 Jul 2016 09:32:50 +0200
-Subject: Cope with prnt/hpcups/ErnieFilter.{cpp,h} removal by disabling the
- functionality
-
-Origin: vendor
-Patch-Name: cope-with-ErnieFilter-absence.patch
----
- Makefile.am | 2 +-
- prnt/hpcups/Pcl3Gui2.cpp | 17 -----------------
- prnt/hpcups/Pcl3Gui2.h | 1 -
- 3 files changed, 1 insertion(+), 19 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 891660d02..54a46b5eb 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -559,7 +559,7 @@ hpcups_SOURCES = prnt/hpcups/HPCupsFilter.cpp prnt/hpcups/HPCupsFilter.h prnt/hp
- prnt/hpcups/Mode2.cpp prnt/hpcups/Mode2.h prnt/hpcups/Mode3.cpp prnt/hpcups/Mode3.h \
- prnt/hpcups/Mode9.cpp prnt/hpcups/Mode9.h prnt/hpcups/Mode10.cpp prnt/hpcups/Mode10.h \
- prnt/hpcups/ModeDeltaPlus.cpp prnt/hpcups/ModeDeltaPlus.h prnt/hpcups/ModeJbig.cpp prnt/hpcups/ModeJbig.h \
-- prnt/hpcups/ErnieFilter.cpp prnt/hpcups/ErnieFilter.h prnt/hpcups/EncapsulatorFactory.cpp prnt/hpcups/EncapsulatorFactory.h \
-+ prnt/hpcups/EncapsulatorFactory.cpp prnt/hpcups/EncapsulatorFactory.h \
- prnt/hpcups/Encapsulator.cpp prnt/hpcups/Encapsulator.h prnt/hpcups/Pcl3.cpp prnt/hpcups/Pcl3.h \
- prnt/hpcups/Pcl3Gui.cpp prnt/hpcups/Pcl3Gui.h prnt/hpcups/Pcl3Gui2.cpp prnt/hpcups/Pcl3Gui2.h \
- prnt/hpcups/LJMono.cpp prnt/hpcups/LJMono.h prnt/hpcups/LJColor.cpp prnt/hpcups/LJColor.h \
-diff --git a/prnt/hpcups/Pcl3Gui2.cpp b/prnt/hpcups/Pcl3Gui2.cpp
-index 893bcfd7c..1678c3989 100644
---- a/prnt/hpcups/Pcl3Gui2.cpp
-+++ b/prnt/hpcups/Pcl3Gui2.cpp
-@@ -30,7 +30,6 @@
-
- #include "CommonDefinitions.h"
- #include "Pcl3Gui2.h"
--#include "ErnieFilter.h"
- #include "Mode10.h"
- #include "Mode9.h"
- #include "PrinterCommands.h"
-@@ -38,7 +37,6 @@
- Pcl3Gui2::Pcl3Gui2() : Encapsulator()
- {
- speed_mech_enabled = true;
-- m_run_ernie_filter = true;
- crd_type = eCrd_both;
- strcpy(m_szLanguage, "PCL3GUI");
- }
-@@ -59,21 +57,6 @@ DRIVER_ERROR Pcl3Gui2::Configure(Pipeline **pipeline)
- }
-
- width = m_pMA->printable_width;;
-- if (m_run_ernie_filter) {
-- ErnieFilter *pErnie;
--
-- // Normal: threshold = (resolution) * (0.0876) - 2
-- int threshold = ((m_pQA->horizontal_resolution * 876) / 10000) - 2;
--
-- pErnie = new ErnieFilter (width, eBGRPixelData, threshold);
-- p = new Pipeline (pErnie);
-- if (head) {
-- head->AddPhase (p);
-- }
-- else {
-- head = p;
-- }
-- }
-
- if (crd_type != eCrd_black_only) {
- Mode10 *pMode10;
-diff --git a/prnt/hpcups/Pcl3Gui2.h b/prnt/hpcups/Pcl3Gui2.h
-index 890707831..543f8bd76 100644
---- a/prnt/hpcups/Pcl3Gui2.h
-+++ b/prnt/hpcups/Pcl3Gui2.h
-@@ -60,7 +60,6 @@ private:
- DRIVER_ERROR encapsulateRaster(BYTE *input_raster, unsigned int num_bytes, COLORTYPE c_type);
- bool speed_mech_enabled;
- int page_number;
-- bool m_run_ernie_filter;
- eCrdType crd_type;
- };
-
diff --git a/debian/patches/hp-plugin-download-fix.patch b/debian/patches/hp-plugin-download-fix.patch
deleted file mode 100644
index 1d888c894..000000000
--- a/debian/patches/hp-plugin-download-fix.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 6091ad68bb9d69c77bec697838934c5eb170ff8a Mon Sep 17 00:00:00 2001
-From: Till Kamppeter <till.kamppeter@gmail.com>
-Date: Fri, 22 Jul 2016 09:33:06 +0200
-Subject: Fix download and installation of HP's proprietary plug-in in Python3
- environments
-
-LP: #1422004
-Patch-Name: hp-plugin-download-fix.patch
----
- base/pkit.py | 9 ++++++---
- 1 file changed, 6 insertions(+), 3 deletions(-)
-
-diff --git a/base/pkit.py b/base/pkit.py
-index f3f1e44d0..6a848efcc 100644
---- a/base/pkit.py
-+++ b/base/pkit.py
-@@ -35,9 +35,12 @@ import dbus
- import dbus.service
-
- if PY3:
-- from gi import _gobject as gobject
-+ try:
-+ from gi._gobject import MainLoop
-+ except:
-+ from gi.repository.GLib import MainLoop
- else:
-- import gobject
-+ from gobject import MainLoop
-
- import warnings
- # Ignore: .../dbus/connection.py:242: DeprecationWarning: object.__init__() takes no parameters
-@@ -207,7 +210,7 @@ if utils.to_bool(sys_conf.get('configure', 'policy-kit')):
- super(BackendService, self).__init__(connection, path)
-
- self.name = dbus.service.BusName(self.SERVICE_NAME, connection)
-- self.loop = gobject.MainLoop()
-+ self.loop = MainLoop()
- self.version = 0
- log.set_level("debug")
-
diff --git a/debian/patches/hp-systray-make-menu-appear-in-sni-qt-indicator-with-kde.patch b/debian/patches/hp-systray-make-menu-appear-in-sni-qt-indicator-with-kde.patch
deleted file mode 100644
index ebe718980..000000000
--- a/debian/patches/hp-systray-make-menu-appear-in-sni-qt-indicator-with-kde.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 4e70fb3ca528b31f2ead6ed38054436ec106a8b9 Mon Sep 17 00:00:00 2001
-From: Till Kamppeter <till.kamppeter@gmail.com>
-Date: Fri, 22 Jul 2016 09:33:01 +0200
-Subject: Make the menu of the hp-systray applet appearing when the applet is
- converted to an indicator applet by sni-qt and put into the notification area
- of KDE
-
-LP: #857929
-Patch-Name: hp-systray-make-menu-appear-in-sni-qt-indicator-with-kde.patch
----
- ui5/systemtray.py | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/ui5/systemtray.py b/ui5/systemtray.py
-index 8888dec6d..ec3574f1b 100644
---- a/ui5/systemtray.py
-+++ b/ui5/systemtray.py
-@@ -576,6 +576,9 @@ class SystemTrayApp(QApplication):
-
- elif reason == QSystemTrayIcon.Trigger:
- #print "single click"
-+ self.updateMenu()
-+ if not self.menu is None:
-+ self.menu.popup(QCursor.pos())
- pass
-
- elif reason == QSystemTrayIcon.MiddleClick:
diff --git a/debian/patches/hp-systray-make-menu-title-visible-in-sni-qt-indicator.patch b/debian/patches/hp-systray-make-menu-title-visible-in-sni-qt-indicator.patch
deleted file mode 100644
index 908047d7a..000000000
--- a/debian/patches/hp-systray-make-menu-title-visible-in-sni-qt-indicator.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 42aa7b907954e78b1d8a3c8069636482acf9fcbd Mon Sep 17 00:00:00 2001
-From: Till Kamppeter <till.kamppeter@gmail.com>
-Date: Fri, 22 Jul 2016 09:33:00 +0200
-Subject: Simplified the construction of the title line of the hp-systray
- applet menu, so that the applet-to-indicator converter sni-qt also imports
- this title line (at least the text of it).
-
-Thanks to Aurelien Gateau for this patch.
-
-Patch-Name: hp-systray-make-menu-title-visible-in-sni-qt-indicator.patch
----
- ui5/systemtray.py | 25 ++++---------------------
- 1 file changed, 4 insertions(+), 21 deletions(-)
-
-diff --git a/ui5/systemtray.py b/ui5/systemtray.py
-index 5b69d2be9..8888dec6d 100644
---- a/ui5/systemtray.py
-+++ b/ui5/systemtray.py
-@@ -442,30 +442,13 @@ class SystemTrayApp(QApplication):
- def setMenu(self):
- self.menu = QMenu()
-
-- title = QWidgetAction(self.menu)
-+ title = QAction(self.menu)
- #title.setDisabled(True)
-
-- hbox = QFrame(self.menu)
-- layout = QHBoxLayout(hbox)
-- # layout.setMargin(3)
-- layout.setContentsMargins(3, 3, 3, 3)
-- layout.setSpacing(5)
-- pix_label = QLabel(hbox)
-
-- layout.insertWidget(-1, pix_label, 0)
--
-- icon_size = self.menu.style().pixelMetric(QStyle.PM_SmallIconSize)
-- pix_label.setPixmap(self.prop_icon.pixmap(icon_size))
--
-- label = QLabel(hbox)
-- layout.insertWidget(-1, label, 20)
-- title.setDefaultWidget(hbox)
--
-- label.setText(self.__tr("HPLIP Status Service"))
--
-- f = label.font()
-- f.setBold(True)
-- label.setFont(f)
-+ title.setText(self.__tr("HPLIP Status Service"))
-+ title.setIcon(self.prop_icon)
-+ title.setIconVisibleInMenu(True)
- self.menu.insertAction(None, title)
-
- if devices:
diff --git a/debian/patches/hp_photosmart_pro_b9100_support.patch b/debian/patches/hp_photosmart_pro_b9100_support.patch
deleted file mode 100644
index 546d479ad..000000000
--- a/debian/patches/hp_photosmart_pro_b9100_support.patch
+++ /dev/null
@@ -1,100 +0,0 @@
-From 8a69442aca9610b02520a1cb4fdceb7d9ef32dbb Mon Sep 17 00:00:00 2001
-From: Till Kamppeter <till.kamppeter@gmail.com>
-Date: Fri, 22 Jul 2016 09:32:53 +0200
-Subject: Corrections: models.dat entry for the HP PhotoSmart Pro B9100
-
-LP: #213984
-
-Patch-Name: hp_photosmart_pro_b9100_support.patch
----
- data/models/models.dat | 77 ++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 77 insertions(+)
-
-diff --git a/data/models/models.dat b/data/models/models.dat
-index 982bd0a96..064cb32d9 100644
---- a/data/models/models.dat
-+++ b/data/models/models.dat
-@@ -52361,6 +52361,83 @@ usb-pid=d12
- usb-vid=3f0
- wifi-config=0
-
-+[photosmart_pro_b9100_series]
-+align-type=1
-+clean-type=1
-+color-cal-type=3
-+copy-type=0
-+embedded-server-type=1
-+fax-type=0
-+fw-download=False
-+icon=Photosmart_Pro_B9180.png
-+io-mfp-mode=4
-+io-mode=1
-+io-support=6
-+job-storage=0
-+linefeed-cal-type=0
-+model1=HP Photosmart Pro B9180gp Photo Printer
-+model2=HP Photosmart Pro B9180 Photo Printer
-+monitor-type=0
-+panel-check-type=1
-+pcard-type=0
-+plugin=0
-+plugin-reason=0
-+power-settings=0
-+pq-diag-type=0
-+r-type=0
-+r0-agent1-kind=1
-+r0-agent1-sku=C9407A
-+r0-agent1-type=16
-+r0-agent10-kind=2
-+r0-agent10-sku=C9417A
-+r0-agent10-type=6
-+r0-agent11-kind=2
-+r0-agent11-sku=C9418A
-+r0-agent11-type=7
-+r0-agent12-kind=2
-+r0-agent12-sku=C9419A
-+r0-agent12-type=8
-+r0-agent2-kind=1
-+r0-agent2-sku=C9406A
-+r0-agent2-type=14
-+r0-agent3-kind=1
-+r0-agent3-sku=C9405A
-+r0-agent3-type=13
-+r0-agent4-kind=1
-+r0-agent4-sku=C9404A
-+r0-agent4-type=15
-+r0-agent5-kind=2
-+r0-agent5-sku=C9412A
-+r0-agent5-type=1
-+r0-agent6-kind=2
-+r0-agent6-sku=C9413A
-+r0-agent6-type=19
-+r0-agent7-kind=2
-+r0-agent7-sku=C9414A
-+r0-agent7-type=17
-+r0-agent8-kind=2
-+r0-agent8-sku=C9415A
-+r0-agent8-type=4
-+r0-agent9-kind=2
-+r0-agent9-sku=C9416A
-+r0-agent9-type=5
-+scan-src=0
-+scan-type=0
-+status-battery-check=0
-+status-dynamic-counters=0
-+status-type=2
-+support-released=True
-+support-subtype=219b2b
-+support-type=2
-+support-ver=2.8.4
-+tech-class=PSB9100
-+family-class=Undefined
-+tech-subclass=Normal
-+tech-type=2
-+usb-pid=bd02
-+usb-vid=3f0
-+wifi-config=0
-+
- [hp_deskjet_9300]
- align-type=1
- clean-type=1
diff --git a/debian/patches/hpaio-option-duplex.diff b/debian/patches/hpaio-option-duplex.diff
deleted file mode 100644
index 3256970ab..000000000
--- a/debian/patches/hpaio-option-duplex.diff
+++ /dev/null
@@ -1,45 +0,0 @@
-From 1d6e3336fde6582951c79e527dc7e94c66bda438 Mon Sep 17 00:00:00 2001
-From: Matej Vela <vela@debian.org>
-Date: Fri, 22 Jul 2016 09:33:02 +0200
-Subject: Fix "duplex descriptor uninitialized"
-
-Closes: #583273
-Patch-Name: hpaio-option-duplex.diff
----
- scan/sane/sclpml.c | 21 +++++++++------------
- 1 file changed, 9 insertions(+), 12 deletions(-)
-
-diff --git a/scan/sane/sclpml.c b/scan/sane/sclpml.c
-index 9a5975f32..61500da57 100644
---- a/scan/sane/sclpml.c
-+++ b/scan/sane/sclpml.c
-@@ -1084,20 +1084,17 @@ static void init_options( hpaioScanner_t hpaio )
- hpaio->option[OPTION_ADF_MODE].constraint_type = SANE_CONSTRAINT_STRING_LIST;
- hpaio->option[OPTION_ADF_MODE].constraint.string_list = hpaio->adfModeList;
-
-- // Duplex scanning is supported
-- if (hpaio->supportsDuplex == 1)
-- {
-- hpaio->option[OPTION_DUPLEX].name = STR_NAME_DUPLEX;
-- hpaio->option[OPTION_DUPLEX].title = STR_TITLE_DUPLEX;
-- hpaio->option[OPTION_DUPLEX].desc = STR_DESC_DUPLEX;
-- hpaio->option[OPTION_DUPLEX].type = SANE_TYPE_BOOL;
-- hpaio->option[OPTION_DUPLEX].unit = SANE_UNIT_NONE;
-- hpaio->option[OPTION_DUPLEX].size = sizeof( SANE_Bool );
-- hpaio->option[OPTION_DUPLEX].cap = SANE_CAP_SOFT_SELECT |
-+ hpaio->option[OPTION_DUPLEX].name = STR_NAME_DUPLEX;
-+ hpaio->option[OPTION_DUPLEX].title = STR_TITLE_DUPLEX;
-+ hpaio->option[OPTION_DUPLEX].desc = STR_DESC_DUPLEX;
-+ hpaio->option[OPTION_DUPLEX].type = SANE_TYPE_BOOL;
-+ hpaio->option[OPTION_DUPLEX].unit = SANE_UNIT_NONE;
-+ hpaio->option[OPTION_DUPLEX].size = sizeof( SANE_Bool );
-+ hpaio->option[OPTION_DUPLEX].cap = SANE_CAP_SOFT_SELECT |
- SANE_CAP_SOFT_DETECT |
- SANE_CAP_ADVANCED;
-- hpaio->option[OPTION_DUPLEX].constraint_type = SANE_CONSTRAINT_NONE;
-- }
-+ hpaio->option[OPTION_DUPLEX].constraint_type = SANE_CONSTRAINT_NONE;
-+
- hpaio->option[GROUP_GEOMETRY].title = STR_TITLE_GEOMETRY;
- hpaio->option[GROUP_GEOMETRY].type = SANE_TYPE_GROUP;
- hpaio->option[GROUP_GEOMETRY].cap = SANE_CAP_ADVANCED;
diff --git a/debian/patches/hpfax-bug-function-used-before-importing-log.patch b/debian/patches/hpfax-bug-function-used-before-importing-log.patch
deleted file mode 100644
index 9ff5704e0..000000000
--- a/debian/patches/hpfax-bug-function-used-before-importing-log.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 759e04969546f7ec8a7e6df04739722c8a90bc9f Mon Sep 17 00:00:00 2001
-From: Till Kamppeter <till.kamppeter@gmail.com>
-Date: Fri, 22 Jul 2016 09:32:59 +0200
-Subject: The hpfax CUPS backend uses its function bug() (which in turnuses
- log()) before log() gets imported (with base.g). Made use of log() in bug()
- optional
-
-LP: #560849
-Patch-Name: hpfax-bug-function-used-before-importing-log.patch
----
- fax/backend/hpfax.py | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/fax/backend/hpfax.py b/fax/backend/hpfax.py
-index 9560e840b..7aaef35b5 100755
---- a/fax/backend/hpfax.py
-+++ b/fax/backend/hpfax.py
-@@ -55,7 +55,10 @@ home_dir = ''
-
- def bug(msg):
- syslog.syslog("hpfax[%d]: error: %s\n" % (pid, msg))
-- log.stderr("ERROR: %s\n" % msg)
-+ try:
-+ log.stderr("ERROR: %s\n" % msg)
-+ except:
-+ print >> sys.stderr, ("ERROR: %s\n" % msg)
-
-
- if os.path.exists(config_file):
diff --git a/debian/patches/hpscan-deskjet-3520-aio-allow-non-jpeg-scanning.patch b/debian/patches/hpscan-deskjet-3520-aio-allow-non-jpeg-scanning.patch
deleted file mode 100644
index c24db4136..000000000
--- a/debian/patches/hpscan-deskjet-3520-aio-allow-non-jpeg-scanning.patch
+++ /dev/null
@@ -1,153 +0,0 @@
-From f3fc67d24ffc7827e64ab30c91466fcc91995a2d Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Lubo=C5=A1=20Dole=C5=BEel?= <lubos@dolezel.info>
-Date: Fri, 22 Jul 2016 09:33:05 +0200
-Subject: Allow non-JPEG scanning on the HP DeskJet 3520 All-in-One and similar
- devices
-
-LP: #1245578
-
-Patch-Name: hpscan-deskjet-3520-aio-allow-non-jpeg-scanning.patch
----
- scan/sane/bb_ledm.c | 47 +++++++++++++++++++++++++++++++++++++++------
- scan/sane/ledm.c | 12 +++++++-----
- 2 files changed, 48 insertions(+), 11 deletions(-)
-
-diff --git a/scan/sane/bb_ledm.c b/scan/sane/bb_ledm.c
-index b233d1e28..27d73a0c6 100644
---- a/scan/sane/bb_ledm.c
-+++ b/scan/sane/bb_ledm.c
-@@ -189,7 +189,7 @@ Keep-Alive: 20\r\nProxy-Connection: keep-alive\r\nCookie: AccessCounter=new\r\n0
- <YStart>%d</YStart>\
- <Height>%d</Height>\
- <Format>%s</Format>\
--<CompressionQFactor>15</CompressionQFactor>\
-+<CompressionQFactor>0</CompressionQFactor>\
- <ColorSpace>%s</ColorSpace>\
- <BitDepth>%d</BitDepth>\
- <InputSource>%s</InputSource>\
-@@ -234,6 +234,38 @@ Keep-Alive: 300\r\nProxy-Connection: keep-alive\r\nCookie: AccessCounter=new\r\n
- # define JOBSTATE_COMPLETED "<j:JobState>Completed</j:JobState>"
- # define PRESCANPAGE "<PreScanPage>"
-
-+static int parse_status_elements(const char *payload, int size, struct wscn_create_scan_job_response *resp)
-+{
-+ char tag[512];
-+ char value[128];
-+ char *tail=(char *)payload;
-+
-+ while (1)
-+ {
-+ get_tag(tail, size-(tail-payload), tag, sizeof(tag), &tail);
-+
-+ if (!tag[0])
-+ break;
-+
-+ if (strncmp(tag, "ImageWidth", 10) == 0)
-+ {
-+ get_element(tail, size-(tail-payload), value, sizeof(value), &tail);
-+ resp->pixels_per_line = strtol(value, NULL, 10);
-+ }
-+ else if (strncmp(tag, "ImageHeight", 11) == 0)
-+ {
-+ get_element(tail, size-(tail-payload), value, sizeof(value), &tail);
-+ resp->lines = strtol(value, NULL, 10);
-+ }
-+ else if (strncmp(tag, "BytesPerLine", 12) == 0)
-+ {
-+ get_element(tail, size-(tail-payload), value, sizeof(value), &tail);
-+ resp->bytes_per_line = strtol(value, NULL, 10);
-+ }
-+ }
-+ return 0;
-+}
-+
- static int parse_scan_elements(const char *payload, int size, struct wscn_scan_elements *elements)
- {
- char tag[512];
-@@ -762,8 +794,7 @@ int bb_get_parameters(struct ledm_session *ps, SANE_Parameters *pp, int option)
- if (ps->currentCompression == SF_RAW && ps->currentScanMode != CE_GRAY8)
- {
- /* Set scan parameters based on scan job response values */
-- //pp->lines = pbb->job.lines;
-- pp->lines = (int)(SANE_UNFIX(ps->effectiveBry - ps->effectiveTly)/MM_PER_INCH*ps->currentResolution);
-+ pp->lines = pbb->job.lines;
- pp->pixels_per_line = pbb->job.pixels_per_line;
- pp->bytes_per_line = pbb->job.bytes_per_line;
- }
-@@ -784,8 +815,8 @@ int bb_get_parameters(struct ledm_session *ps, SANE_Parameters *pp, int option)
- break;
- case SPO_BEST_GUESS: /* called by xsane & sane_start */
- /* Set scan parameters based on best guess. */
-- pp->lines = (int)round(SANE_UNFIX(ps->effectiveBry - ps->effectiveTly)/MM_PER_INCH*ps->currentResolution);
-- pp->pixels_per_line = (int)round(SANE_UNFIX(ps->effectiveBrx -ps->effectiveTlx)/MM_PER_INCH*ps->currentResolution);
-+ pp->lines = (int)(SANE_UNFIX(ps->effectiveBry - ps->effectiveTly)/MM_PER_INCH*ps->currentResolution);
-+ pp->pixels_per_line = ps->image_traits.iPixelsPerRow;
- pp->bytes_per_line = BYTES_PER_LINE(pp->pixels_per_line, pp->depth * factor);
- break;
- default:
-@@ -889,7 +920,7 @@ SANE_Status bb_start_scan(struct ledm_session *ps)
- (int) ((ps->currentBrx / 5548.7133) - (ps->currentTlx / 5548.7133)),//<Width>
- (int) (ps->currentTly / 5548.7133),//<YStart>
- (int) ((ps->currentBry / 5548.7133) - (ps->currentTly / 5548.7133)),//<Height>
-- "Jpeg",//<Format>
-+ (ps->currentCompression == SF_RAW) ? "Raw" : "Jpeg", //<Format>
- (! strcmp(ce_element[ps->currentScanMode], "Color8")) ? "Color" : (! strcmp(ce_element[ps->currentScanMode], "Gray8")) ? "Gray" : "Gray",//<ColorSpace>
- ((! strcmp(ce_element[ps->currentScanMode], "Color8")) || (! strcmp(ce_element[ps->currentScanMode], "Gray8"))) ? 8: 8,//<BitDepth>
- ps->currentInputSource == IS_PLATEN ? is_element[1] : is_element[2],//<InputSource>
-@@ -987,6 +1018,7 @@ SANE_Status bb_start_scan(struct ledm_session *ps)
- _DBG("bb_start_scan() read_http_payload FAILED len=%d buf=%s\n", len, buf);
- break;
- }
-+
- //For a new scan, buf must contain <PreScanPage>.
- if (NULL == strstr(buf,PRESCANPAGE))
- { //i.e Paper is not present in Scanner
-@@ -1005,6 +1037,9 @@ SANE_Status bb_start_scan(struct ledm_session *ps)
- stat = SANE_STATUS_GOOD;
- goto bugout;
- }
-+ // Parse buf here
-+ parse_status_elements(buf, len, &pbb->job);
-+
- usleep(500000);//0.5 sec delay
- }//end while()
-
-diff --git a/scan/sane/ledm.c b/scan/sane/ledm.c
-index 9a1ff02d1..8f0433853 100644
---- a/scan/sane/ledm.c
-+++ b/scan/sane/ledm.c
-@@ -170,11 +170,11 @@ static int set_scan_mode_side_effects(struct ledm_session *ps, enum COLOR_ENTRY
- case CE_GRAY8:
- case CE_COLOR8:
- default:
--// ps->compressionList[j] = STR_COMPRESSION_NONE;
--// ps->compressionMap[j++] = SF_RAW;
-+ ps->compressionList[j] = STR_COMPRESSION_NONE;
-+ ps->compressionMap[j++] = SF_RAW;
- ps->compressionList[j] = STR_COMPRESSION_JPEG;
- ps->compressionMap[j++] = SF_JPEG;
-- ps->currentCompression = SF_JPEG;
-+ ps->currentCompression = SF_RAW;
- ps->option[LEDM_OPTION_JPEG_QUALITY].cap |= SANE_CAP_SOFT_SELECT; /* enable jpeg quality */
- break;
- }
-@@ -679,7 +679,7 @@ SANE_Status ledm_control_option(SANE_Handle handle, SANE_Int option, SANE_Action
- }
- else
- { /* Set default. */
-- ps->currentCompression = SF_JPEG;
-+ ps->currentCompression = SF_RAW;
- stat = SANE_STATUS_GOOD;
- }
- break;
-@@ -984,7 +984,9 @@ SANE_Status ledm_start(SANE_Handle handle)
- }
- }
- else
-- ipGetImageTraits(ps->ip_handle, NULL, &ps->image_traits); /* get valid image traits */
-+ {
-+ ipGetOutputTraits(ps->ip_handle, &ps->image_traits); /* get valid image traits */
-+ }
-
- stat = SANE_STATUS_GOOD;
-
diff --git a/debian/patches/install-check-plugin.diff b/debian/patches/install-check-plugin.diff
deleted file mode 100644
index 083e1606c..000000000
--- a/debian/patches/install-check-plugin.diff
+++ /dev/null
@@ -1,31 +0,0 @@
-From 500df3fef7d79590de9e5f9759fd028a5bba4c6c Mon Sep 17 00:00:00 2001
-From: Julian Andres Klode <jak@debian.org>
-Date: Fri, 22 Jul 2016 09:33:08 +0200
-Subject: Install check-plugin.py as a script
-
-The installer installs check-plugin.py as hp-check-plugin, do the same from the Makefile.
-
-Origin: vendor
-Forwarded: no
-Patch-Name: install-check-plugin.diff
----
- Makefile.am | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/Makefile.am b/Makefile.am
-index 54a46b5eb..2db759c03 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -178,10 +178,10 @@ if !HPLIP_CLASS_DRIVER
- dist_cmd_SCRIPTS = align.py info.py print.py toolbox.py clean.py colorcal.py unload.py testpage.py makeuri.py check.py fab.py levels.py \
- sendfax.py setup.py makecopies.py probe.py timedate.py firmware.py scan.py systray.py plugin.py linefeedcal.py pqdiag.py \
- faxsetup.py devicesettings.py printsettings.py query.py pkservice.py wificonfig.py diagnose_plugin.py uninstall.py \
-- upgrade.py config_usb_printer.py diagnose_queues.py logcapture.py doctor.py uiscan.py
-+ upgrade.py config_usb_printer.py diagnose_queues.py logcapture.py doctor.py uiscan.py check-plugin.py
-
- homedir = $(hplipdir)
--dist_home_DATA = check-plugin.py
-+dist_home_DATA =
- dist_home_DATA += hplip_clean.sh
-
- # base
diff --git a/debian/patches/musb-c-do-not-crash-on-usb-failure.patch b/debian/patches/musb-c-do-not-crash-on-usb-failure.patch
deleted file mode 100644
index a72d78078..000000000
--- a/debian/patches/musb-c-do-not-crash-on-usb-failure.patch
+++ /dev/null
@@ -1,103 +0,0 @@
-From a0c1adb2fd1921d446ea7ff600c0e934f94cfbd3 Mon Sep 17 00:00:00 2001
-From: Till Kamppeter <till.kamppeter@gmail.com>
-Date: Fri, 22 Jul 2016 09:33:03 +0200
-Subject: Make sure that the HPLIP components which access the USB (especially
- the CUPS backends "hp" and "hpfax") do not crash when libusb fails to connect
- to the USB, for example on machines without USB or with the USB kernel
- modules not loaded
-
-LP: #1302437
-
-Patch-Name: musb-c-do-not-crash-on-usb-failure.patch
----
- io/hpmud/musb.c | 32 +++++++++++++++++++++-----------
- 1 file changed, 21 insertions(+), 11 deletions(-)
-
-diff --git a/io/hpmud/musb.c b/io/hpmud/musb.c
-index 6e99c15c8..fe5d50f95 100644
---- a/io/hpmud/musb.c
-+++ b/io/hpmud/musb.c
-@@ -695,7 +695,8 @@ static libusb_device *get_libusb_device(const char *uri)
- int numdevs = 0; /* number of connected devices */
- int i, conf, iface, altset ;
-
-- libusb_init(&libusb_ctx);
-+ i = libusb_init(&libusb_ctx);
-+ if (i) goto bugout;
- numdevs = libusb_get_device_list(libusb_ctx, &libusb_dev_list);
- for (i=0; i< numdevs; i++)
- {
-@@ -2054,7 +2055,8 @@ int __attribute__ ((visibility ("hidden"))) musb_probe_devices(char *lst, int ls
- char serial[128], mfg[128], sz[HPMUD_LINE_SIZE];
- int r, size=0;
-
-- libusb_init(&ctx);
-+ i = libusb_init(&ctx);
-+ if (i) goto bugout;
- numdevs = libusb_get_device_list(ctx, &list);
-
- if (numdevs <= 0)
-@@ -2155,12 +2157,14 @@ int __attribute__ ((visibility ("hidden"))) musb_probe_devices(char *lst, int ls
- }//end for loop
-
- bugout:
-- if (!hd)
-+ if (hd)
- libusb_close(hd);
- if (confptr)
- libusb_free_config_descriptor(confptr);
-- libusb_free_device_list(list, 1);
-- libusb_exit(ctx);
-+ if (list)
-+ libusb_free_device_list(list, 1);
-+ if (ctx)
-+ libusb_exit(ctx);
-
- return size;
- }
-@@ -2186,7 +2190,8 @@ enum HPMUD_RESULT hpmud_make_usb_uri(const char *busnum, const char *devnum, cha
-
- *bytes_read=0;
-
-- libusb_init(&ctx);
-+ i = libusb_init(&ctx);
-+ if (i) goto bugout;
- numdevs = libusb_get_device_list(ctx, &list);
-
- if (numdevs <= 0)
-@@ -2289,8 +2294,10 @@ bugout:
- if (hd != NULL)
- libusb_close(hd);
-
-- libusb_free_device_list(list, 1);
-- libusb_exit(ctx);
-+ if (list)
-+ libusb_free_device_list(list, 1);
-+ if (ctx)
-+ libusb_exit(ctx);
-
- return stat;
- }
-@@ -2309,7 +2316,8 @@ enum HPMUD_RESULT hpmud_make_usb_serial_uri(const char *sn, char *uri, int uri_s
-
- *bytes_read=0;
-
-- libusb_init(&ctx);
-+ i = libusb_init(&ctx);
-+ if (i) goto bugout;
- numdevs = libusb_get_device_list(ctx, &list);
-
- if (numdevs <= 0)
-@@ -2335,8 +2343,10 @@ enum HPMUD_RESULT hpmud_make_usb_serial_uri(const char *sn, char *uri, int uri_s
- stat = HPMUD_R_OK;
-
- bugout:
-- libusb_free_device_list(list, 1);
-- libusb_exit(ctx);
-+ if (list)
-+ libusb_free_device_list(list, 1);
-+ if (ctx)
-+ libusb_exit(ctx);
-
- return stat;
- }
diff --git a/debian/patches/order-page-sizes-consistently.patch b/debian/patches/order-page-sizes-consistently.patch
deleted file mode 100644
index 62e06564c..000000000
--- a/debian/patches/order-page-sizes-consistently.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From 42dddf81b8b2c767f2905c5340a37df98ba6ca3c Mon Sep 17 00:00:00 2001
-From: Didier Raboud <odyx@debian.org>
-Date: Fri, 22 Jul 2016 09:33:07 +0200
-Subject: In hp-scan's manpage, sort PAGE_SIZES in help, for the manpage to be
- reproducibly created
-
-Patch-Name: order-page-sizes-consistently.patch
----
- scan.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/scan.py b/scan.py
-index d31aee148..e3437848a 100755
---- a/scan.py
-+++ b/scan.py
-@@ -291,7 +291,7 @@ try:
- ("", "Coordinates are relative to the upper left corner of the scan area.", "option", False),
- ("", "Units are specified by -t/--units (default is 'mm').", "option", False),
- ("Specify the scan area based on a paper size:", "--size=<paper size name>", "option", False),
-- ("", "where <paper size name> is one of: %s" % ', '.join(list(PAGE_SIZES.keys())), "option", False),
-+ ("", "where <paper size name> is one of: %s" % ', '.join(sorted(list(PAGE_SIZES.keys()))), "option", False),
- utils.USAGE_SPACE,
- ("[OPTIONS] ('file' dest)", "", "header", False),
- ("Filename for 'file' destination:", "-o<file> or -f<file> or --file=<file> or --output=<file>", "option", False),
diff --git a/debian/patches/pcardext-python3-workaround-upstream.patch b/debian/patches/pcardext-python3-workaround-upstream.patch
deleted file mode 100644
index 7e766185d..000000000
--- a/debian/patches/pcardext-python3-workaround-upstream.patch
+++ /dev/null
@@ -1,149 +0,0 @@
-From 1bfa4fec99ae1a79ec8fe3e9701411ccfb88c346 Mon Sep 17 00:00:00 2001
-From: Till Kamppeter <till.kamppeter@gmail.com>
-Date: Fri, 22 Jul 2016 09:33:04 +0200
-Subject: Workaround patch for missing Python3 transition of the old
- (pre-USB-storage) photo memory card support (pcardext) as this part builds in
- Python3 environments but with pointer-related warnings which are fatal errors
- for Ubuntu's build servers. The patch silences the warnings but the memory
- card support is dropped in Python3 environments. This patch is supplied by
- the HPLIP upstream developers and will be replaced by a more proper solution
- in the next upstream release of HPLIP (see LP: #1275353)
-
-Patch-Name: pcardext-python3-workaround-upstream.patch
----
- pcard/pcardext/pcardext.c | 59 +++++++++++++++++++++++++++++++--------
- pcard/photocard.py | 2 +-
- unload.py | 5 ++++
- 3 files changed, 53 insertions(+), 13 deletions(-)
-
-diff --git a/pcard/pcardext/pcardext.c b/pcard/pcardext/pcardext.c
-index c1a8273e4..37d979b71 100644
---- a/pcard/pcardext/pcardext.c
-+++ b/pcard/pcardext/pcardext.c
-@@ -20,7 +20,7 @@ pcardext - Python extension for HP photocard services
- Requires:
- Python 2.2+
-
--Author: Don Welch
-+Author: Don Welch
-
- \*****************************************************************************/
-
-@@ -38,9 +38,37 @@ typedef int Py_ssize_t;
-
- int verbose=0;
-
-+#if PY_MAJOR_VERSION >= 3
-+ #define MOD_ERROR_VAL NULL
-+ #define MOD_SUCCESS_VAL(val) val
-+ #define MOD_INIT(name) PyMODINIT_FUNC PyInit_##name(void)
-+ #define PyInt_AS_LONG PyLong_AS_LONG
-+ #define MOD_DEF(ob, name, doc, methods) \
-+ static struct PyModuleDef moduledef = { \
-+ PyModuleDef_HEAD_INIT, name, doc, -1, methods, }; \
-+ ob = PyModule_Create(&moduledef);
-+
-+
-+ #define PY_String_Bytes PyBytes_FromStringAndSize
-+ #define PY_AsString_Bytes PyBytes_AsStringAndSize
-+
-+#else
-+ #define MOD_ERROR_VAL
-+ #define MOD_SUCCESS_VAL(val)
-+ #define MOD_INIT(name) void init##name(void)
-+ #define MOD_DEF(ob, name, doc, methods) \
-+ ob = Py_InitModule3(name, methods, doc);
-+
-+ #define PY_String_Bytes PyString_FromStringAndSize
-+ #define PY_AsString_Bytes PyString_AsStringAndSize
-+
-+#endif
-+
- PyObject * readsectorFunc = NULL;
- PyObject * writesectorFunc = NULL;
-
-+
-+
- int ReadSector(int sector, int nsector, void *buf, int size)
- {
- PyObject * result;
-@@ -56,9 +84,13 @@ int ReadSector(int sector, int nsector, void *buf, int size)
- if( result )
- {
- Py_ssize_t len = 0;
-- PyString_AsStringAndSize( result, &result_str, &len );
-+
-+ //PyString_AsStringAndSize( result, &result_str, &len );
-+ //PyBytes_AsStringAndSize( result, &result_str, &len );
-+ PY_AsString_Bytes( result, &result_str, &len );
-
-- if( len < nsector*FAT_HARDSECT )
-+
-+ if( len < nsector*FAT_HARDSECT )
- {
- goto abort;
- }
-@@ -205,7 +237,9 @@ PyObject * pcardext_read( PyObject * self, PyObject * args )
-
- if( FatReadFileExt( name, offset, len, buffer ) == len )
- {
-- return PyString_FromStringAndSize( (char *)buffer, len );
-+ // return PyString_FromStringAndSize( (char *)buffer, len );
-+ return PY_String_Bytes( (char *)buffer, len );
-+ // return PyBytes_FromStringAndSize( (char *)buffer, len );
- }
- else
- {
-@@ -233,14 +267,15 @@ static PyMethodDef pcardext_methods[] =
-
- static char pcardext_documentation[] = "Python extension for HP photocard services";
-
--void initpcardext( void )
--{
-- PyObject * mod = Py_InitModule4( "pcardext", pcardext_methods,
-- pcardext_documentation, (PyObject*)NULL,
-- PYTHON_API_VERSION );
--
-- if (mod == NULL)
-- return;
-+MOD_INIT(pcardext) {
-+
-+ PyObject* mod ;
-+ MOD_DEF(mod, "pcardext", pcardext_documentation, pcardext_methods);
-+ if (mod == NULL)
-+ return MOD_ERROR_VAL;
-+
-+ return MOD_SUCCESS_VAL(mod);
-+
- }
-
-
-diff --git a/pcard/photocard.py b/pcard/photocard.py
-index 913dc4e98..2c7315883 100644
---- a/pcard/photocard.py
-+++ b/pcard/photocard.py
-@@ -30,7 +30,7 @@ from base.codes import *
- from base import device, utils, exif
-
- try:
-- from . import pcardext
-+ import pcardext
- except ImportError:
- if not os.getenv("HPLIP_BUILD"):
- log.error("PCARDEXT could not be loaded. Please check HPLIP installation.")
-diff --git a/unload.py b/unload.py
-index 3fdd5a381..ce8b069c9 100755
---- a/unload.py
-+++ b/unload.py
-@@ -44,6 +44,11 @@ except ImportError:
-
- # Local
- from base.g import *
-+from base.sixext import PY3
-+if PY3:
-+ log.error("This functionality is not spported in python3 environment.")
-+ sys.exit(1)
-+
- from base import device, utils, tui, module
- from prnt import cups
-
diff --git a/debian/patches/pjl-duplex-binding.patch b/debian/patches/pjl-duplex-binding.patch
deleted file mode 100644
index 5f6189920..000000000
--- a/debian/patches/pjl-duplex-binding.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-From 3737abc255f5b9d9738f42460b34d4f10d6d0b0b Mon Sep 17 00:00:00 2001
-From: Till Kamppeter <till.kamppeter@gmail.com>
-Date: Fri, 22 Jul 2016 09:32:54 +0200
-Subject: Fixed short-edge duplex for non-PS laser printers
-
-LP: #244295
-
-Patch-Name: pjl-duplex-binding.patch
----
- prnt/hpijs/ljcolor.cpp | 13 +++++++++++++
- prnt/hpijs/ljjetready.cpp | 11 +++++++++++
- prnt/hpijs/ljmono.cpp | 13 +++++++++++++
- 3 files changed, 37 insertions(+)
-
-diff --git a/prnt/hpijs/ljcolor.cpp b/prnt/hpijs/ljcolor.cpp
-index 0ecbfc606..db35e9819 100644
---- a/prnt/hpijs/ljcolor.cpp
-+++ b/prnt/hpijs/ljcolor.cpp
-@@ -330,6 +330,19 @@ DRIVER_ERROR HeaderLJColor::StartSend ()
-
- err = thePrinter->Send ((const BYTE *) res, strlen (res));
-
-+// Binding directive
-+
-+ strcpy (res, "@PJL SET BINDING=LONGEDGE\015\012");
-+
-+#ifdef APDK_AUTODUPLEX
-+ if (thePrintContext->QueryDuplexMode () == DUPLEXMODE_TABLET)
-+ {
-+ strcpy (res, "@PJL SET BINDING=SHORTEDGE\015\012");
-+ }
-+#endif
-+
-+ err = thePrinter->Send ((const BYTE *) res, strlen (res));
-+
-
- err = thePrinter->Send ((const BYTE*) EnterLanguage, sizeof (EnterLanguage));
- ERRCHECK;
-diff --git a/prnt/hpijs/ljjetready.cpp b/prnt/hpijs/ljjetready.cpp
-index 6942d2992..d79d40932 100644
---- a/prnt/hpijs/ljjetready.cpp
-+++ b/prnt/hpijs/ljjetready.cpp
-@@ -329,6 +329,17 @@ DRIVER_ERROR HeaderLJJetReady::StartSend ()
- err = thePrinter->Send ((const BYTE *) szScratchStr, strlen (szScratchStr));
- ERRCHECK;
-
-+ // Send the Binding command
-+ strcpy (szScratchStr, "@PJL SET BINDING=LONGEDGE\015\012");
-+#ifdef APDK_AUTODUPLEX
-+ if (thePrintContext->QueryDuplexMode () == DUPLEXMODE_TABLET)
-+ {
-+ strcpy (szScratchStr, "@PJL SET BINDING=SHORTEDGE\015\012");
-+ }
-+#endif
-+ err = thePrinter->Send ((const BYTE *) szScratchStr, strlen (szScratchStr));
-+ ERRCHECK;
-+
- //Set the resolution to 600
- err = thePrinter->Send ((const BYTE*)ccpPJLSetRes,sizeof(ccpPJLSetRes));
- ERRCHECK;
-diff --git a/prnt/hpijs/ljmono.cpp b/prnt/hpijs/ljmono.cpp
-index 67a0077d6..8d3ad4dab 100644
---- a/prnt/hpijs/ljmono.cpp
-+++ b/prnt/hpijs/ljmono.cpp
-@@ -212,6 +212,19 @@ DRIVER_ERROR HeaderLJMono::StartSend ()
- err = thePrinter->Send ((const BYTE *) res, strlen (res));
- ERRCHECK;
-
-+// Binding directive
-+
-+ strcpy (res, "@PJL SET BINDING=LONGEDGE\015\012");
-+
-+#ifdef APDK_AUTODUPLEX
-+ if (thePrintContext->QueryDuplexMode () == DUPLEXMODE_TABLET)
-+ {
-+ strcpy (res, "@PJL SET BINDING=SHORTEDGE\015\012");
-+ }
-+#endif
-+ err = thePrinter->Send ((const BYTE *) res, strlen (res));
-+ ERRCHECK;
-+
- err = thePrinter->Send ((const BYTE*) EnterLanguage, sizeof (EnterLanguage));
- ERRCHECK;
-
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index 695d8d77c..000000000
--- a/debian/patches/series
+++ /dev/null
@@ -1,30 +0,0 @@
-cope-with-ErnieFilter-absence.patch
-01_rss.patch
-14_charsign_fixes.patch
-hp_photosmart_pro_b9100_support.patch
-pjl-duplex-binding.patch
-simple-scan-as-default.patch
-try_libhpmud.so.0.patch
-add-lidil-two-cartridge-modes.patch
-hpfax-bug-function-used-before-importing-log.patch
-hp-systray-make-menu-title-visible-in-sni-qt-indicator.patch
-hp-systray-make-menu-appear-in-sni-qt-indicator-with-kde.patch
-hpaio-option-duplex.diff
-musb-c-do-not-crash-on-usb-failure.patch
-pcardext-python3-workaround-upstream.patch
-hpscan-deskjet-3520-aio-allow-non-jpeg-scanning.patch
-hp-plugin-download-fix.patch
-order-page-sizes-consistently.patch
-install-check-plugin.diff
-HP-LaserJet_4000-PostScript-PPD.patch
-ui-patch-upstream-like.patch
-0021-Add-include-cups-ppd.h-in-various-places-as-CUPS-2.2.patch
-0022-Fix-list-wrapping-in-scan.py-to-fix-generated-manpag.patch
-0023-Fix-handling-of-unicode-filenames-in-sixext.py.patch
-0024-Make-dat2drv-and-locateppd-build-dependent-of-class-.patch
-0025-Remove-all-ImageProcessor-functionality-which-is-clo.patch
-0026-Call-QMessageBox-constructors-of-PyQT5-with-the-corr.patch
-0027-Fixed-incomplete-removal-of-hp-toolbox-features-whic.patch
-0028-hp-check-Fix-core.distro-vs.-core.distro_name-mixups.patch
-0029-Make-base.g.xint-more-generous-in-what-it-can-take.patch
-0030-Fix-linking-of-libhpipp-and-the-ext-python-extension.patch
diff --git a/debian/patches/simple-scan-as-default.patch b/debian/patches/simple-scan-as-default.patch
deleted file mode 100644
index 7992aaf43..000000000
--- a/debian/patches/simple-scan-as-default.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 436a5636f834ed420516a07b736e08d48bc7cc61 Mon Sep 17 00:00:00 2001
-From: Till Kamppeter <till.kamppeter@gmail.com>
-Date: Fri, 22 Jul 2016 09:32:55 +0200
-Subject: Make simple-scan the default scanning frontend
-
-LP: #539015
-Patch-Name: simple-scan-as-default.patch
----
- base/utils.py | 17 ++++++++++-------
- ui5/ui_utils.py | 2 +-
- 2 files changed, 11 insertions(+), 8 deletions(-)
-
-diff --git a/base/utils.py b/base/utils.py
-index f268cf830..9f9cfb113 100644
---- a/base/utils.py
-+++ b/base/utils.py
-@@ -566,18 +566,21 @@ class UserSettings(object): # Note: Deprecated after 2.8.8 in Qt4 (see ui4/ui_ut
-
- # Scan
- self.cmd_scan = ''
-- path = which('xsane')
--
-+ path = which('simple-scan')
- if len(path) > 0:
-- self.cmd_scan = 'xsane -V %SANE_URI%'
-+ self.cmd_scan = 'simple-scan %SANE_URI%'
- else:
-- path = which('kooka')
-+ path = which('xsane')
- if len(path) > 0:
-- self.cmd_scan = 'kooka'
-+ self.cmd_scan = 'xsane -V %SANE_URI%'
- else:
-- path = which('xscanimage')
-+ path = which('kooka')
- if len(path) > 0:
-- self.cmd_scan = 'xscanimage'
-+ self.cmd_scan = 'kooka'
-+ else:
-+ path = which('xscanimage')
-+ if len(path) > 0:
-+ self.cmd_scan = 'xscanimage'
-
- # Photo Card
- path = which('hp-unload')
-diff --git a/ui5/ui_utils.py b/ui5/ui_utils.py
-index caba33910..865d6eb2b 100644
---- a/ui5/ui_utils.py
-+++ b/ui5/ui_utils.py
-@@ -205,7 +205,7 @@ class UserSettings(QSettings):
- return ''
-
- def loadDefaults(self):
-- self.cmd_scan = self.__setup(['xsane -V %SANE_URI%', 'kooka', 'xscanimage'])
-+ self.cmd_scan = self.__setup(['simple-scan %SANE_URI%', 'xsane -V %SANE_URI%', 'kooka', 'xscanimage'])
- self.cmd_fab = self.__setup(['hp-fab'])
-
-
diff --git a/debian/patches/try_libhpmud.so.0.patch b/debian/patches/try_libhpmud.so.0.patch
deleted file mode 100644
index c05ead9cb..000000000
--- a/debian/patches/try_libhpmud.so.0.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From 642f56fa07a8b31a344371a43661a283eaa2aa8e Mon Sep 17 00:00:00 2001
-From: Evgeny Golov <evgeni@debian.org>
-Date: Fri, 22 Jul 2016 09:32:56 +0200
-Subject: Try libhpmud.so.0 after libhpmud.so
-
-Closes: #600670
-Patch-Name: try_libhpmud.so.0.patch
----
- scan/sane/marvell.c | 10 +++++++---
- scan/sane/soap.c | 9 ++++++---
- scan/sane/soapht.c | 9 ++++++---
- 3 files changed, 19 insertions(+), 9 deletions(-)
-
-diff --git a/scan/sane/marvell.c b/scan/sane/marvell.c
-index ad267a3f1..a0692920e 100644
---- a/scan/sane/marvell.c
-+++ b/scan/sane/marvell.c
-@@ -60,10 +60,14 @@ static int bb_load(struct marvell_session *ps, const char *so)
- int stat=1;
-
- /* Load hpmud manually with symbols exported. Otherwise the plugin will not find it. */
-- if ((ps->hpmud_handle = load_library("libhpmud.so")) == NULL)
-+
-+ if ((ps->hpmud_handle = dlopen("libhpmud.so", RTLD_LAZY|RTLD_GLOBAL)) == NULL)
- {
-- if ((ps->hpmud_handle = load_library("libhpmud.so.0")) == NULL)
-- goto bugout;
-+ if ((ps->hpmud_handle = dlopen("libhpmud.so.0", RTLD_LAZY|RTLD_GLOBAL)) == NULL)
-+ {
-+ BUG("unable to load restricted library: %s\n", dlerror());
-+ goto bugout;
-+ }
- }
-
- /* Load math library manually with symbols exported (Ubuntu 8.04). Otherwise the plugin will not find it. */
-diff --git a/scan/sane/soap.c b/scan/sane/soap.c
-index 07106fe6e..352db3d55 100644
---- a/scan/sane/soap.c
-+++ b/scan/sane/soap.c
-@@ -68,10 +68,13 @@ static int bb_load(struct soap_session *ps, const char *so)
- int stat=1;
-
- /* Load hpmud manually with symbols exported. Otherwise the plugin will not find it. */
-- if ((ps->hpmud_handle = load_library("libhpmud.so")) == NULL)
-+ if ((ps->hpmud_handle = dlopen("libhpmud.so", RTLD_LAZY|RTLD_GLOBAL)) == NULL)
- {
-- if ((ps->hpmud_handle = load_library("libhpmud.so.0")) == NULL)
-- goto bugout;
-+ if ((ps->hpmud_handle = dlopen("libhpmud.so.0", RTLD_LAZY|RTLD_GLOBAL)) == NULL)
-+ {
-+ BUG("unable to load restricted library: %s\n", dlerror());
-+ goto bugout;
-+ }
- }
-
- /* Load math library manually with symbols exported (Ubuntu 8.04). Otherwise the plugin will not find it. */
-diff --git a/scan/sane/soapht.c b/scan/sane/soapht.c
-index 269ab2140..b554b3ceb 100644
---- a/scan/sane/soapht.c
-+++ b/scan/sane/soapht.c
-@@ -62,10 +62,13 @@ static int bb_load(struct soap_session *ps, const char *so)
- int stat=1;
-
- /* Load hpmud manually with symbols exported. Otherwise the plugin will not find it. */
-- if ((ps->hpmud_handle = load_library("libhpmud.so.0")) == NULL)
-+ if ((ps->hpmud_handle = dlopen("libhpmud.so", RTLD_LAZY|RTLD_GLOBAL)) == NULL)
- {
-- if ((ps->hpmud_handle = load_library("libhpmud.so.0")) == NULL)
-- goto bugout;
-+ if ((ps->hpmud_handle = dlopen("libhpmud.so.0", RTLD_LAZY|RTLD_GLOBAL)) == NULL)
-+ {
-+ BUG("unable to load restricted library: %s\n", dlerror());
-+ goto bugout;
-+ }
- }
-
- /* Load math library manually with symbols exported (Ubuntu 8.04). Otherwise the plugin will not find it. */
diff --git a/debian/patches/ui-patch-upstream-like.patch b/debian/patches/ui-patch-upstream-like.patch
deleted file mode 100644
index 121cfb60e..000000000
--- a/debian/patches/ui-patch-upstream-like.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From 969e37ba558cc5f5848c4f0ad8855ebffe0322b1 Mon Sep 17 00:00:00 2001
-From: Julian Andres Klode <jak@debian.org>
-Date: Fri, 22 Jul 2016 09:33:11 +0200
-Subject: Patch UI files to match upstream produced .py code
-
-The update tab was manually patched out in the generated code, and the label_2 was renamed in the code.
-
-Patch-Name: ui-patch-upstream-like.patch
----
- ui5/devmgr5_base.ui | 31 -------------------------------
- ui5/wifisetupdialog_base.ui | 2 +-
- 2 files changed, 1 insertion(+), 32 deletions(-)
-
-diff --git a/ui5/devmgr5_base.ui b/ui5/devmgr5_base.ui
-index 7d0c7f53e..09f72bf83 100644
---- a/ui5/devmgr5_base.ui
-+++ b/ui5/devmgr5_base.ui
-@@ -547,37 +547,6 @@
- </item>
- </layout>
- </widget>
-- <widget class="QWidget" name="tab_3">
-- <attribute name="title">
-- <string>Page</string>
-- </attribute>
-- <widget class="QPushButton" name="pushButton">
-- <property name="geometry">
-- <rect>
-- <x>280</x>
-- <y>40</y>
-- <width>96</width>
-- <height>27</height>
-- </rect>
-- </property>
-- <property name="text">
-- <string>Install now</string>
-- </property>
-- </widget>
-- <widget class="QLabel" name="label">
-- <property name="geometry">
-- <rect>
-- <x>30</x>
-- <y>45</y>
-- <width>251</width>
-- <height>17</height>
-- </rect>
-- </property>
-- <property name="text">
-- <string>New version of HPLIP-x.x.x is available</string>
-- </property>
-- </widget>
-- </widget>
- </widget>
- </widget>
- </item>
-diff --git a/ui5/wifisetupdialog_base.ui b/ui5/wifisetupdialog_base.ui
-index a85d14c3d..4e336404a 100644
---- a/ui5/wifisetupdialog_base.ui
-+++ b/ui5/wifisetupdialog_base.ui
-@@ -47,7 +47,7 @@
- </widget>
- </item>
- <item row="2" column="0" colspan="3">
-- <widget class="QLabel" name="label_2">
-+ <widget class="QLabel" name="MainTitleLabel">
- <property name="text">
- <string>&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
- p, li { white-space: pre-wrap; }
diff --git a/fax/backend/hpfax.py b/fax/backend/hpfax.py
index 7aaef35b5..9560e840b 100755
--- a/fax/backend/hpfax.py
+++ b/fax/backend/hpfax.py
@@ -55,10 +55,7 @@ home_dir = ''
def bug(msg):
syslog.syslog("hpfax[%d]: error: %s\n" % (pid, msg))
- try:
- log.stderr("ERROR: %s\n" % msg)
- except:
- print >> sys.stderr, ("ERROR: %s\n" % msg)
+ log.stderr("ERROR: %s\n" % msg)
if os.path.exists(config_file):
diff --git a/io/hpmud/musb.c b/io/hpmud/musb.c
index fe5d50f95..6e99c15c8 100644
--- a/io/hpmud/musb.c
+++ b/io/hpmud/musb.c
@@ -695,8 +695,7 @@ static libusb_device *get_libusb_device(const char *uri)
int numdevs = 0; /* number of connected devices */
int i, conf, iface, altset ;
- i = libusb_init(&libusb_ctx);
- if (i) goto bugout;
+ libusb_init(&libusb_ctx);
numdevs = libusb_get_device_list(libusb_ctx, &libusb_dev_list);
for (i=0; i< numdevs; i++)
{
@@ -2055,8 +2054,7 @@ int __attribute__ ((visibility ("hidden"))) musb_probe_devices(char *lst, int ls
char serial[128], mfg[128], sz[HPMUD_LINE_SIZE];
int r, size=0;
- i = libusb_init(&ctx);
- if (i) goto bugout;
+ libusb_init(&ctx);
numdevs = libusb_get_device_list(ctx, &list);
if (numdevs <= 0)
@@ -2157,14 +2155,12 @@ int __attribute__ ((visibility ("hidden"))) musb_probe_devices(char *lst, int ls
}//end for loop
bugout:
- if (hd)
+ if (!hd)
libusb_close(hd);
if (confptr)
libusb_free_config_descriptor(confptr);
- if (list)
- libusb_free_device_list(list, 1);
- if (ctx)
- libusb_exit(ctx);
+ libusb_free_device_list(list, 1);
+ libusb_exit(ctx);
return size;
}
@@ -2190,8 +2186,7 @@ enum HPMUD_RESULT hpmud_make_usb_uri(const char *busnum, const char *devnum, cha
*bytes_read=0;
- i = libusb_init(&ctx);
- if (i) goto bugout;
+ libusb_init(&ctx);
numdevs = libusb_get_device_list(ctx, &list);
if (numdevs <= 0)
@@ -2294,10 +2289,8 @@ bugout:
if (hd != NULL)
libusb_close(hd);
- if (list)
- libusb_free_device_list(list, 1);
- if (ctx)
- libusb_exit(ctx);
+ libusb_free_device_list(list, 1);
+ libusb_exit(ctx);
return stat;
}
@@ -2316,8 +2309,7 @@ enum HPMUD_RESULT hpmud_make_usb_serial_uri(const char *sn, char *uri, int uri_s
*bytes_read=0;
- i = libusb_init(&ctx);
- if (i) goto bugout;
+ libusb_init(&ctx);
numdevs = libusb_get_device_list(ctx, &list);
if (numdevs <= 0)
@@ -2343,10 +2335,8 @@ enum HPMUD_RESULT hpmud_make_usb_serial_uri(const char *sn, char *uri, int uri_s
stat = HPMUD_R_OK;
bugout:
- if (list)
- libusb_free_device_list(list, 1);
- if (ctx)
- libusb_exit(ctx);
+ libusb_free_device_list(list, 1);
+ libusb_exit(ctx);
return stat;
}
diff --git a/pcard/pcardext/pcardext.c b/pcard/pcardext/pcardext.c
index 37d979b71..c1a8273e4 100644
--- a/pcard/pcardext/pcardext.c
+++ b/pcard/pcardext/pcardext.c
@@ -20,7 +20,7 @@ pcardext - Python extension for HP photocard services
Requires:
Python 2.2+
-Author: Don Welch
+Author: Don Welch
\*****************************************************************************/
@@ -38,37 +38,9 @@ typedef int Py_ssize_t;
int verbose=0;
-#if PY_MAJOR_VERSION >= 3
- #define MOD_ERROR_VAL NULL
- #define MOD_SUCCESS_VAL(val) val
- #define MOD_INIT(name) PyMODINIT_FUNC PyInit_##name(void)
- #define PyInt_AS_LONG PyLong_AS_LONG
- #define MOD_DEF(ob, name, doc, methods) \
- static struct PyModuleDef moduledef = { \
- PyModuleDef_HEAD_INIT, name, doc, -1, methods, }; \
- ob = PyModule_Create(&moduledef);
-
-
- #define PY_String_Bytes PyBytes_FromStringAndSize
- #define PY_AsString_Bytes PyBytes_AsStringAndSize
-
-#else
- #define MOD_ERROR_VAL
- #define MOD_SUCCESS_VAL(val)
- #define MOD_INIT(name) void init##name(void)
- #define MOD_DEF(ob, name, doc, methods) \
- ob = Py_InitModule3(name, methods, doc);
-
- #define PY_String_Bytes PyString_FromStringAndSize
- #define PY_AsString_Bytes PyString_AsStringAndSize
-
-#endif
-
PyObject * readsectorFunc = NULL;
PyObject * writesectorFunc = NULL;
-
-
int ReadSector(int sector, int nsector, void *buf, int size)
{
PyObject * result;
@@ -84,13 +56,9 @@ int ReadSector(int sector, int nsector, void *buf, int size)
if( result )
{
Py_ssize_t len = 0;
-
- //PyString_AsStringAndSize( result, &result_str, &len );
- //PyBytes_AsStringAndSize( result, &result_str, &len );
- PY_AsString_Bytes( result, &result_str, &len );
+ PyString_AsStringAndSize( result, &result_str, &len );
-
- if( len < nsector*FAT_HARDSECT )
+ if( len < nsector*FAT_HARDSECT )
{
goto abort;
}
@@ -237,9 +205,7 @@ PyObject * pcardext_read( PyObject * self, PyObject * args )
if( FatReadFileExt( name, offset, len, buffer ) == len )
{
- // return PyString_FromStringAndSize( (char *)buffer, len );
- return PY_String_Bytes( (char *)buffer, len );
- // return PyBytes_FromStringAndSize( (char *)buffer, len );
+ return PyString_FromStringAndSize( (char *)buffer, len );
}
else
{
@@ -267,15 +233,14 @@ static PyMethodDef pcardext_methods[] =
static char pcardext_documentation[] = "Python extension for HP photocard services";
-MOD_INIT(pcardext) {
-
- PyObject* mod ;
- MOD_DEF(mod, "pcardext", pcardext_documentation, pcardext_methods);
- if (mod == NULL)
- return MOD_ERROR_VAL;
-
- return MOD_SUCCESS_VAL(mod);
-
+void initpcardext( void )
+{
+ PyObject * mod = Py_InitModule4( "pcardext", pcardext_methods,
+ pcardext_documentation, (PyObject*)NULL,
+ PYTHON_API_VERSION );
+
+ if (mod == NULL)
+ return;
}
diff --git a/pcard/photocard.py b/pcard/photocard.py
index 2c7315883..913dc4e98 100644
--- a/pcard/photocard.py
+++ b/pcard/photocard.py
@@ -30,7 +30,7 @@ from base.codes import *
from base import device, utils, exif
try:
- import pcardext
+ from . import pcardext
except ImportError:
if not os.getenv("HPLIP_BUILD"):
log.error("PCARDEXT could not be loaded. Please check HPLIP installation.")
diff --git a/prnt/drv/hpijs.drv.in b/prnt/drv/hpijs.drv.in
index b115b3b4d..293763ffc 100644
--- a/prnt/drv/hpijs.drv.in
+++ b/prnt/drv/hpijs.drv.in
@@ -4278,16 +4278,16 @@ le=- -"
r=&quot;HEWLETT-PACKARD&quot; -sDeviceModel=&quot;deskjet 3320&quot;"
Attribute "FoomaticRIPOption" "PrintoutMode" "enum Composite B"
Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Draft" "Quality=300DraftColorCM&&
-YK"
+Y"
Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Draft.Gray" "Quality=300DraftGr&&
ayscaleK"
- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Normal" "Quality=300ColorCMYK"
+ Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Normal" "Quality=300ColorCMY"
Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Normal.Gray" "Quality=300Graysc&&
aleK"
- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=High" "Quality=600ColorCMYK"
+ Attribute "FoomaticRIPOptionSetting" "PrintoutMode=High" "Quality=600ColorCMY"
Attribute "FoomaticRIPOptionSetting" "PrintoutMode=High.Gray" "Quality=600Grayscal&&
eK"
- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Photo" "Quality=600PhotoCMYK"
+ Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Photo" "Quality=600PhotoCMY"
Attribute "FoomaticRIPOption" "PageSize" "enum CmdLine A"
Attribute "FoomaticRIPOptionSetting" "PageSize=Letter" " -dDEVICEWIDTHPOINTS=612 -&&
dDEVICEHEIGHTPOINTS=792"
@@ -4746,13 +4746,13 @@ le=- -"
r=&quot;HEWLETT-PACKARD&quot; -sDeviceModel=&quot;deskjet 3600&quot;"
Attribute "FoomaticRIPOption" "PrintoutMode" "enum Composite B"
Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Draft" "Quality=300DraftColorCM&&
-YK"
+Y"
Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Draft.Gray" "Quality=300DraftGr&&
ayscaleK"
- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Normal" "Quality=300ColorCMYK"
+ Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Normal" "Quality=300ColorCMY"
Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Normal.Gray" "Quality=300Graysc&&
aleK"
- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=High" "Quality=600ColorCMYK"
+ Attribute "FoomaticRIPOptionSetting" "PrintoutMode=High" "Quality=600ColorCMY"
Attribute "FoomaticRIPOptionSetting" "PrintoutMode=High.Gray" "Quality=600Grayscal&&
eK"
Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Photo" "Quality=600PhotoCMYKFul&&
@@ -5205,13 +5205,13 @@ er=&quot;HEWLETT-PACKARD&quot; -sDeviceModel=&quot;Deskjet D4100&quot;&&
"
Attribute "FoomaticRIPOption" "PrintoutMode" "enum Composite B"
Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Draft" "Quality=600DraftColorCM&&
-YK"
+Y"
Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Draft.Gray" "Quality=600DraftGr&&
ayscaleK"
- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Normal" "Quality=600ColorCMYK"
+ Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Normal" "Quality=600ColorCMY"
Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Normal.Gray" "Quality=600Graysc&&
aleK"
- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=High" "Quality=600ColorCMYK"
+ Attribute "FoomaticRIPOptionSetting" "PrintoutMode=High" "Quality=600ColorCMY"
Attribute "FoomaticRIPOptionSetting" "PrintoutMode=High.Gray" "Quality=600Grayscal&&
eK"
Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Photo" "Quality=600PhotoCMYKFul&&
diff --git a/prnt/drv/hpijs.drv.in.template b/prnt/drv/hpijs.drv.in.template
index 0c60fdcba..3ae87af0f 100644
--- a/prnt/drv/hpijs.drv.in.template
+++ b/prnt/drv/hpijs.drv.in.template
@@ -2220,16 +2220,16 @@ le=- -"
r=&quot;HEWLETT-PACKARD&quot; -sDeviceModel=&quot;deskjet 3320&quot;"
Attribute "FoomaticRIPOption" "PrintoutMode" "enum Composite B"
Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Draft" "Quality=300DraftColorCM&&
-YK"
+Y"
Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Draft.Gray" "Quality=300DraftGr&&
ayscaleK"
- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Normal" "Quality=300ColorCMYK"
+ Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Normal" "Quality=300ColorCMY"
Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Normal.Gray" "Quality=300Graysc&&
aleK"
- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=High" "Quality=600ColorCMYK"
+ Attribute "FoomaticRIPOptionSetting" "PrintoutMode=High" "Quality=600ColorCMY"
Attribute "FoomaticRIPOptionSetting" "PrintoutMode=High.Gray" "Quality=600Grayscal&&
eK"
- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Photo" "Quality=600PhotoCMYK"
+ Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Photo" "Quality=600PhotoCMY"
Attribute "FoomaticRIPOption" "PageSize" "enum CmdLine A"
Attribute "FoomaticRIPOptionSetting" "PageSize=Letter" " -dDEVICEWIDTHPOINTS=612 -&&
dDEVICEHEIGHTPOINTS=792"
@@ -2402,13 +2402,13 @@ le=- -"
r=&quot;HEWLETT-PACKARD&quot; -sDeviceModel=&quot;deskjet 3600&quot;"
Attribute "FoomaticRIPOption" "PrintoutMode" "enum Composite B"
Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Draft" "Quality=300DraftColorCM&&
-YK"
+Y"
Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Draft.Gray" "Quality=300DraftGr&&
ayscaleK"
- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Normal" "Quality=300ColorCMYK"
+ Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Normal" "Quality=300ColorCMY"
Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Normal.Gray" "Quality=300Graysc&&
aleK"
- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=High" "Quality=600ColorCMYK"
+ Attribute "FoomaticRIPOptionSetting" "PrintoutMode=High" "Quality=600ColorCMY"
Attribute "FoomaticRIPOptionSetting" "PrintoutMode=High.Gray" "Quality=600Grayscal&&
eK"
Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Photo" "Quality=600PhotoCMYKFul&&
@@ -2598,13 +2598,13 @@ er=&quot;HEWLETT-PACKARD&quot; -sDeviceModel=&quot;Deskjet D4100&quot;&&
"
Attribute "FoomaticRIPOption" "PrintoutMode" "enum Composite B"
Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Draft" "Quality=600DraftColorCM&&
-YK"
+Y"
Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Draft.Gray" "Quality=600DraftGr&&
ayscaleK"
- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Normal" "Quality=600ColorCMYK"
+ Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Normal" "Quality=600ColorCMY"
Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Normal.Gray" "Quality=600Graysc&&
aleK"
- Attribute "FoomaticRIPOptionSetting" "PrintoutMode=High" "Quality=600ColorCMYK"
+ Attribute "FoomaticRIPOptionSetting" "PrintoutMode=High" "Quality=600ColorCMY"
Attribute "FoomaticRIPOptionSetting" "PrintoutMode=High.Gray" "Quality=600Grayscal&&
eK"
Attribute "FoomaticRIPOptionSetting" "PrintoutMode=Photo" "Quality=600PhotoCMYKFul&&
diff --git a/prnt/hpcups/HPCupsFilter.cpp b/prnt/hpcups/HPCupsFilter.cpp
index 0bacfafac..5b282d83f 100644
--- a/prnt/hpcups/HPCupsFilter.cpp
+++ b/prnt/hpcups/HPCupsFilter.cpp
@@ -31,6 +31,7 @@
\*****************************************************************************/
#include "HPCupsFilter.h"
+#include "ImageProcessor.h"
#include <signal.h>
#include <sys/wait.h>
@@ -636,10 +637,16 @@ int HPCupsFilter::processRasterData(cups_raster_t *cups_raster)
sprintf(hpPreProcessedRasterFile, "%s/hp_%s_cups_SwapedPagesXXXXXX",CUPS_TMP_DIR, m_JA.user_name);
+ image_processor_t* imageProcessor = imageProcessorCreate();
while (cupsRasterReadHeader2(cups_raster, &cups_header))
{
+ IMAGE_PROCESSOR_ERROR result = imageProcessorStartPage(imageProcessor, &cups_header);
+ if (result != IPE_SUCCESS){
+ dbglog("DEBUG: imageProcessorStartPage failed result = %d\n", result);
+ }
+
current_page_number++;
if (current_page_number == 1) {
@@ -738,6 +745,12 @@ int HPCupsFilter::processRasterData(cups_raster_t *cups_raster)
color_raster = rgbRaster;
black_raster = kRaster;
+ result = imageProcessorProcessLine(imageProcessor, m_pPrinterBuffer, cups_header.cupsBytesPerLine);
+ if (result != IPE_SUCCESS){
+ dbglog("DEBUG: imageProcessorProcessLine failed result = %d\n", result);
+ }
+
+
if ((y == 0) && !is_ljmono) {
//For ljmono, make sure that first line is not a blankRaster line.Otherwise printer
//may not skip blank lines before actual data
@@ -767,6 +780,12 @@ int HPCupsFilter::processRasterData(cups_raster_t *cups_raster)
}
} // for() loop end
+ result = imageProcessorEndPage(imageProcessor);
+ if (result != IPE_SUCCESS){
+ dbglog("DEBUG: imageProcessorEndPage failed result = %d\n", result);
+ }
+
+
m_Job.NewPage();
if (err != NO_ERROR) {
break;
@@ -781,6 +800,8 @@ int HPCupsFilter::processRasterData(cups_raster_t *cups_raster)
rgbRaster = NULL;
}
+ imageProcessorDestroy(imageProcessor);
+
unlink(hpPreProcessedRasterFile);
return ret_status;
}
diff --git a/prnt/hpcups/HPCupsFilter.h b/prnt/hpcups/HPCupsFilter.h
index 60f858025..3d003d5d2 100644
--- a/prnt/hpcups/HPCupsFilter.h
+++ b/prnt/hpcups/HPCupsFilter.h
@@ -38,8 +38,6 @@
#include <cups/ppd.h>
#include "dbuscomm.h"
-#include <cups/ppd.h>
-
#define DBITMAPFILEHEADER 14
#define DBITMAPINFOHEADER 40
diff --git a/prnt/hpcups/Pcl3Gui2.cpp b/prnt/hpcups/Pcl3Gui2.cpp
index 1678c3989..893bcfd7c 100644
--- a/prnt/hpcups/Pcl3Gui2.cpp
+++ b/prnt/hpcups/Pcl3Gui2.cpp
@@ -30,6 +30,7 @@
#include "CommonDefinitions.h"
#include "Pcl3Gui2.h"
+#include "ErnieFilter.h"
#include "Mode10.h"
#include "Mode9.h"
#include "PrinterCommands.h"
@@ -37,6 +38,7 @@
Pcl3Gui2::Pcl3Gui2() : Encapsulator()
{
speed_mech_enabled = true;
+ m_run_ernie_filter = true;
crd_type = eCrd_both;
strcpy(m_szLanguage, "PCL3GUI");
}
@@ -57,6 +59,21 @@ DRIVER_ERROR Pcl3Gui2::Configure(Pipeline **pipeline)
}
width = m_pMA->printable_width;;
+ if (m_run_ernie_filter) {
+ ErnieFilter *pErnie;
+
+ // Normal: threshold = (resolution) * (0.0876) - 2
+ int threshold = ((m_pQA->horizontal_resolution * 876) / 10000) - 2;
+
+ pErnie = new ErnieFilter (width, eBGRPixelData, threshold);
+ p = new Pipeline (pErnie);
+ if (head) {
+ head->AddPhase (p);
+ }
+ else {
+ head = p;
+ }
+ }
if (crd_type != eCrd_black_only) {
Mode10 *pMode10;
diff --git a/prnt/hpcups/Pcl3Gui2.h b/prnt/hpcups/Pcl3Gui2.h
index 543f8bd76..890707831 100644
--- a/prnt/hpcups/Pcl3Gui2.h
+++ b/prnt/hpcups/Pcl3Gui2.h
@@ -60,6 +60,7 @@ private:
DRIVER_ERROR encapsulateRaster(BYTE *input_raster, unsigned int num_bytes, COLORTYPE c_type);
bool speed_mech_enabled;
int page_number;
+ bool m_run_ernie_filter;
eCrdType crd_type;
};
diff --git a/prnt/hpijs/breaks_open.cpp b/prnt/hpijs/breaks_open.cpp
index 4d8fdf475..ebfdb95d0 100644
--- a/prnt/hpijs/breaks_open.cpp
+++ b/prnt/hpijs/breaks_open.cpp
@@ -1078,10 +1078,7 @@ const unsigned char HT600x6004level970_open[1024]=
{
0, 0, 255, 0,
-// 2001.06.16 mrb: changed the value to 0. With the original "1"
-// the printer sometimes prints empty lines...
-//0, 1, 255, 0,
-0, 0, 255, 0,
+0, 1, 255, 0,
0, 3, 255, 0,
0, 5, 255, 0,
0, 7, 255, 0,
diff --git a/prnt/hpijs/dj660_maps.cpp b/prnt/hpijs/dj660_maps.cpp
index 6da224f99..7f29cbba7 100644
--- a/prnt/hpijs/dj660_maps.cpp
+++ b/prnt/hpijs/dj660_maps.cpp
@@ -38,10 +38,7 @@ APDK_BEGIN_NAMESPACE
//const
uint32_t ulMapDJ660_CCM_KCMY[ 9 * 9 * 9 ]=
{
-// 2001.06.14 mrb: Replaced the first entry so the printer will
-// use only the black pen when he should print real black.
-// 422720226UL, 142187374UL, 94354238UL, 62442785UL, 45668877UL, 27648516UL, 8972032UL, 7335680UL, 5895424UL,
- 226UL, 142187374UL, 94354238UL, 62442785UL, 45668877UL, 27648516UL, 8972032UL, 7335680UL, 5895424UL,
+ 422720226UL, 142187374UL, 94354238UL, 62442785UL, 45668877UL, 27648516UL, 8972032UL, 7335680UL, 5895424UL,
2519110233UL, 807846483UL, 391693109UL, 260029471UL, 143570703UL, 42776580UL, 8501760UL, 7782400UL, 6539520UL,
3072173868UL, 1881129514UL, 841465387UL, 524792087UL, 358391818UL, 174364420UL, 40408577UL, 6920704UL, 6530560UL,
3407591425UL, 2551891200UL, 1612695808UL, 824489479UL, 506699268UL, 306153730UL, 105283329UL, 5144320UL, 5737216UL,
diff --git a/prnt/hpijs/dj690_maps.cpp b/prnt/hpijs/dj690_maps.cpp
index df0c5270f..a8248c6f1 100644
--- a/prnt/hpijs/dj690_maps.cpp
+++ b/prnt/hpijs/dj690_maps.cpp
@@ -38,10 +38,7 @@ APDK_BEGIN_NAMESPACE
uint32_t ulMapDJ690_CMYK[ 9 * 9 * 9 ]=
// DJ690_CMYK
{
-// 2001.06.14 mrb: Replaced the first entry so the printer will
-// use only the black pen when he should print real black.
-// 337848575UL, 37838470UL, 155209268UL, 137905152UL, 36454656UL, 2310144UL,
- 226UL, 37838470UL, 155209268UL, 137905152UL, 36454656UL, 2310144UL,
+ 337848575UL, 37838470UL, 155209268UL, 137905152UL, 36454656UL, 2310144UL,
2179072UL, 2051072UL, 1733120UL, 2013280119UL, 385897321UL, 303379741UL,
270610688UL, 102772224UL, 1844992UL, 1911552UL, 1847296UL, 1784832UL,
2080387626UL, 1157643294UL, 452996881UL, 335555072UL, 202384384UL, 50991872UL,
diff --git a/prnt/hpijs/dj895_maps.cpp b/prnt/hpijs/dj895_maps.cpp
index 54da57d17..ff23db5b4 100644
--- a/prnt/hpijs/dj895_maps.cpp
+++ b/prnt/hpijs/dj895_maps.cpp
@@ -37,10 +37,7 @@ APDK_BEGIN_NAMESPACE
uint32_t ulMapDJ895_KCMY[ 9*9*9 ]=
{
-// 2001.06.14 mrb: Replaced the first entry so the printer will
-// use only the black pen when he should print real black.
-//1819176703UL, 79494215UL, 112983330UL, 79035667UL, 78183948UL, 60489224UL, 59571718UL, 42007811UL, 7405312UL,
-226UL, 79494215UL, 112983330UL, 79035667UL, 78183948UL, 60489224UL, 59571718UL, 42007811UL, 7405312UL,
+1819176703UL, 79494215UL, 112983330UL, 79035667UL, 78183948UL, 60489224UL, 59571718UL, 42007811UL, 7405312UL,
4230922555UL, 655358293UL, 176553263UL, 128253208UL, 61209869UL, 60751368UL, 26606852UL, 9305345UL, 8650496UL,
4248940299UL, 3776766759UL, 756415798UL, 308083743UL, 142671120UL, 59440646UL, 9239553UL, 9109248UL, 8779520UL,
4248086274UL, 4214276619UL, 2786390812UL, 942206231UL, 491516427UL, 224131588UL, 6616320UL, 7399168UL, 7857664UL,
diff --git a/prnt/hpijs/dj895_maps2.cpp b/prnt/hpijs/dj895_maps2.cpp
index 8ab12d8a5..2f6d85779 100644
--- a/prnt/hpijs/dj895_maps2.cpp
+++ b/prnt/hpijs/dj895_maps2.cpp
@@ -163,10 +163,7 @@ uint32_t ulMapDJ895_HB_KCMY[ 9*9*9 ]=
uint32_t ulMapDJ895_Binary_KCMY[ 9*9*9 ]=
{
-// 2001.06.14 mrb: Replaced the first entry so the printer will
-// use only the black pen when he should print real black.
-//1819176648UL, 64158794UL, 80805158UL, 80215318UL, 62389519UL, 61406730UL,
-226UL, 64158794UL, 80805158UL, 80215318UL, 62389519UL, 61406730UL,
+1819176648UL, 64158794UL, 80805158UL, 80215318UL, 62389519UL, 61406730UL,
60292615UL, 42401028UL, 7601920UL, 4230922301UL, 571406681UL, 160889651UL,
113048859UL, 62717200UL, 45415944UL, 27917573UL, 10419457UL, 9238272UL,
4248940557UL, 3743081259UL, 790296119UL, 325515810UL, 127007505UL, 27196678UL,
diff --git a/prnt/hpijs/dj970_maps.cpp b/prnt/hpijs/dj970_maps.cpp
index 1f696f035..d5d25d54e 100644
--- a/prnt/hpijs/dj970_maps.cpp
+++ b/prnt/hpijs/dj970_maps.cpp
@@ -127,11 +127,7 @@ uint32_t ulMapGRAY_K_6x6x1[] =
uint32_t ulMapDJ970_KCMY[ 9*9*9 ]=
{
-// 2003.06.05 rss: Replaced the first entry so the printer will
-// (hopefully) use only the black pen when he should print real black.
-// Please report as a bug if it doesn't, or something worse happens.
-// 673723135UL, 26007371UL, 9756717UL, 10020638UL, 10022677UL, 10153743UL,
- 226UL, 26007371UL, 9756717UL, 10020638UL, 10022677UL, 10153743UL,
+ 673723135UL, 26007371UL, 9756717UL, 10020638UL, 10022677UL, 10153743UL,
10285066UL, 10416133UL, 9169408UL, 3405886809UL, 59743UL, 23980849UL,
9366812UL, 10153744UL, 10285066UL, 10153990UL, 10087424UL, 9169408UL,
3858807091UL, 2197868343UL, 60220UL, 4714015UL, 7270155UL, 8646656UL,
diff --git a/prnt/hpijs/dj970_maps3.cpp b/prnt/hpijs/dj970_maps3.cpp
index 04c631b0d..fcf38774a 100644
--- a/prnt/hpijs/dj970_maps3.cpp
+++ b/prnt/hpijs/dj970_maps3.cpp
@@ -37,8 +37,7 @@ APDK_BEGIN_NAMESPACE
uint32_t ulMapDJ970_Draft_KCMY[ 9*9*9 ]=
{
-//1802205183UL, 22740362UL, 5832524UL, 5635892UL, 5570340UL, 5308188UL,
- 226UL, 22740362UL, 5832524UL, 5635892UL, 5570340UL, 5308188UL,
+1802205183UL, 22740362UL, 5832524UL, 5635892UL, 5570340UL, 5308188UL,
5308180UL, 5504778UL, 5504768UL, 4278239136UL, 65446UL, 4194132UL,
5308210UL, 5373728UL, 5308182UL, 5504784UL, 5504776UL, 5504768UL,
4278498896UL, 1862336354UL, 65388UL, 2621242UL, 4128540UL, 4718348UL,
diff --git a/prnt/hpijs/hpcupsfax.cpp b/prnt/hpijs/hpcupsfax.cpp
index 994e50f39..8514775d4 100644
--- a/prnt/hpijs/hpcupsfax.cpp
+++ b/prnt/hpijs/hpcupsfax.cpp
@@ -43,7 +43,6 @@
#include <arpa/inet.h>
#include <math.h>
#include <cups/cups.h>
-#include <cups/ppd.h>
#include <cups/raster.h>
#include <string>
#ifdef FALSE
diff --git a/prnt/hpijs/ljcolor.cpp b/prnt/hpijs/ljcolor.cpp
index db35e9819..0ecbfc606 100644
--- a/prnt/hpijs/ljcolor.cpp
+++ b/prnt/hpijs/ljcolor.cpp
@@ -330,19 +330,6 @@ DRIVER_ERROR HeaderLJColor::StartSend ()
err = thePrinter->Send ((const BYTE *) res, strlen (res));
-// Binding directive
-
- strcpy (res, "@PJL SET BINDING=LONGEDGE\015\012");
-
-#ifdef APDK_AUTODUPLEX
- if (thePrintContext->QueryDuplexMode () == DUPLEXMODE_TABLET)
- {
- strcpy (res, "@PJL SET BINDING=SHORTEDGE\015\012");
- }
-#endif
-
- err = thePrinter->Send ((const BYTE *) res, strlen (res));
-
err = thePrinter->Send ((const BYTE*) EnterLanguage, sizeof (EnterLanguage));
ERRCHECK;
diff --git a/prnt/hpijs/ljjetready.cpp b/prnt/hpijs/ljjetready.cpp
index d79d40932..6942d2992 100644
--- a/prnt/hpijs/ljjetready.cpp
+++ b/prnt/hpijs/ljjetready.cpp
@@ -329,17 +329,6 @@ DRIVER_ERROR HeaderLJJetReady::StartSend ()
err = thePrinter->Send ((const BYTE *) szScratchStr, strlen (szScratchStr));
ERRCHECK;
- // Send the Binding command
- strcpy (szScratchStr, "@PJL SET BINDING=LONGEDGE\015\012");
-#ifdef APDK_AUTODUPLEX
- if (thePrintContext->QueryDuplexMode () == DUPLEXMODE_TABLET)
- {
- strcpy (szScratchStr, "@PJL SET BINDING=SHORTEDGE\015\012");
- }
-#endif
- err = thePrinter->Send ((const BYTE *) szScratchStr, strlen (szScratchStr));
- ERRCHECK;
-
//Set the resolution to 600
err = thePrinter->Send ((const BYTE*)ccpPJLSetRes,sizeof(ccpPJLSetRes));
ERRCHECK;
diff --git a/prnt/hpijs/ljmono.cpp b/prnt/hpijs/ljmono.cpp
index 8d3ad4dab..67a0077d6 100644
--- a/prnt/hpijs/ljmono.cpp
+++ b/prnt/hpijs/ljmono.cpp
@@ -212,19 +212,6 @@ DRIVER_ERROR HeaderLJMono::StartSend ()
err = thePrinter->Send ((const BYTE *) res, strlen (res));
ERRCHECK;
-// Binding directive
-
- strcpy (res, "@PJL SET BINDING=LONGEDGE\015\012");
-
-#ifdef APDK_AUTODUPLEX
- if (thePrintContext->QueryDuplexMode () == DUPLEXMODE_TABLET)
- {
- strcpy (res, "@PJL SET BINDING=SHORTEDGE\015\012");
- }
-#endif
- err = thePrinter->Send ((const BYTE *) res, strlen (res));
- ERRCHECK;
-
err = thePrinter->Send ((const BYTE*) EnterLanguage, sizeof (EnterLanguage));
ERRCHECK;
diff --git a/prnt/ps/hp-laserjet_4000_series-ps.ppd b/prnt/ps/hp-laserjet_4000_series-ps.ppd
index 66c403271..db1248c45 100644
--- a/prnt/ps/hp-laserjet_4000_series-ps.ppd
+++ b/prnt/ps/hp-laserjet_4000_series-ps.ppd
@@ -97,17 +97,6 @@
*SuggestedWaitTimeout: "120"
*PrintPSErrors: True
-*% =================================
-*% PostScript Patches
-*% =================================
-*JobPatchFile 1: "
-/limitinterpolate { dup type /dicttype eq { dup /Interpolate known { dup /Interpolate get {
- 1 1 idtransform 2 index /ImageMatrix get dtransform exch abs 1 exch div exch abs 1 exch div 2 copy lt
- { exch }if pop 4 lt { dup /Interpolate false put } if } if } if } if
-} bind def
-/image { limitinterpolate systemdict /image get exec } bind def
-/imagemask { limitinterpolate systemdict /imagemask get exec } bind def"
-*End
*% ===================================
*% Installable Options
diff --git a/scan.py b/scan.py
index 19b5a6353..d31aee148 100755
--- a/scan.py
+++ b/scan.py
@@ -250,8 +250,8 @@ try:
extra_options=[utils.USAGE_SPACE,
("[OPTIONS] (General)", "", "header", False),
("Scan destinations:", "-s<dest_list> or --dest=<dest_list>", "option", False),
- ("", "where <dest_list> is a comma separated list containing one or more of: 'file'", "option", False),
- ("", ", 'viewer', 'editor', 'pdf', or 'print'. Use only commas between values, no spaces.", "option", False),
+ ("", "where <dest_list> is a comma separated list containing one or more of: 'file'\*, ", "option", False),
+ ("", "'viewer', 'editor', 'pdf', or 'print'. Use only commas between values, no spaces.", "option", False),
("Scan mode:", "-m<mode> or --mode=<mode>. Where <mode> is 'gray'\*, 'color' or 'lineart'.", "option", False),
("Scanning resolution:", "-r<resolution_in_dpi> or --res=<resolution_in_dpi> or --resolution=<resolution_in_dpi>", "option", False),
("", "where 300 is default.", "option", False),
@@ -291,7 +291,7 @@ try:
("", "Coordinates are relative to the upper left corner of the scan area.", "option", False),
("", "Units are specified by -t/--units (default is 'mm').", "option", False),
("Specify the scan area based on a paper size:", "--size=<paper size name>", "option", False),
- ("", "where <paper size name> is one of: %s" % ', '.join(sorted(list(PAGE_SIZES.keys()))), "option", False),
+ ("", "where <paper size name> is one of: %s" % ', '.join(list(PAGE_SIZES.keys())), "option", False),
utils.USAGE_SPACE,
("[OPTIONS] ('file' dest)", "", "header", False),
("Filename for 'file' destination:", "-o<file> or -f<file> or --file=<file> or --output=<file>", "option", False),
diff --git a/scan/sane/bb_ledm.c b/scan/sane/bb_ledm.c
index 27d73a0c6..b233d1e28 100644
--- a/scan/sane/bb_ledm.c
+++ b/scan/sane/bb_ledm.c
@@ -189,7 +189,7 @@ Keep-Alive: 20\r\nProxy-Connection: keep-alive\r\nCookie: AccessCounter=new\r\n0
<YStart>%d</YStart>\
<Height>%d</Height>\
<Format>%s</Format>\
-<CompressionQFactor>0</CompressionQFactor>\
+<CompressionQFactor>15</CompressionQFactor>\
<ColorSpace>%s</ColorSpace>\
<BitDepth>%d</BitDepth>\
<InputSource>%s</InputSource>\
@@ -234,38 +234,6 @@ Keep-Alive: 300\r\nProxy-Connection: keep-alive\r\nCookie: AccessCounter=new\r\n
# define JOBSTATE_COMPLETED "<j:JobState>Completed</j:JobState>"
# define PRESCANPAGE "<PreScanPage>"
-static int parse_status_elements(const char *payload, int size, struct wscn_create_scan_job_response *resp)
-{
- char tag[512];
- char value[128];
- char *tail=(char *)payload;
-
- while (1)
- {
- get_tag(tail, size-(tail-payload), tag, sizeof(tag), &tail);
-
- if (!tag[0])
- break;
-
- if (strncmp(tag, "ImageWidth", 10) == 0)
- {
- get_element(tail, size-(tail-payload), value, sizeof(value), &tail);
- resp->pixels_per_line = strtol(value, NULL, 10);
- }
- else if (strncmp(tag, "ImageHeight", 11) == 0)
- {
- get_element(tail, size-(tail-payload), value, sizeof(value), &tail);
- resp->lines = strtol(value, NULL, 10);
- }
- else if (strncmp(tag, "BytesPerLine", 12) == 0)
- {
- get_element(tail, size-(tail-payload), value, sizeof(value), &tail);
- resp->bytes_per_line = strtol(value, NULL, 10);
- }
- }
- return 0;
-}
-
static int parse_scan_elements(const char *payload, int size, struct wscn_scan_elements *elements)
{
char tag[512];
@@ -794,7 +762,8 @@ int bb_get_parameters(struct ledm_session *ps, SANE_Parameters *pp, int option)
if (ps->currentCompression == SF_RAW && ps->currentScanMode != CE_GRAY8)
{
/* Set scan parameters based on scan job response values */
- pp->lines = pbb->job.lines;
+ //pp->lines = pbb->job.lines;
+ pp->lines = (int)(SANE_UNFIX(ps->effectiveBry - ps->effectiveTly)/MM_PER_INCH*ps->currentResolution);
pp->pixels_per_line = pbb->job.pixels_per_line;
pp->bytes_per_line = pbb->job.bytes_per_line;
}
@@ -815,8 +784,8 @@ int bb_get_parameters(struct ledm_session *ps, SANE_Parameters *pp, int option)
break;
case SPO_BEST_GUESS: /* called by xsane & sane_start */
/* Set scan parameters based on best guess. */
- pp->lines = (int)(SANE_UNFIX(ps->effectiveBry - ps->effectiveTly)/MM_PER_INCH*ps->currentResolution);
- pp->pixels_per_line = ps->image_traits.iPixelsPerRow;
+ pp->lines = (int)round(SANE_UNFIX(ps->effectiveBry - ps->effectiveTly)/MM_PER_INCH*ps->currentResolution);
+ pp->pixels_per_line = (int)round(SANE_UNFIX(ps->effectiveBrx -ps->effectiveTlx)/MM_PER_INCH*ps->currentResolution);
pp->bytes_per_line = BYTES_PER_LINE(pp->pixels_per_line, pp->depth * factor);
break;
default:
@@ -920,7 +889,7 @@ SANE_Status bb_start_scan(struct ledm_session *ps)
(int) ((ps->currentBrx / 5548.7133) - (ps->currentTlx / 5548.7133)),//<Width>
(int) (ps->currentTly / 5548.7133),//<YStart>
(int) ((ps->currentBry / 5548.7133) - (ps->currentTly / 5548.7133)),//<Height>
- (ps->currentCompression == SF_RAW) ? "Raw" : "Jpeg", //<Format>
+ "Jpeg",//<Format>
(! strcmp(ce_element[ps->currentScanMode], "Color8")) ? "Color" : (! strcmp(ce_element[ps->currentScanMode], "Gray8")) ? "Gray" : "Gray",//<ColorSpace>
((! strcmp(ce_element[ps->currentScanMode], "Color8")) || (! strcmp(ce_element[ps->currentScanMode], "Gray8"))) ? 8: 8,//<BitDepth>
ps->currentInputSource == IS_PLATEN ? is_element[1] : is_element[2],//<InputSource>
@@ -1018,7 +987,6 @@ SANE_Status bb_start_scan(struct ledm_session *ps)
_DBG("bb_start_scan() read_http_payload FAILED len=%d buf=%s\n", len, buf);
break;
}
-
//For a new scan, buf must contain <PreScanPage>.
if (NULL == strstr(buf,PRESCANPAGE))
{ //i.e Paper is not present in Scanner
@@ -1037,9 +1005,6 @@ SANE_Status bb_start_scan(struct ledm_session *ps)
stat = SANE_STATUS_GOOD;
goto bugout;
}
- // Parse buf here
- parse_status_elements(buf, len, &pbb->job);
-
usleep(500000);//0.5 sec delay
}//end while()
diff --git a/scan/sane/ledm.c b/scan/sane/ledm.c
index 8f0433853..9a1ff02d1 100644
--- a/scan/sane/ledm.c
+++ b/scan/sane/ledm.c
@@ -170,11 +170,11 @@ static int set_scan_mode_side_effects(struct ledm_session *ps, enum COLOR_ENTRY
case CE_GRAY8:
case CE_COLOR8:
default:
- ps->compressionList[j] = STR_COMPRESSION_NONE;
- ps->compressionMap[j++] = SF_RAW;
+// ps->compressionList[j] = STR_COMPRESSION_NONE;
+// ps->compressionMap[j++] = SF_RAW;
ps->compressionList[j] = STR_COMPRESSION_JPEG;
ps->compressionMap[j++] = SF_JPEG;
- ps->currentCompression = SF_RAW;
+ ps->currentCompression = SF_JPEG;
ps->option[LEDM_OPTION_JPEG_QUALITY].cap |= SANE_CAP_SOFT_SELECT; /* enable jpeg quality */
break;
}
@@ -679,7 +679,7 @@ SANE_Status ledm_control_option(SANE_Handle handle, SANE_Int option, SANE_Action
}
else
{ /* Set default. */
- ps->currentCompression = SF_RAW;
+ ps->currentCompression = SF_JPEG;
stat = SANE_STATUS_GOOD;
}
break;
@@ -984,9 +984,7 @@ SANE_Status ledm_start(SANE_Handle handle)
}
}
else
- {
- ipGetOutputTraits(ps->ip_handle, &ps->image_traits); /* get valid image traits */
- }
+ ipGetImageTraits(ps->ip_handle, NULL, &ps->image_traits); /* get valid image traits */
stat = SANE_STATUS_GOOD;
diff --git a/scan/sane/marvell.c b/scan/sane/marvell.c
index a0692920e..ad267a3f1 100644
--- a/scan/sane/marvell.c
+++ b/scan/sane/marvell.c
@@ -60,14 +60,10 @@ static int bb_load(struct marvell_session *ps, const char *so)
int stat=1;
/* Load hpmud manually with symbols exported. Otherwise the plugin will not find it. */
-
- if ((ps->hpmud_handle = dlopen("libhpmud.so", RTLD_LAZY|RTLD_GLOBAL)) == NULL)
+ if ((ps->hpmud_handle = load_library("libhpmud.so")) == NULL)
{
- if ((ps->hpmud_handle = dlopen("libhpmud.so.0", RTLD_LAZY|RTLD_GLOBAL)) == NULL)
- {
- BUG("unable to load restricted library: %s\n", dlerror());
- goto bugout;
- }
+ if ((ps->hpmud_handle = load_library("libhpmud.so.0")) == NULL)
+ goto bugout;
}
/* Load math library manually with symbols exported (Ubuntu 8.04). Otherwise the plugin will not find it. */
diff --git a/scan/sane/scl.c b/scan/sane/scl.c
index eccd99052..cc640f444 100755
--- a/scan/sane/scl.c
+++ b/scan/sane/scl.c
@@ -37,11 +37,10 @@
#define DEBUG_DECLARE_ONLY
#include "sanei_debug.h"
-static int SclBufferIsPartialReply( void * dataptr, int datalen )
+static int SclBufferIsPartialReply( unsigned char * data, int datalen )
{
int i = 0, value = 0;
- unsigned char * const data = dataptr;
- unsigned int d;
+ unsigned char d;
if( i >= datalen )
{
diff --git a/scan/sane/sclpml.c b/scan/sane/sclpml.c
index 61500da57..9a5975f32 100644
--- a/scan/sane/sclpml.c
+++ b/scan/sane/sclpml.c
@@ -1084,17 +1084,20 @@ static void init_options( hpaioScanner_t hpaio )
hpaio->option[OPTION_ADF_MODE].constraint_type = SANE_CONSTRAINT_STRING_LIST;
hpaio->option[OPTION_ADF_MODE].constraint.string_list = hpaio->adfModeList;
- hpaio->option[OPTION_DUPLEX].name = STR_NAME_DUPLEX;
- hpaio->option[OPTION_DUPLEX].title = STR_TITLE_DUPLEX;
- hpaio->option[OPTION_DUPLEX].desc = STR_DESC_DUPLEX;
- hpaio->option[OPTION_DUPLEX].type = SANE_TYPE_BOOL;
- hpaio->option[OPTION_DUPLEX].unit = SANE_UNIT_NONE;
- hpaio->option[OPTION_DUPLEX].size = sizeof( SANE_Bool );
- hpaio->option[OPTION_DUPLEX].cap = SANE_CAP_SOFT_SELECT |
+ // Duplex scanning is supported
+ if (hpaio->supportsDuplex == 1)
+ {
+ hpaio->option[OPTION_DUPLEX].name = STR_NAME_DUPLEX;
+ hpaio->option[OPTION_DUPLEX].title = STR_TITLE_DUPLEX;
+ hpaio->option[OPTION_DUPLEX].desc = STR_DESC_DUPLEX;
+ hpaio->option[OPTION_DUPLEX].type = SANE_TYPE_BOOL;
+ hpaio->option[OPTION_DUPLEX].unit = SANE_UNIT_NONE;
+ hpaio->option[OPTION_DUPLEX].size = sizeof( SANE_Bool );
+ hpaio->option[OPTION_DUPLEX].cap = SANE_CAP_SOFT_SELECT |
SANE_CAP_SOFT_DETECT |
SANE_CAP_ADVANCED;
- hpaio->option[OPTION_DUPLEX].constraint_type = SANE_CONSTRAINT_NONE;
-
+ hpaio->option[OPTION_DUPLEX].constraint_type = SANE_CONSTRAINT_NONE;
+ }
hpaio->option[GROUP_GEOMETRY].title = STR_TITLE_GEOMETRY;
hpaio->option[GROUP_GEOMETRY].type = SANE_TYPE_GROUP;
hpaio->option[GROUP_GEOMETRY].cap = SANE_CAP_ADVANCED;
diff --git a/scan/sane/soap.c b/scan/sane/soap.c
index 352db3d55..07106fe6e 100644
--- a/scan/sane/soap.c
+++ b/scan/sane/soap.c
@@ -68,13 +68,10 @@ static int bb_load(struct soap_session *ps, const char *so)
int stat=1;
/* Load hpmud manually with symbols exported. Otherwise the plugin will not find it. */
- if ((ps->hpmud_handle = dlopen("libhpmud.so", RTLD_LAZY|RTLD_GLOBAL)) == NULL)
+ if ((ps->hpmud_handle = load_library("libhpmud.so")) == NULL)
{
- if ((ps->hpmud_handle = dlopen("libhpmud.so.0", RTLD_LAZY|RTLD_GLOBAL)) == NULL)
- {
- BUG("unable to load restricted library: %s\n", dlerror());
- goto bugout;
- }
+ if ((ps->hpmud_handle = load_library("libhpmud.so.0")) == NULL)
+ goto bugout;
}
/* Load math library manually with symbols exported (Ubuntu 8.04). Otherwise the plugin will not find it. */
diff --git a/scan/sane/soapht.c b/scan/sane/soapht.c
index b554b3ceb..269ab2140 100644
--- a/scan/sane/soapht.c
+++ b/scan/sane/soapht.c
@@ -62,13 +62,10 @@ static int bb_load(struct soap_session *ps, const char *so)
int stat=1;
/* Load hpmud manually with symbols exported. Otherwise the plugin will not find it. */
- if ((ps->hpmud_handle = dlopen("libhpmud.so", RTLD_LAZY|RTLD_GLOBAL)) == NULL)
+ if ((ps->hpmud_handle = load_library("libhpmud.so.0")) == NULL)
{
- if ((ps->hpmud_handle = dlopen("libhpmud.so.0", RTLD_LAZY|RTLD_GLOBAL)) == NULL)
- {
- BUG("unable to load restricted library: %s\n", dlerror());
- goto bugout;
- }
+ if ((ps->hpmud_handle = load_library("libhpmud.so.0")) == NULL)
+ goto bugout;
}
/* Load math library manually with symbols exported (Ubuntu 8.04). Otherwise the plugin will not find it. */
diff --git a/ui/devmgr4.py b/ui/devmgr4.py
index a868ccac0..cc2552f91 100644
--- a/ui/devmgr4.py
+++ b/ui/devmgr4.py
@@ -1422,7 +1422,7 @@ class DevMgr4(DevMgr4_base):
QMessageBox.critical(self,
self.caption(),
self.__tr("<b>Unable to find an appropriate su/sudo utility to run hp-plugin.</b><p>Install kdesu, gnomesu, or gksu.</p>"),
- QMessageBox.Ok |\
+ QMessageBox.Ok,
QMessageBox.NoButton,
QMessageBox.NoButton)
else:
@@ -2854,7 +2854,7 @@ class DevMgr4(DevMgr4_base):
x = QMessageBox.critical(self,
self.caption(),
self.__tr("<b>Annoying Confirmation: Are you sure you want to remove this device?</b>"),
- QMessageBox.Yes |\
+ QMessageBox.Yes,
QMessageBox.No | QMessageBox.Default,
QMessageBox.NoButton)
if x == QMessageBox.Yes:
@@ -2949,7 +2949,7 @@ class DevMgr4(DevMgr4_base):
QMessageBox.critical(self,
self.caption(),
error_text,
- QMessageBox.Ok |\
+ QMessageBox.Ok,
QMessageBox.NoButton,
QMessageBox.NoButton)
@@ -2958,7 +2958,7 @@ class DevMgr4(DevMgr4_base):
QMessageBox.warning(self,
self.caption(),
msg,
- QMessageBox.Ok |\
+ QMessageBox.Ok,
QMessageBox.NoButton,
QMessageBox.NoButton)
@@ -3115,7 +3115,7 @@ class ScrollTestpageView(ScrollView):
QMessageBox.information(self,
self.caption(),
self.__tr("<p><b>A test page should be printing on your printer.</b><p>If the page fails to print, please visit http://hplip.sourceforge.net for troubleshooting and support."),
- QMessageBox.Ok |\
+ QMessageBox.Ok,
QMessageBox.NoButton,
QMessageBox.NoButton)
@@ -3130,7 +3130,7 @@ class ScrollTestpageView(ScrollView):
QMessageBox.critical(self,
self.caption(),
error_text,
- QMessageBox.Ok |\
+ QMessageBox.Ok,
QMessageBox.NoButton,
QMessageBox.NoButton)
@@ -3272,7 +3272,7 @@ class ScrollColorCalView(ScrollView):
QMessageBox.information(self,
self.caption(),
self.__tr("<p><b>A test page should be printing on your printer.</b><p>If the page fails to print, please visit http://hplip.sourceforge.net for troubleshooting and support."),
- QMessageBox.Ok |\
+ QMessageBox.Ok,
QMessageBox.NoButton,
QMessageBox.NoButton)
@@ -3287,7 +3287,7 @@ class ScrollColorCalView(ScrollView):
QMessageBox.critical(self,
self.caption(),
error_text,
- QMessageBox.Ok |\
+ QMessageBox.Ok,
QMessageBox.NoButton,
QMessageBox.NoButton)
diff --git a/ui/faxaddrbookform.py b/ui/faxaddrbookform.py
index b23364410..109462207 100644
--- a/ui/faxaddrbookform.py
+++ b/ui/faxaddrbookform.py
@@ -228,7 +228,7 @@ class FaxAddrBookGroupsForm(FaxAddrBookGroupsForm_base):
x = QMessageBox.critical(self,
self.caption(),
self.__tr("<b>Annoying Confirmation: Are you sure you want to delete this group?</b>"),
- QMessageBox.Yes |\
+ QMessageBox.Yes,
QMessageBox.No | QMessageBox.Default,
QMessageBox.NoButton)
if x == QMessageBox.Yes:
@@ -421,7 +421,7 @@ class FaxAddrBookForm(FaxAddrBookForm_base):
if QMessageBox.critical(self,
self.caption(),
self.__tr("<b>Annoying Confirmation: Are you sure you want to delete this address book entry?</b>"),
- QMessageBox.Yes |\
+ QMessageBox.Yes,
QMessageBox.No | QMessageBox.Default,
QMessageBox.NoButton) == QMessageBox.Yes:
db.delete(self.current.entry['name'])
@@ -451,7 +451,7 @@ class FaxAddrBookForm(FaxAddrBookForm_base):
QMessageBox.critical(self,
self.caption(),
QString(error_text),
- QMessageBox.Ok |\
+ QMessageBox.Ok,
QMessageBox.NoButton,
QMessageBox.NoButton)
diff --git a/ui/faxsendjobform.py b/ui/faxsendjobform.py
index 69f424c42..106215c5e 100644
--- a/ui/faxsendjobform.py
+++ b/ui/faxsendjobform.py
@@ -210,7 +210,7 @@ class FaxSendJobForm(QMainWindow):
QMessageBox.information(self,
self.caption(),
self.__tr("<p><b>Fax send completed successfully.</b>"),
- QMessageBox.Ok |\
+ QMessageBox.Ok,
QMessageBox.NoButton,
QMessageBox.NoButton)
@@ -219,7 +219,7 @@ class FaxSendJobForm(QMainWindow):
QMessageBox.critical(self,
self.caption(),
error_text,
- QMessageBox.Ok |\
+ QMessageBox.Ok,
QMessageBox.NoButton,
QMessageBox.NoButton)
@@ -228,7 +228,7 @@ class FaxSendJobForm(QMainWindow):
QMessageBox.warning(self,
self.caption(),
error_text,
- QMessageBox.Ok |\
+ QMessageBox.Ok,
QMessageBox.NoButton,
QMessageBox.NoButton)
diff --git a/ui/firmwaredialog.py b/ui/firmwaredialog.py
index 0bcee1164..16b313374 100644
--- a/ui/firmwaredialog.py
+++ b/ui/firmwaredialog.py
@@ -109,7 +109,7 @@ class FirmwareDialog(QDialog, FirmwareDialog_Base):
QMessageBox.critical(self,
self.caption(),
error_text,
- QMessageBox.Ok |\
+ QMessageBox.Ok,
QMessageBox.NoButton,
QMessageBox.NoButton)
diff --git a/ui/makecopiesform.py b/ui/makecopiesform.py
index 0fbb573e3..27f144b36 100644
--- a/ui/makecopiesform.py
+++ b/ui/makecopiesform.py
@@ -156,7 +156,7 @@ class MakeCopiesForm(QMainWindow):
QMessageBox.critical(self,
self.caption(),
error_text,
- QMessageBox.Ok |\
+ QMessageBox.Ok,
QMessageBox.NoButton,
QMessageBox.NoButton)
@@ -164,7 +164,7 @@ class MakeCopiesForm(QMainWindow):
QMessageBox.warning(self,
self.caption(),
msg,
- QMessageBox.Ok |\
+ QMessageBox.Ok,
QMessageBox.NoButton,
QMessageBox.NoButton)
diff --git a/ui/nodevicesform.py b/ui/nodevicesform.py
index 57a696375..01f6ae53b 100644
--- a/ui/nodevicesform.py
+++ b/ui/nodevicesform.py
@@ -67,7 +67,7 @@ class NoDevicesForm(NoDevicesForm_base):
QMessageBox.critical(self,
self.caption(),
self.__tr("<b>An error occurred.</b><p>Please re-start the Device Manager and try again."),
- QMessageBox.Ok |\
+ QMessageBox.Ok,
QMessageBox.NoButton,
QMessageBox.NoButton)
diff --git a/ui/pluginform2.py b/ui/pluginform2.py
index 76cb0238b..64e64aa77 100644
--- a/ui/pluginform2.py
+++ b/ui/pluginform2.py
@@ -173,7 +173,7 @@ class PluginForm2(PluginForm2_base):
QMessageBox.critical(self,
self.caption(),
error_text,
- QMessageBox.Ok |\
+ QMessageBox.Ok,
QMessageBox.NoButton,
QMessageBox.NoButton)
@@ -181,7 +181,7 @@ class PluginForm2(PluginForm2_base):
QMessageBox.information(self,
self.caption(),
text,
- QMessageBox.Ok |\
+ QMessageBox.Ok,
QMessageBox.NoButton,
QMessageBox.NoButton)
diff --git a/ui/printerform.py b/ui/printerform.py
index 7c10ab07b..0c6c4f39e 100644
--- a/ui/printerform.py
+++ b/ui/printerform.py
@@ -154,7 +154,7 @@ class PrinterForm(QMainWindow):
QMessageBox.critical(self,
self.caption(),
error_text,
- QMessageBox.Ok |\
+ QMessageBox.Ok,
QMessageBox.NoButton,
QMessageBox.NoButton)
diff --git a/ui/settingsdialog.py b/ui/settingsdialog.py
index 24f02fd84..92da22546 100644
--- a/ui/settingsdialog.py
+++ b/ui/settingsdialog.py
@@ -146,7 +146,7 @@ class SettingsDialog(SettingsDialog_base):
## QMessageBox.warning(self,
## self.caption(),
## self.__tr("<b>One or more email addresses are missing.</b><p>Please enter this information and try again."),
-## QMessageBox.Ok |\
+## QMessageBox.Ok,
## QMessageBox.NoButton,
## QMessageBox.NoButton)
## return
@@ -163,7 +163,7 @@ class SettingsDialog(SettingsDialog_base):
## QMessageBox.information(self,
## self.caption(),
## self.__tr("<p><b>Please check your email for a test message.</b><p>If the message doesn't arrive, please check your settings and try again."),
-## QMessageBox.Ok |\
+## QMessageBox.Ok,
## QMessageBox.NoButton,
## QMessageBox.NoButton)
diff --git a/ui/setupform.py b/ui/setupform.py
index 78863fdd8..307917b02 100644
--- a/ui/setupform.py
+++ b/ui/setupform.py
@@ -602,7 +602,7 @@ class SetupForm(SetupForm_base):
if ( QMessageBox.warning(self,
self.caption(),
warn_text,
- QMessageBox.Yes |\
+ QMessageBox.Yes,
QMessageBox.No,
QMessageBox.NoButton) == QMessageBox.Yes ):
@@ -804,7 +804,7 @@ class SetupForm(SetupForm_base):
if QMessageBox.critical(self,
self.caption(),
error_text,
- QMessageBox.Retry | QMessageBox.Default |\
+ QMessageBox.Retry | QMessageBox.Default,
QMessageBox.Cancel | QMessageBox.Escape,
QMessageBox.NoButton) == QMessageBox.Cancel:
break
@@ -832,7 +832,7 @@ class SetupForm(SetupForm_base):
if QMessageBox.critical(self,
self.caption(),
error_text,
- QMessageBox.Retry | QMessageBox.Default |\
+ QMessageBox.Retry | QMessageBox.Default,
QMessageBox.Cancel | QMessageBox.Escape,
QMessageBox.NoButton) == QMessageBox.Cancel:
break
@@ -1003,7 +1003,7 @@ class SetupForm(SetupForm_base):
QMessageBox.critical(self,
self.caption(),
error_text,
- QMessageBox.Ok |\
+ QMessageBox.Ok,
QMessageBox.NoButton,
QMessageBox.NoButton)
@@ -1011,7 +1011,7 @@ class SetupForm(SetupForm_base):
QMessageBox.warning(self,
self.caption(),
error_text,
- QMessageBox.Ok |\
+ QMessageBox.Ok,
QMessageBox.NoButton,
QMessageBox.NoButton)
diff --git a/ui/unloadform.py b/ui/unloadform.py
index ae363e01e..8397a689c 100644
--- a/ui/unloadform.py
+++ b/ui/unloadform.py
@@ -135,7 +135,7 @@ class UnloadForm(QMainWindow):
QMessageBox.critical(self,
self.caption(),
error_text,
- QMessageBox.Ok |\
+ QMessageBox.Ok,
QMessageBox.NoButton,
QMessageBox.NoButton)
diff --git a/ui/upgradeform.py b/ui/upgradeform.py
index d0b418419..6b9acf5cc 100644
--- a/ui/upgradeform.py
+++ b/ui/upgradeform.py
@@ -118,7 +118,7 @@ class UpgradeForm(UpgradeForm_base):
QMessageBox.critical(self,
self.caption(),
error_text,
- QMessageBox.Ok |\
+ QMessageBox.Ok,
QMessageBox.NoButton,
QMessageBox.NoButton)
@@ -126,7 +126,7 @@ class UpgradeForm(UpgradeForm_base):
QMessageBox.information(self,
self.caption(),
text,
- QMessageBox.Ok |\
+ QMessageBox.Ok,
QMessageBox.NoButton,
QMessageBox.NoButton)
diff --git a/ui5/devmgr5.py b/ui5/devmgr5.py
index 9d4e82c58..495883f72 100644
--- a/ui5/devmgr5.py
+++ b/ui5/devmgr5.py
@@ -139,7 +139,8 @@ class PluginInstall(QObject):
install_plugin = QMessageBox.warning(self.parent,
self.parent.windowTitle(),
self.__tr("<b>The HPLIP plugin is already installed.</b><p>Do you want to continue and re-install it?"),
- QMessageBox.Yes | QMessageBox.No,
+ QMessageBox.Yes,
+ QMessageBox.No,
QMessageBox.NoButton) == QMessageBox.Yes
if install_plugin:
@@ -148,7 +149,8 @@ class PluginInstall(QObject):
QMessageBox.critical(self.parent,
self.parent.windowTitle(),
self.__tr("<b>Unable to find an appropriate su/sudo utility to run hp-plugin.</b><p>Install kdesu, gnomesu, or gksu.</p>"),
- QMessageBox.Ok | QMessageBox.NoButton,
+ QMessageBox.Ok,
+ QMessageBox.NoButton,
QMessageBox.NoButton)
@@ -319,11 +321,11 @@ class DevMgr5(Ui_MainWindow_Derived, Ui_MainWindow, QMainWindow):
self.PreferencesAction.setIcon(QIcon(load_pixmap('settings', '16x16')))
self.PreferencesAction.triggered.connect(self.PreferencesAction_activated)
- #self.DiagnoseQueueAction.setIcon(QIcon(load_pixmap('warning', '16x16')))
- #self.DiagnoseQueueAction.triggered.connect(self.DiagnoseQueueAction_activated)
+ self.DiagnoseQueueAction.setIcon(QIcon(load_pixmap('warning', '16x16')))
+ self.DiagnoseQueueAction.triggered.connect(self.DiagnoseQueueAction_activated)
- #self.DiagnoseHPLIPAction.setIcon(QIcon(load_pixmap('troubleshoot', '16x16')))
- #self.DiagnoseHPLIPAction.triggered.connect(self.DiagnoseHPLIP_activated)
+ self.DiagnoseHPLIPAction.setIcon(QIcon(load_pixmap('troubleshoot', '16x16')))
+ self.DiagnoseHPLIPAction.triggered.connect(self.DiagnoseHPLIP_activated)
self.ContentsAction.setIcon(QIcon(load_pixmap("help", "16x16")))
self.ContentsAction.triggered.connect(self.helpContents)
diff --git a/ui5/devmgr5_base.ui b/ui5/devmgr5_base.ui
index 09f72bf83..7d0c7f53e 100644
--- a/ui5/devmgr5_base.ui
+++ b/ui5/devmgr5_base.ui
@@ -547,6 +547,37 @@
</item>
</layout>
</widget>
+ <widget class="QWidget" name="tab_3">
+ <attribute name="title">
+ <string>Page</string>
+ </attribute>
+ <widget class="QPushButton" name="pushButton">
+ <property name="geometry">
+ <rect>
+ <x>280</x>
+ <y>40</y>
+ <width>96</width>
+ <height>27</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Install now</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="label">
+ <property name="geometry">
+ <rect>
+ <x>30</x>
+ <y>45</y>
+ <width>251</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>New version of HPLIP-x.x.x is available</string>
+ </property>
+ </widget>
+ </widget>
</widget>
</widget>
</item>
diff --git a/ui5/fabwindow.py b/ui5/fabwindow.py
index 0b95c94f1..488b6bbd5 100644
--- a/ui5/fabwindow.py
+++ b/ui5/fabwindow.py
@@ -344,7 +344,7 @@ class FABWindow(QMainWindow, Ui_MainWindow):
new_name = to_unicode(self.NameLineEdit.text())
if new_name != self.name:
if QMessageBox.question(self, self.__tr("Rename?"), "Rename '%s' to '%s'?"%(self.name,new_name), \
- QMessageBox.Yes | QMessageBox.No, QMessageBox.No) == QMessageBox.Yes:
+ QMessageBox.Yes | QMessageBox.No) == QMessageBox.Yes:
self.db.rename(self.name, new_name)
log.debug("Rename %s to %s" % (self.name, new_name))
diff --git a/ui5/nodevicesdialog.py b/ui5/nodevicesdialog.py
index ca86bfcda..6083f6d4b 100644
--- a/ui5/nodevicesdialog.py
+++ b/ui5/nodevicesdialog.py
@@ -64,7 +64,8 @@ class NoDevicesDialog(QDialog, Ui_NoDevicesDialog_base):
QMessageBox.critical(self,
self.windowTitle(),
self.__tr("<b>An error occurred.</b><p>Please re-start the Device Manager and try again."),
- QMessageBox.Ok | QMessageBox.NoButton,
+ QMessageBox.Ok,
+ QMessageBox.NoButton,
QMessageBox.NoButton)
diff --git a/ui5/plugindialog.py b/ui5/plugindialog.py
index 1c6b33868..e3007f911 100644
--- a/ui5/plugindialog.py
+++ b/ui5/plugindialog.py
@@ -252,7 +252,7 @@ class PluginDialog(QDialog, Ui_Dialog):
if QMessageBox.question(self, " ",
self.__tr("<b>%s</b><p>Without this, it is not possible to authenticate and validate the plug-in prior to installation.</p>Do you still want to install the plug-in?" %error_str),
- QMessageBox.Yes | QMessageBox.No, QMessageBox.No) != QMessageBox.Yes:
+ QMessageBox.Yes | QMessageBox.No) != QMessageBox.Yes:
self.pluginObj.deleteInstallationFiles(download_plugin_file)
self.close()
diff --git a/ui5/queuesconf.py b/ui5/queuesconf.py
index e3c2a0278..cf2206490 100644
--- a/ui5/queuesconf.py
+++ b/ui5/queuesconf.py
@@ -245,7 +245,7 @@ class QueuesDiagnose(QDialog, Ui_Dialog):
if QMessageBox.question(self, " ",
self.__tr("<b>%s</b><p>Without this, it is not possible to authenticate and validate this tool prior to installation.</p>Do you still want to run Smart Install disabler?" %error_str),
- QMessageBox.Yes | QMessageBox.No, QMessageBox.No) == QMessageBox.Yes:
+ QMessageBox.Yes | QMessageBox.No) == QMessageBox.Yes:
# Disabling without verification.
sts, out = utils.run("sh %s"%smart_install_run)
diff --git a/ui5/setupdialog.py b/ui5/setupdialog.py
index 120ee1587..fbfe5ac9b 100644
--- a/ui5/setupdialog.py
+++ b/ui5/setupdialog.py
@@ -873,7 +873,7 @@ class SetupDialog(QDialog, Ui_Dialog):
self.windowTitle(),
warn_text,
QMessageBox.Yes|\
- QMessageBox.No,
+ QMessageBox.No|\
QMessageBox.NoButton) == QMessageBox.Yes ):
i = 2
while True:
@@ -1108,7 +1108,7 @@ class SetupDialog(QDialog, Ui_Dialog):
if QMessageBox.critical(self,
self.windowTitle(),
error_text,
- QMessageBox.Retry | QMessageBox.Default |\
+ QMessageBox.Retry | QMessageBox.Default,
QMessageBox.Cancel | QMessageBox.Escape,
QMessageBox.NoButton) == QMessageBox.Cancel:
break
@@ -1138,7 +1138,7 @@ class SetupDialog(QDialog, Ui_Dialog):
if QMessageBox.critical(self,
self.windowTitle(),
error_text,
- QMessageBox.Retry | QMessageBox.Default |\
+ QMessageBox.Retry | QMessageBox.Default,
QMessageBox.Cancel | QMessageBox.Escape,
QMessageBox.NoButton) == QMessageBox.Cancel:
break
diff --git a/ui5/systemtray.py b/ui5/systemtray.py
index ec3574f1b..5b69d2be9 100644
--- a/ui5/systemtray.py
+++ b/ui5/systemtray.py
@@ -442,13 +442,30 @@ class SystemTrayApp(QApplication):
def setMenu(self):
self.menu = QMenu()
- title = QAction(self.menu)
+ title = QWidgetAction(self.menu)
#title.setDisabled(True)
+ hbox = QFrame(self.menu)
+ layout = QHBoxLayout(hbox)
+ # layout.setMargin(3)
+ layout.setContentsMargins(3, 3, 3, 3)
+ layout.setSpacing(5)
+ pix_label = QLabel(hbox)
- title.setText(self.__tr("HPLIP Status Service"))
- title.setIcon(self.prop_icon)
- title.setIconVisibleInMenu(True)
+ layout.insertWidget(-1, pix_label, 0)
+
+ icon_size = self.menu.style().pixelMetric(QStyle.PM_SmallIconSize)
+ pix_label.setPixmap(self.prop_icon.pixmap(icon_size))
+
+ label = QLabel(hbox)
+ layout.insertWidget(-1, label, 20)
+ title.setDefaultWidget(hbox)
+
+ label.setText(self.__tr("HPLIP Status Service"))
+
+ f = label.font()
+ f.setBold(True)
+ label.setFont(f)
self.menu.insertAction(None, title)
if devices:
@@ -576,9 +593,6 @@ class SystemTrayApp(QApplication):
elif reason == QSystemTrayIcon.Trigger:
#print "single click"
- self.updateMenu()
- if not self.menu is None:
- self.menu.popup(QCursor.pos())
pass
elif reason == QSystemTrayIcon.MiddleClick:
diff --git a/ui5/ui_utils.py b/ui5/ui_utils.py
index 865d6eb2b..caba33910 100644
--- a/ui5/ui_utils.py
+++ b/ui5/ui_utils.py
@@ -205,7 +205,7 @@ class UserSettings(QSettings):
return ''
def loadDefaults(self):
- self.cmd_scan = self.__setup(['simple-scan %SANE_URI%', 'xsane -V %SANE_URI%', 'kooka', 'xscanimage'])
+ self.cmd_scan = self.__setup(['xsane -V %SANE_URI%', 'kooka', 'xscanimage'])
self.cmd_fab = self.__setup(['hp-fab'])
diff --git a/ui5/wifisetupdialog_base.ui b/ui5/wifisetupdialog_base.ui
index 4e336404a..a85d14c3d 100644
--- a/ui5/wifisetupdialog_base.ui
+++ b/ui5/wifisetupdialog_base.ui
@@ -47,7 +47,7 @@
</widget>
</item>
<item row="2" column="0" colspan="3">
- <widget class="QLabel" name="MainTitleLabel">
+ <widget class="QLabel" name="label_2">
<property name="text">
<string>&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
diff --git a/unload.py b/unload.py
index ce8b069c9..3fdd5a381 100755
--- a/unload.py
+++ b/unload.py
@@ -44,11 +44,6 @@ except ImportError:
# Local
from base.g import *
-from base.sixext import PY3
-if PY3:
- log.error("This functionality is not spported in python3 environment.")
- sys.exit(1)
-
from base import device, utils, tui, module
from prnt import cups