Compare commits
No commits in common. 'i8c' and 'c9' have entirely different histories.
@ -1 +1,3 @@
|
||||
SOURCES/hplip-3.18.4.tar.gz
|
||||
SOURCES/hp-laserjet_cp_1025nw.ppd.gz
|
||||
SOURCES/hp-laserjet_professional_p_1102w.ppd.gz
|
||||
SOURCES/hplip-3.21.2-repack.tar.gz
|
||||
|
@ -1 +1,3 @@
|
||||
ecffcd8287f1bc1491b47e25377ca5d086250798 SOURCES/hplip-3.18.4.tar.gz
|
||||
ab5f8109daf6ec9ccc9571a1155e2438d581e096 SOURCES/hp-laserjet_cp_1025nw.ppd.gz
|
||||
653b9a1d89a5aecedc8a9a66835ac060d995dfa2 SOURCES/hp-laserjet_professional_p_1102w.ppd.gz
|
||||
6523daf5be0a41a0b40a24cf54ca5e03bcefd9ba SOURCES/hplip-3.21.2-repack.tar.gz
|
||||
|
@ -0,0 +1,112 @@
|
||||
diff -up hplip-3.21.2/Makefile.am.libimageprocessor-removal hplip-3.21.2/Makefile.am
|
||||
--- hplip-3.21.2/Makefile.am.libimageprocessor-removal 2021-02-24 12:38:31.707900421 +0100
|
||||
+++ hplip-3.21.2/Makefile.am 2021-02-24 12:38:31.735900172 +0100
|
||||
@@ -167,7 +167,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
|
||||
@@ -595,7 +595,7 @@ hpcups_SOURCES = prnt/hpcups/HPCupsFilte
|
||||
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
|
||||
@@ -685,16 +685,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 -up hplip-3.21.2/prnt/hpcups/HPCupsFilter.cpp.libimageprocessor-removal hplip-3.21.2/prnt/hpcups/HPCupsFilter.cpp
|
||||
--- hplip-3.21.2/prnt/hpcups/HPCupsFilter.cpp.libimageprocessor-removal 2021-02-24 12:38:31.701900474 +0100
|
||||
+++ hplip-3.21.2/prnt/hpcups/HPCupsFilter.cpp 2021-02-24 12:42:49.445720549 +0100
|
||||
@@ -31,7 +31,6 @@
|
||||
\*****************************************************************************/
|
||||
|
||||
#include "HPCupsFilter.h"
|
||||
-#include "ImageProcessor.h"
|
||||
|
||||
#include <signal.h>
|
||||
#include <sys/wait.h>
|
||||
@@ -659,21 +658,8 @@ int HPCupsFilter::processRasterData(cups
|
||||
|
||||
snprintf(hpPreProcessedRasterFile, sizeof (hpPreProcessedRasterFile), "%s/hp_%s_cups_SwapedPagesXXXXXX",CUPS_TMP_DIR, m_JA.user_name);
|
||||
|
||||
- image_processor_t* imageProcessor=NULL;
|
||||
- IMAGE_PROCESSOR_ERROR result;
|
||||
- //added if condition to check if pinter language is "ljzjstream"
|
||||
- //If so, then bypass imageprocessing functions while running HPCUPS filter.
|
||||
- if(strncmp(m_JA.printer_platform, "ljzjstream",10) == 0){
|
||||
- imageProcessor = imageProcessorCreate();
|
||||
- }
|
||||
while (cupsRasterReadHeader2(cups_raster, &cups_header))
|
||||
{
|
||||
- if(strncmp(m_JA.printer_platform, "ljzjstream",10) == 0){
|
||||
- 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) {
|
||||
@@ -772,14 +758,6 @@ int HPCupsFilter::processRasterData(cups
|
||||
color_raster = rgbRaster;
|
||||
black_raster = kRaster;
|
||||
|
||||
- if(strncmp(m_JA.printer_platform, "ljzjstream",10) == 0)
|
||||
- {
|
||||
- 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
|
||||
@@ -809,14 +787,6 @@ int HPCupsFilter::processRasterData(cups
|
||||
}
|
||||
} // for() loop end
|
||||
|
||||
- if(strncmp(m_JA.printer_platform, "ljzjstream",10) == 0)
|
||||
- {
|
||||
- result = imageProcessorEndPage(imageProcessor);
|
||||
- if (result != IPE_SUCCESS){
|
||||
- dbglog("DEBUG: imageProcessorEndPage failed result = %d\n", result);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
m_Job.NewPage();
|
||||
if (err != NO_ERROR) {
|
||||
break;
|
||||
@@ -832,10 +802,6 @@ int HPCupsFilter::processRasterData(cups
|
||||
}
|
||||
|
||||
|
||||
- if(strncmp(m_JA.printer_platform, "ljzjstream",10) == 0)
|
||||
- {
|
||||
- imageProcessorDestroy(imageProcessor);
|
||||
- }
|
||||
unlink(hpPreProcessedRasterFile);
|
||||
return ret_status;
|
||||
}
|
@ -0,0 +1,473 @@
|
||||
From 95a73bbc9bd65602a0f9411469ab511bc80a01d0 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
|
@ -0,0 +1,41 @@
|
||||
From ae211a3fcfb1b827f0ec35d61f28d6b539028812 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)
|
@ -0,0 +1,31 @@
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 976a42c..3604dd7 100755
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -558,6 +558,9 @@ else: # INTERACTIVE_MODE
|
||||
|
||||
if file_path.endswith('.gz'):
|
||||
nickname = gzip.GzipFile(file_path, 'r').read(4096)
|
||||
+ if sys.version_info[0] > 2:
|
||||
+ nickname = nickname.decode('utf-8')
|
||||
+
|
||||
else:
|
||||
nickname = open(file_path, 'r').read(4096)
|
||||
|
||||
diff --git a/ui5/setupdialog.py b/ui5/setupdialog.py
|
||||
index ac45357..a6dacf0 100644
|
||||
--- a/ui5/setupdialog.py
|
||||
+++ b/ui5/setupdialog.py
|
||||
@@ -772,9 +772,9 @@ class SetupDialog(QDialog, Ui_Dialog):
|
||||
|
||||
|
||||
def OtherPPDButton_clicked(self, b):
|
||||
- ppd_file = to_unicode(QFileDialog.getOpenFileName(self, self.__tr("Select PPD File"),
|
||||
- sys_conf.get('dirs', 'ppd'),
|
||||
- self.__tr("PPD Files (*.ppd *.ppd.gz);;All Files (*)")))
|
||||
+ ppd_file = QFileDialog.getOpenFileName(self, self.__tr("Select PPD File"),
|
||||
+ sys_conf.get('dirs', 'ppd'),
|
||||
+ self.__tr("PPD Files (*.ppd *.ppd.gz);;All Files (*)"))[0]
|
||||
|
||||
if ppd_file and os.path.exists(ppd_file):
|
||||
self.print_ppd = (ppd_file, cups.getPPDDescription(ppd_file))
|
@ -0,0 +1,33 @@
|
||||
diff --git a/base/password.py b/base/password.py
|
||||
index bd68f2a..bff9f80 100644
|
||||
--- a/base/password.py
|
||||
+++ b/base/password.py
|
||||
@@ -157,6 +157,28 @@ class Password(object):
|
||||
log.warn("%s distro is not found in AUTH_TYPES" % distro_name)
|
||||
self.__authType = 'su'
|
||||
|
||||
+ # check if caller is in wheel group - use 'su' if he isnt -
|
||||
+ # or if the caller is root (just for showing 'root' username)
|
||||
+ # in the prompt
|
||||
+ import os
|
||||
+ from grp import getgrnam
|
||||
+
|
||||
+ user = os.getenv('USER')
|
||||
+
|
||||
+ try:
|
||||
+ members = getgrnam('wheel').gr_mem
|
||||
+ except KeyError:
|
||||
+ try:
|
||||
+ members = getgrnam('sudo').gr_mem
|
||||
+ except:
|
||||
+ return
|
||||
+
|
||||
+ if user in members:
|
||||
+ self.__authType = 'sudo'
|
||||
+ else:
|
||||
+ self.__authType = 'su'
|
||||
+
|
||||
+
|
||||
def __getPasswordDisplayString(self):
|
||||
if self.__authType == "su":
|
||||
return "Please enter the root/superuser password: "
|
@ -0,0 +1,44 @@
|
||||
diff --git a/base/device.py b/base/device.py
|
||||
index 6d7add9..bf27307 100644
|
||||
--- a/base/device.py
|
||||
+++ b/base/device.py
|
||||
@@ -2264,7 +2264,8 @@ class Device(object):
|
||||
self.callback()
|
||||
|
||||
if total_bytes_to_write != bytes_out:
|
||||
- raise Error(ERROR_DEVICE_IO_ERROR)
|
||||
+ raise Error(ERROR_DEVICE_IO_ERROR, 'Number of written '
|
||||
+ 'bytes by hpmudext mismatch with expected amount.')
|
||||
|
||||
return bytes_out
|
||||
|
||||
diff --git a/base/g.py b/base/g.py
|
||||
index 9856662..0aa0e2e 100644
|
||||
--- a/base/g.py
|
||||
+++ b/base/g.py
|
||||
@@ -398,9 +398,11 @@ ERROR_STRINGS = {
|
||||
|
||||
|
||||
class Error(Exception):
|
||||
- def __init__(self, opt=ERROR_INTERNAL):
|
||||
+ def __init__(self, opt=ERROR_INTERNAL, msg=None):
|
||||
self.opt = opt
|
||||
self.msg = ERROR_STRINGS.get(opt, ERROR_STRINGS[ERROR_INTERNAL])
|
||||
+ if msg:
|
||||
+ self.msg = '{} - {}'.format(self.msg, msg)
|
||||
log.debug("Exception: %d (%s)" % (opt, self.msg))
|
||||
Exception.__init__(self, self.msg, opt)
|
||||
|
||||
diff --git a/prnt/ldl.py b/prnt/ldl.py
|
||||
index e3f77f7..8b28e7f 100644
|
||||
--- a/prnt/ldl.py
|
||||
+++ b/prnt/ldl.py
|
||||
@@ -145,7 +145,7 @@ def buildLIDILPacket(packet_type, command=0, operation=0, other={}):
|
||||
p = '$\x00\x10\x00\x08\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff$'
|
||||
|
||||
elif packet_type == PACKET_TYPE_RESET_LIDIL:
|
||||
- p = '$\x00\x10\x00\x06\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff$'
|
||||
+ p = b'$\x00\x10\x00\x06\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff$'
|
||||
|
||||
elif packet_type == PACKET_TYPE_COMMAND:
|
||||
|
@ -1,63 +0,0 @@
|
||||
diff -up hplip-3.17.11/data/models/models.dat.colorlaserjet-mfp-m278-m281 hplip-3.17.11/data/models/models.dat
|
||||
--- hplip-3.17.11/data/models/models.dat.colorlaserjet-mfp-m278-m281 2017-11-23 13:10:17.000000000 +0100
|
||||
+++ hplip-3.17.11/data/models/models.dat 2018-01-19 08:24:21.554788787 +0100
|
||||
@@ -58516,6 +58516,59 @@ usb-pid=3c2a
|
||||
usb-vid=3f0
|
||||
wifi-config=3
|
||||
|
||||
+[colorlaserjet_mfp_m278-m281]
|
||||
+align-type=0
|
||||
+clean-type=0
|
||||
+color-cal-type=0
|
||||
+copy-type=0
|
||||
+embedded-server-type=1
|
||||
+fax-type=7
|
||||
+fw-download=False
|
||||
+icon=hp_color_laserjet_cm1312_mfp.png
|
||||
+io-mfp-mode=1
|
||||
+io-mode=1
|
||||
+io-support=14
|
||||
+job-storage=0
|
||||
+linefeed-cal-type=0
|
||||
+model1=HP Color LaserJet MFP M278-281
|
||||
+monitor-type=0
|
||||
+panel-check-type=0
|
||||
+pcard-type=0
|
||||
+plugin=1
|
||||
+plugin-reason=64
|
||||
+power-settings=0
|
||||
+ppd-name=hp-color_laserjet_pro_mfp_m277
|
||||
+pq-diag-type=0
|
||||
+r-type=0
|
||||
+r0-agent1-kind=4
|
||||
+r0-agent1-sku=CF400A/CF400X
|
||||
+r0-agent1-type=1
|
||||
+r0-agent2-kind=4
|
||||
+r0-agent2-sku=CF401A
|
||||
+r0-agent2-type=4
|
||||
+r0-agent3-kind=4
|
||||
+r0-agent3-sku=CF403A
|
||||
+r0-agent3-type=5
|
||||
+r0-agent4-kind=4
|
||||
+r0-agent4-sku=CF402A
|
||||
+r0-agent4-type=6
|
||||
+scan-src=3
|
||||
+scan-type=5
|
||||
+status-battery-check=0
|
||||
+status-dynamic-counters=0
|
||||
+status-type=10
|
||||
+support-released=True
|
||||
+support-subtype=48c3
|
||||
+support-type=2
|
||||
+support-ver=3.15.4
|
||||
+tech-class=Postscript
|
||||
+family-class=Undefined
|
||||
+tech-subclass=Normal
|
||||
+tech-type=4
|
||||
+usb-pid=3c2a
|
||||
+usb-vid=3f0
|
||||
+wifi-config=3
|
||||
+
|
||||
[hp_color_laserjet_m553]
|
||||
align-type=0
|
||||
clean-type=0
|
@ -0,0 +1,52 @@
|
||||
diff -up hplip-3.20.9/configure.in.configure-python hplip-3.20.9/configure.in
|
||||
--- hplip-3.20.9/configure.in.configure-python 2020-09-23 07:24:27.000000000 +0200
|
||||
+++ hplip-3.20.9/configure.in 2020-10-02 07:27:09.082331431 +0200
|
||||
@@ -604,17 +604,29 @@ if test "$class_driver" = "no" && test "
|
||||
fi
|
||||
fi
|
||||
|
||||
-SAVE_CPPFLAGS="$CPPFLAGS"
|
||||
-CFLAGS=`python-config --includes`
|
||||
-if [ $? -eq 0 ]
|
||||
-then
|
||||
- echo $FLAGS
|
||||
-else
|
||||
-CFLAGS=`python3-config --includes`
|
||||
- if [ $? -eq 0 ]
|
||||
- then
|
||||
- echo $FLAGS
|
||||
- fi
|
||||
+AC_PATH_PROG(python3_config_path, python3-config, [AC_MSG_ERROR([python3-config not installed], 6)])
|
||||
+
|
||||
+PYTHON_INCLUDES=`$python3_config_path --includes`
|
||||
+if test "X$PYTHON_INCLUDES" = "X" ; then
|
||||
+ AC_MSG_ERROR([Cannot get Python includes via python3-config], 6)
|
||||
+fi
|
||||
+
|
||||
+PYTHON_LIBS=`$python3_config_path --libs`
|
||||
+if test "X$PYTHON_LIBS" = "X" ; then
|
||||
+ AC_MSG_ERROR([Cannot get Python libs via python3-config], 6)
|
||||
+fi
|
||||
+
|
||||
+SAVE_CFLAGS=$CFLAGS
|
||||
+SAVE_LIBS=$LIBS
|
||||
+
|
||||
+CFLAGS="$CFLAGS $PYTHON_INCLUDES"
|
||||
+LIBS="$LIBS $PYTHON_LIBS"
|
||||
+
|
||||
+AC_TRY_LINK(,[ ], AC_MSG_RESULT(yes); python_includes="ok", AC_MSG_ERROR([no: PYTHON DISABLED], 6))
|
||||
+
|
||||
+if test "X$python_includes" != "Xok" ; then
|
||||
+ CFLAGS="$SAVE_CFLAGS"
|
||||
+ LIBS="$SAVE_LIBS"
|
||||
fi
|
||||
|
||||
#CFLAGS=`(python-config --includes)`
|
||||
@@ -631,7 +643,6 @@ if test "$class_driver" = "no" && test "
|
||||
AS_IF([test "x$FOUND_HEADER" != "xyes"],
|
||||
[AC_MSG_ERROR([cannot find python-devel support], 6)])
|
||||
fi
|
||||
-CFLAGS="$save_CFLAGS"
|
||||
|
||||
if test "$hpijs_only_build" = "no" && test "$scan_build" = "yes" && test "$hpcups_only_build" = "no"; then
|
||||
AC_CHECK_LIB([sane], [sane_open], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find sane-backends-devel support (or --disable-scan-build)], 12)])
|
@ -0,0 +1,34 @@
|
||||
diff --git a/ui5/devmgr5.py b/ui5/devmgr5.py
|
||||
index c23957a..48b248f 100644
|
||||
--- a/ui5/devmgr5.py
|
||||
+++ b/ui5/devmgr5.py
|
||||
@@ -2247,7 +2247,7 @@ class PasswordDialog(QDialog):
|
||||
self.prompt = prompt
|
||||
|
||||
Layout= QGridLayout(self)
|
||||
- Layout.setMargin(11)
|
||||
+ Layout.setContentsMargins(11, 11, 11, 11)
|
||||
Layout.setSpacing(6)
|
||||
|
||||
self.PromptTextLabel = QLabel(self)
|
||||
@@ -2300,14 +2300,15 @@ class PasswordDialog(QDialog):
|
||||
# XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||
|
||||
def showPasswordUI(prompt):
|
||||
+ dlg = None
|
||||
+
|
||||
try:
|
||||
dlg = PasswordDialog(prompt, None)
|
||||
+ except Exception as e:
|
||||
+ log.error('Unable to open password dialog due following error:\n {}'.format(e))
|
||||
|
||||
- if dlg.exec_() == QDialog.Accepted:
|
||||
- return (dlg.getUsername(), dlg.getPassword())
|
||||
-
|
||||
- finally:
|
||||
- pass
|
||||
+ if dlg and dlg.exec_() == QDialog.Accepted:
|
||||
+ return (dlg.getUsername(), dlg.getPassword())
|
||||
|
||||
return ("", "")
|
||||
|
@ -0,0 +1,78 @@
|
||||
commit 4c913b68d8f8a79e11e247a8f7086f779f2685d4
|
||||
Author: Tomas Korbar <tkorbar@redhat.com>
|
||||
Date: Tue Sep 18 16:17:06 2018 +0200
|
||||
|
||||
Fix TypeError
|
||||
|
||||
- 1564770 - TypeError: 'Error' object does not support indexing
|
||||
|
||||
diff --git a/clean.py b/clean.py
|
||||
index 3d41f04..3a7248e 100755
|
||||
--- a/clean.py
|
||||
+++ b/clean.py
|
||||
@@ -182,7 +182,7 @@ try:
|
||||
log.error("Cleaning not needed or supported on this device.")
|
||||
|
||||
except Error as e:
|
||||
- log.error("An error occured: %s" % e[0])
|
||||
+ log.error("An error occured: %s" % e.msg)
|
||||
|
||||
else:
|
||||
log.error("Device is busy or in an error state. Please check device and try again.")
|
||||
diff --git a/ui/scrollunload.py b/ui/scrollunload.py
|
||||
index fdb48e8..345ed82 100644
|
||||
--- a/ui/scrollunload.py
|
||||
+++ b/ui/scrollunload.py
|
||||
@@ -120,7 +120,7 @@ class ScrollUnloadView(ScrollView):
|
||||
self.pc = photocard.PhotoCard(None, self.cur_device.device_uri, self.cur_printer)
|
||||
except Error as e:
|
||||
QApplication.restoreOverrideCursor()
|
||||
- self.form.FailureUI(self.__tr("An error occured: %s" % e[0]))
|
||||
+ self.form.FailureUI(self.__tr("An error occured: %s" % e.msg))
|
||||
self.cleanup(EVENT_PCARD_UNABLE_TO_MOUNT)
|
||||
return False
|
||||
|
||||
diff --git a/ui4/wifisetupdialog.py b/ui4/wifisetupdialog.py
|
||||
index 9fd1786..4d36f83 100644
|
||||
--- a/ui4/wifisetupdialog.py
|
||||
+++ b/ui4/wifisetupdialog.py
|
||||
@@ -256,7 +256,7 @@ class WifiSetupDialog(QDialog, Ui_Dialog):
|
||||
try:
|
||||
self.dev = device.Device(self.device_uri)
|
||||
except Error as e:
|
||||
- FailureUI(self, self.__tr("<b>Error opening device:</b><p>%s</p><p>(%s)</p>") %(self.device_uri, QString(e[0])))
|
||||
+ FailureUI(self, self.__tr("<b>Error opening device:</b><p>%s</p><p>(%s)</p>") %(self.device_uri, QString(e.msg)))
|
||||
|
||||
if self.dev is not None:
|
||||
self.dev.close()
|
||||
@@ -834,7 +834,7 @@ class WifiSetupDialog(QDialog, Ui_Dialog):
|
||||
|
||||
|
||||
def showIOError(self, e):
|
||||
- FailureUI(self, self.__tr("<b>An I/O error occurred.</b><p>Please check the USB connection to your printer and try again.</p>(%s)" % QString(e[0])))
|
||||
+ FailureUI(self, self.__tr("<b>An I/O error occurred.</b><p>Please check the USB connection to your printer and try again.</p>(%s)" % QString(e.msg)))
|
||||
|
||||
if self.dev is not None:
|
||||
self.dev.close()
|
||||
diff --git a/ui5/wifisetupdialog.py b/ui5/wifisetupdialog.py
|
||||
index e0c7aee..74cc0ef 100644
|
||||
--- a/ui5/wifisetupdialog.py
|
||||
+++ b/ui5/wifisetupdialog.py
|
||||
@@ -259,7 +259,7 @@ class WifiSetupDialog(QDialog, Ui_Dialog):
|
||||
try:
|
||||
self.dev = device.Device(self.device_uri)
|
||||
except Error as e:
|
||||
- FailureUI(self, self.__tr("<b>Error opening device:</b><p>%s</p><p>(%s)</p>") %(self.device_uri, str(e[0])))
|
||||
+ FailureUI(self, self.__tr("<b>Error opening device:</b><p>%s</p><p>(%s)</p>") %(self.device_uri, str(e.msg)))
|
||||
|
||||
if self.dev is not None:
|
||||
self.dev.close()
|
||||
@@ -840,7 +840,7 @@ class WifiSetupDialog(QDialog, Ui_Dialog):
|
||||
|
||||
|
||||
def showIOError(self, e):
|
||||
- FailureUI(self, self.__tr("<b>An I/O error occurred.</b><p>Please check the USB connection to your printer and try again.</p>(%s)" % str(e[0])))
|
||||
+ FailureUI(self, self.__tr("<b>An I/O error occurred.</b><p>Please check the USB connection to your printer and try again.</p>(%s)" % str(e.msg)))
|
||||
|
||||
if self.dev is not None:
|
||||
self.dev.close()
|
@ -0,0 +1,13 @@
|
||||
diff --git a/ui5/fabwindow.py b/ui5/fabwindow.py
|
||||
index 0b95c94..631727c 100644
|
||||
--- a/ui5/fabwindow.py
|
||||
+++ b/ui5/fabwindow.py
|
||||
@@ -518,7 +518,7 @@ class FABWindow(QMainWindow, Ui_MainWindow):
|
||||
self.__tr("Import fax addresses from LDIF or vCard"),
|
||||
#user_conf.workingDirectory(),
|
||||
self.user_settings.working_dir,
|
||||
- "vCard (*.vcf);;LDIF (*.ldif *.ldi)"))
|
||||
+ "vCard (*.vcf);;LDIF (*.ldif *.ldi)")[0])
|
||||
|
||||
if result:
|
||||
working_directory = to_unicode(os.path.dirname(result))
|
@ -0,0 +1,163 @@
|
||||
diff --git a/prnt/cups.py b/prnt/cups.py
|
||||
index a9f410a..3783a60 100644
|
||||
--- a/prnt/cups.py
|
||||
+++ b/prnt/cups.py
|
||||
@@ -489,78 +489,77 @@ def getPPDFile2(mq,model, ppds): # New PPD find
|
||||
#Check if common ppd name is already given in models.dat(This is needed because in case of devices having more than one derivatives
|
||||
#will have diffrent model name strings in device ID, because of which we don't get the common ppd name for search)
|
||||
family_check=isfamilydrv(ppds)
|
||||
- family_class=getFamilyClassName(model)
|
||||
+
|
||||
model = models.normalizeModelName(model)
|
||||
- if family_check==0:
|
||||
- ppd_name = mq.get('ppd-name',0)
|
||||
- else:
|
||||
- ppd_name = mq.get('family-ppd',0)
|
||||
|
||||
- if ppd_name == 0:
|
||||
- stripped_model = stripModel2(model)
|
||||
- else:
|
||||
- stripped_model = stripModel2(ppd_name)
|
||||
+ ppd_name = mq.get('{}'.format('family-ppd' if family_check else 'ppd-name'), 0)
|
||||
+
|
||||
+ stripped_model = stripModel2(ppd_name) if ppd_name else stripModel2(model)
|
||||
+
|
||||
+ wanted_model = getFamilyClassName(model) if family_check else stripped_model
|
||||
|
||||
log.debug("Matching PPD list to model %s..." % stripped_model)
|
||||
|
||||
matches = []
|
||||
- if family_check ==0 :
|
||||
- for f in ppds:
|
||||
- match = ppd_pat.match(f)
|
||||
- if match is not None:
|
||||
- if match.group(1) == stripped_model:
|
||||
- log.debug("Found match: %s" % f)
|
||||
- try:
|
||||
- pdls = match.group(2).split('-')
|
||||
- except AttributeError:
|
||||
- pdls = []
|
||||
- if (prop.hpcups_build and 'hpijs' not in f) or \
|
||||
- ((prop.hpijs_build and 'hpijs' in pdls) or (prop.hpcups_build and 'hpijs' not in pdls)) or \
|
||||
- ('ps' in pdls) or ('pdf' in pdls):
|
||||
- matches.append((f, [p for p in pdls if p and p != 'hpijs']))
|
||||
- else:
|
||||
- for f in ppds:
|
||||
- match = ppd_pat1.match(f)
|
||||
- if match is not None:
|
||||
- if match.group(1) == family_class:
|
||||
- log.debug("Found match: %s" % f)
|
||||
- try:
|
||||
- pdls = match.group(2).split('-')
|
||||
- except AttributeError:
|
||||
- pdls = []
|
||||
- if (prop.hpcups_build and 'hpijs' not in f) or \
|
||||
- ((prop.hpijs_build and 'hpijs' in pdls) or (prop.hpcups_build and 'hpijs' not in pdls)) or \
|
||||
- ('ps' in pdls) or ('pdf' in pdls):
|
||||
- matches.append((f, [p for p in pdls if p and p != 'hpijs']))
|
||||
- log.debug(matches)
|
||||
- num_matches = len(matches)
|
||||
+ for f in ppds:
|
||||
+ # ignore foomatic and gutenprint drivers
|
||||
+ if 'foomatic' in f or 'gutenprint' in f:
|
||||
+ continue
|
||||
+
|
||||
+ # see if driver type is in driver name
|
||||
+ driver_types = []
|
||||
+ if 'hpcups' in f:
|
||||
+ driver_types.append('hpcups')
|
||||
+ if 'hpijs' in f:
|
||||
+ driver_types.append('hpijs')
|
||||
+
|
||||
+
|
||||
+ ppd_filename = f.rsplit('/', 1)[1].split('.')[0].replace('hp-', '')
|
||||
+
|
||||
+ if not ppd_filename:
|
||||
+ continue
|
||||
+
|
||||
+ # we need to sanitize the end of filename - there can be a driver type (-hpijs, -hpcups),
|
||||
+ # pdl name (-zjstream, -pdf, -ps etc.) or the device can just have '-' in their name
|
||||
+ # (HP Photosmart Premium C309g-m).
|
||||
+ # So if we don't know the name after '-', take it as part of device name.
|
||||
+ # If we know them either like driver type of PDL, remove the string from ppd name
|
||||
+ # so we can compare it with stripped model
|
||||
+ pdl_candidates = []
|
||||
+ pdl_candidates = ppd_filename.split('-')[1:]
|
||||
+
|
||||
+ pdls = []
|
||||
+ ppd_model = ppd_filename
|
||||
+
|
||||
+ for pdl in pdl_candidates:
|
||||
+ if pdl in ['hpijs', 'hpcups']:
|
||||
+ ppd_model=ppd_model.replace('-{}'.format(pdl), '')
|
||||
+ continue
|
||||
|
||||
- if num_matches == 0:
|
||||
- log.debug("No PPD found for model %s using new algorithm. Trying old algorithm..." % stripped_model)
|
||||
- #Using Old algo, ignores the series keyword in ppd searching.
|
||||
- matches2 = list(getPPDFile(stripModel(stripped_model), ppds).items())
|
||||
- log.debug(matches2)
|
||||
- num_matches2 = len(matches2)
|
||||
- if num_matches2:
|
||||
- for f, d in matches2:
|
||||
- match = ppd_pat.match(f)
|
||||
- if match is not None:
|
||||
- log.debug("Found match: %s" % f)
|
||||
- try:
|
||||
- pdls = match.group(2).split('-')
|
||||
- except AttributeError:
|
||||
- pdls = []
|
||||
+ if not models.PDL_TYPES.get(pdl):
|
||||
+ log.debug('Unknown PDL named \'{}\' - can be a new PDL or '
|
||||
+ 'just a part of device name. Assume it is '
|
||||
+ 'a part of device name.'.format(pdl))
|
||||
+ else:
|
||||
+ pdls.append(pdl)
|
||||
+ ppd_model=ppd_model.replace('-{}'.format(pdl), '')
|
||||
+
|
||||
+ if ppd_model != wanted_model and ppd_model != '{}_series'.format(wanted_model):
|
||||
+ continue
|
||||
+
|
||||
+ log.debug("Found match: %s" % f)
|
||||
|
||||
- if (prop.hpcups_build and 'hpijs' not in f) or \
|
||||
- ((prop.hpijs_build and 'hpijs' in pdls) or (prop.hpcups_build and 'hpijs' not in pdls)) or \
|
||||
- ('ps' in pdls) or ('pdf' in pdls):
|
||||
- matches.append((f, [p for p in pdls if p and p != 'hpijs']))
|
||||
+ if (prop.hpcups_build and 'hpijs' not in f) or \
|
||||
+ ((prop.hpijs_build and 'hpijs' in driver_types) or (prop.hpcups_build and 'hpijs' not in driver_types)) or \
|
||||
+ ('ps' in pdls) or ('pdf' in pdls):
|
||||
+ matches.append((f, pdls, [d for d in driver_types if d and d != 'hpijs']))
|
||||
|
||||
- log.debug(matches)
|
||||
- num_matches = len(matches)
|
||||
+
|
||||
+ log.debug(matches)
|
||||
+ num_matches = len(matches)
|
||||
|
||||
if num_matches == 0:
|
||||
- log.error("No PPD found for model %s using old algorithm." % stripModel(stripped_model))
|
||||
+ log.error("No PPD found for model %s." % stripModel(stripped_model))
|
||||
return None
|
||||
|
||||
elif num_matches == 1:
|
||||
@@ -570,7 +569,7 @@ def getPPDFile2(mq,model, ppds): # New PPD find
|
||||
# > 1
|
||||
log.debug("%d matches found. Searching based on PDL: Host > PS,PDF > PCL/Other" % num_matches)
|
||||
for p in [models.PDL_TYPE_HOST, models.PDL_TYPE_PS,models.PDL_TYPE_PDF, models.PDL_TYPE_PCL]:
|
||||
- for f, pdl_list in matches:
|
||||
+ for f, pdl_list, driver_list in matches:
|
||||
for x in pdl_list:
|
||||
# default to HOST-based PDLs, as newly supported PDLs will most likely be of this type
|
||||
if models.PDL_TYPES.get(x, models.PDL_TYPE_HOST) == p:
|
||||
@@ -579,8 +578,8 @@ def getPPDFile2(mq,model, ppds): # New PPD find
|
||||
|
||||
log.debug("%d matches found. Searching based on Filters: HPCUPS > HPIJS" % num_matches)
|
||||
for p in ["hpcups","hpijs"]:
|
||||
- for f, pdl_list in matches:
|
||||
- if p in f:
|
||||
+ for f, pdl_list, driver_list in matches:
|
||||
+ if p in driver_list:
|
||||
log.debug("Selecting PPD: %s" % (f))
|
||||
return (f, '')
|
||||
|
@ -0,0 +1,111 @@
|
||||
--- hplip-3.20.3/prnt/hpps/hppsfilter.c.orig 2020-03-25 01:09:51.585129957 +0000
|
||||
+++ hplip-3.20.3/prnt/hpps/hppsfilter.c 2020-03-25 01:10:15.610058293 +0000
|
||||
@@ -104,7 +104,7 @@ static void open_tempbookletfile(char *m
|
||||
if(ptempbooklet_file == NULL)
|
||||
{
|
||||
fprintf(stderr, "ERROR: Unable to open temp file %s\n", temp_filename);
|
||||
- return 1;
|
||||
+ return;
|
||||
}
|
||||
chmod(temp_filename, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
|
||||
|
||||
--- hplip-3.20.3/scan/sane/hpaio.c.orig 2020-03-25 01:24:15.558732638 +0000
|
||||
+++ hplip-3.20.3/scan/sane/hpaio.c 2020-03-25 02:48:36.097054366 +0000
|
||||
@@ -406,20 +406,34 @@ extern SANE_Status sane_hpaio_open(SANE_
|
||||
|
||||
extern void sane_hpaio_close(SANE_Handle handle)
|
||||
{
|
||||
- if (strcmp(*((char **)handle), "MARVELL") == 0)
|
||||
- return marvell_close(handle);
|
||||
- if (strcmp(*((char **)handle), "SOAP") == 0)
|
||||
- return soap_close(handle);
|
||||
- if (strcmp(*((char **)handle), "SOAPHT") == 0)
|
||||
- return soapht_close(handle);
|
||||
- if (strcmp(*((char **)handle), "LEDM") == 0)
|
||||
- return ledm_close(handle);
|
||||
- if (strcmp(*((char **)handle), "SCL-PML") == 0)
|
||||
- return sclpml_close(handle);
|
||||
- if (strcmp(*((char **)handle), "ESCL") == 0)
|
||||
- return escl_close(handle);
|
||||
- if (strcmp(*((char **)handle), "ORBLITE") == 0)
|
||||
- return orblite_close(handle);
|
||||
+ if (strcmp(*((char **)handle), "MARVELL") == 0) {
|
||||
+ marvell_close(handle);
|
||||
+ return;
|
||||
+ }
|
||||
+ if (strcmp(*((char **)handle), "SOAP") == 0) {
|
||||
+ soap_close(handle);
|
||||
+ return;
|
||||
+ }
|
||||
+ if (strcmp(*((char **)handle), "SOAPHT") == 0) {
|
||||
+ soapht_close(handle);
|
||||
+ return;
|
||||
+ }
|
||||
+ if (strcmp(*((char **)handle), "LEDM") == 0) {
|
||||
+ ledm_close(handle);
|
||||
+ return;
|
||||
+ }
|
||||
+ if (strcmp(*((char **)handle), "SCL-PML") == 0) {
|
||||
+ sclpml_close(handle);
|
||||
+ return;
|
||||
+ }
|
||||
+ if (strcmp(*((char **)handle), "ESCL") == 0) {
|
||||
+ escl_close(handle);
|
||||
+ return;
|
||||
+ }
|
||||
+ if (strcmp(*((char **)handle), "ORBLITE") == 0) {
|
||||
+ orblite_close(handle);
|
||||
+ return;
|
||||
+ }
|
||||
} /* sane_hpaio_close() */
|
||||
|
||||
extern const SANE_Option_Descriptor * sane_hpaio_get_option_descriptor(SANE_Handle handle, SANE_Int option)
|
||||
@@ -539,20 +553,34 @@ extern SANE_Status sane_hpaio_read(SANE_
|
||||
/* Note, sane_cancel is called normally not just during IO abort situations. */
|
||||
extern void sane_hpaio_cancel( SANE_Handle handle )
|
||||
{
|
||||
- if (strcmp(*((char **)handle), "MARVELL") == 0)
|
||||
- return marvell_cancel(handle);
|
||||
- if (strcmp(*((char **)handle), "SOAP") == 0)
|
||||
- return soap_cancel(handle);
|
||||
- if (strcmp(*((char **)handle), "SOAPHT") == 0)
|
||||
- return soapht_cancel(handle);
|
||||
- if (strcmp(*((char **)handle), "LEDM") == 0)
|
||||
- return ledm_cancel(handle);
|
||||
- if (strcmp(*((char **)handle), "SCL-PML") == 0)
|
||||
- return sclpml_cancel(handle);
|
||||
- if (strcmp(*((char **)handle), "ESCL") == 0)
|
||||
- return escl_cancel(handle);
|
||||
- if (strcmp(*((char **)handle), "ORBLITE") == 0)
|
||||
- return orblite_cancel(handle);
|
||||
+ if (strcmp(*((char **)handle), "MARVELL") == 0) {
|
||||
+ marvell_cancel(handle);
|
||||
+ return;
|
||||
+ }
|
||||
+ if (strcmp(*((char **)handle), "SOAP") == 0) {
|
||||
+ soap_cancel(handle);
|
||||
+ return;
|
||||
+ }
|
||||
+ if (strcmp(*((char **)handle), "SOAPHT") == 0) {
|
||||
+ soapht_cancel(handle);
|
||||
+ return;
|
||||
+ }
|
||||
+ if (strcmp(*((char **)handle), "LEDM") == 0) {
|
||||
+ ledm_cancel(handle);
|
||||
+ return;
|
||||
+ }
|
||||
+ if (strcmp(*((char **)handle), "SCL-PML") == 0) {
|
||||
+ sclpml_cancel(handle);
|
||||
+ return;
|
||||
+ }
|
||||
+ if (strcmp(*((char **)handle), "ESCL") == 0) {
|
||||
+ escl_cancel(handle);
|
||||
+ return;
|
||||
+ }
|
||||
+ if (strcmp(*((char **)handle), "ORBLITE") == 0) {
|
||||
+ orblite_cancel(handle);
|
||||
+ return;
|
||||
+ }
|
||||
} /* sane_hpaio_cancel() */
|
||||
|
||||
extern SANE_Status sane_hpaio_set_io_mode(SANE_Handle handle, SANE_Bool nonBlocking)
|
@ -0,0 +1,13 @@
|
||||
diff --git a/prnt/hpcups/Compressor.cpp b/prnt/hpcups/Compressor.cpp
|
||||
index 7fbbcd0..a29955e 100644
|
||||
--- a/prnt/hpcups/Compressor.cpp
|
||||
+++ b/prnt/hpcups/Compressor.cpp
|
||||
@@ -29,7 +29,7 @@
|
||||
\*****************************************************************************/
|
||||
#include "Compressor.h"
|
||||
|
||||
-Compressor::Compressor (unsigned int RasterSize, bool useseed) : SeedRow(NULL), UseSeedRow(useseed), inputsize(RasterSize), seeded(false)
|
||||
+Compressor::Compressor (unsigned int RasterSize, bool useseed) : SeedRow(NULL), compressBuf(NULL), UseSeedRow(useseed), inputsize(RasterSize), seeded(false)
|
||||
{
|
||||
constructor_error = NO_ERROR;
|
||||
iRastersReady = 0;
|
@ -0,0 +1,13 @@
|
||||
diff --git a/fax/backend/hpfax.py b/fax/backend/hpfax.py
|
||||
index a63051d..3e187c9 100755
|
||||
--- a/fax/backend/hpfax.py
|
||||
+++ b/fax/backend/hpfax.py
|
||||
@@ -89,7 +89,7 @@ try:
|
||||
from base import utils
|
||||
#from prnt import cups
|
||||
except ImportError as e:
|
||||
- bug("Error importing HPLIP modules: %s\n" % (pid, e))
|
||||
+ bug("Error importing HPLIP modules: %s\n" % (e))
|
||||
sys.exit(1)
|
||||
|
||||
def handle_sigpipe():
|
@ -0,0 +1,21 @@
|
||||
diff --git a/scan/scanext/scanext.c b/scan/scanext/scanext.c
|
||||
index ff57987..f607220 100755
|
||||
--- a/scan/scanext/scanext.c
|
||||
+++ b/scan/scanext/scanext.c
|
||||
@@ -407,16 +407,6 @@ static PyObject *setOption (_ScanDevice * self, PyObject * args)
|
||||
int n;
|
||||
multipick = 1;
|
||||
|
||||
-if(1)
|
||||
-{
|
||||
-SANE_Bool b = SANE_TRUE;
|
||||
- sane_control_option (self->h, 9, SANE_ACTION_SET_VALUE, (void *)&b, &i);
|
||||
-}
|
||||
-else
|
||||
-{
|
||||
-SANE_Bool b = SANE_FALSE;
|
||||
- sane_control_option (self->h, 9, SANE_ACTION_SET_VALUE, (void *)&b, &i);
|
||||
-}
|
||||
if (!PyArg_ParseTuple (args, "iO", &n, &value))
|
||||
raiseError("Invalid arguments.");
|
||||
|
@ -0,0 +1,16 @@
|
||||
diff --git a/io/hpmud/model.c b/io/hpmud/model.c
|
||||
index 4ea8990..72c630b 100644
|
||||
--- a/io/hpmud/model.c
|
||||
+++ b/io/hpmud/model.c
|
||||
@@ -420,7 +420,10 @@ static int ParseFile(char *datFile, char *model, char *attr, int attrSize, int *
|
||||
strncpy(section, rcbuf+1, sizeof(section)); /* found new section */
|
||||
n = strlen(section);
|
||||
section[n-2]=0; /* remove ']' and CR */
|
||||
- if (strcasecmp(model, section) == 0)
|
||||
+ if (strcasecmp(model, section) == 0 ||
|
||||
+ (section[0] == 'h' && section[1] == 'p' &&
|
||||
+ section[2] == '_' &&
|
||||
+ strcasecmp(model, section + 3) == 0))
|
||||
{
|
||||
/* Found model match. */
|
||||
*bytes_read = ResolveAttributes(fp, attr, attrSize);
|
@ -0,0 +1,48 @@
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 5d48aaa..88e663f 100755
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -399,9 +399,19 @@ else: # INTERACTIVE_MODE
|
||||
#log.warning("Cannot setup fax - device does not have fax feature.")
|
||||
setup_fax = False
|
||||
|
||||
+ norm_model = models.normalizeModelName(model).lower()
|
||||
+
|
||||
+ # get out if the found model is standalone scanner, hp-setup is printer/fax setup tool
|
||||
+ if 'scanjet' in norm_model:
|
||||
+ log.error('The device {} is a standalone scanner. '
|
||||
+ 'hp-setup is a printer/MFD setup tool, '
|
||||
+ 'not scanner installation tool. '.format(model))
|
||||
+ log.info(log.bold('Scanners do not need a installation, but they may '
|
||||
+ 'require a binary plugin (install by \'hp-plugin -i\').'))
|
||||
+ clean_exit(1)
|
||||
+
|
||||
# ******************************* PLUGIN
|
||||
|
||||
- norm_model = models.normalizeModelName(model).lower()
|
||||
plugin = mq.get('plugin', PLUGIN_NONE)
|
||||
|
||||
if ignore_plugin_check is False and plugin > PLUGIN_NONE:
|
||||
diff --git a/ui5/setupdialog.py b/ui5/setupdialog.py
|
||||
index c6f234b..a5041c1 100644
|
||||
--- a/ui5/setupdialog.py
|
||||
+++ b/ui5/setupdialog.py
|
||||
@@ -1326,6 +1326,18 @@ class SetupDialog(QDialog, Ui_Dialog):
|
||||
self.mq = device.queryModelByURI(self.device_uri)
|
||||
back_end, is_hp, bus, model, serial, dev_file, host, zc, port = device.parseDeviceURI(self.device_uri)
|
||||
self.model = models.normalizeModelName(model).lower()
|
||||
+ if 'scanjet' in self.model:
|
||||
+ FailureUI(self,
|
||||
+ self.__tr('<b>The device {} is a standalone '
|
||||
+ 'scanner.</b> <p>\'hp-setup\' is a tool '
|
||||
+ 'for installing printers and multifunction '
|
||||
+ 'devices. Scanners supported by HPLIP '
|
||||
+ 'work out-of-the-box after HPLIP installation, '
|
||||
+ 'or they may require a binary plugin, which you '
|
||||
+ 'can install by \'hp-plugin -i\'.</p>'.format(model)))
|
||||
+ self.displayPage(PAGE_DEVICES)
|
||||
+ return
|
||||
+
|
||||
self.showAddPrinterPage()
|
||||
|
||||
elif p == PAGE_ADD_PRINTER:
|
@ -1,12 +1,60 @@
|
||||
diff -up hplip-3.18.6/base/validation.py.keyserver hplip-3.18.6/base/validation.py
|
||||
--- hplip-3.18.6/base/validation.py.keyserver 2018-11-13 17:35:38.085322569 +0100
|
||||
+++ hplip-3.18.6/base/validation.py 2018-11-13 17:36:18.026991983 +0100
|
||||
@@ -42,7 +42,7 @@ class DigiSign_Verification(object):
|
||||
diff -up hplip-3.20.3/base/tui.py.keyserver hplip-3.20.3/base/tui.py
|
||||
--- hplip-3.20.3/base/tui.py.keyserver 2020-03-10 09:01:53.000000000 +0100
|
||||
+++ hplip-3.20.3/base/tui.py 2020-04-07 08:44:44.319710001 +0200
|
||||
@@ -241,6 +241,7 @@ class ProgressMeter(object):
|
||||
sys.stdout.write(y)
|
||||
|
||||
sys.stdout.flush()
|
||||
+ sys.stdout.write('\n')
|
||||
self.prev_length = len(y)
|
||||
self.spinner_pos = (self.spinner_pos + 1) % 8
|
||||
|
||||
diff -up hplip-3.20.3/base/validation.py.keyserver hplip-3.20.3/base/validation.py
|
||||
--- hplip-3.20.3/base/validation.py.keyserver 2020-03-10 09:01:53.000000000 +0100
|
||||
+++ hplip-3.20.3/base/validation.py 2020-04-07 08:45:46.657132415 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# (c) Copyright 2015 HP Development Company, L.P.
|
||||
@@ -42,8 +42,11 @@ class DigiSign_Verification(object):
|
||||
|
||||
|
||||
class GPG_Verification(DigiSign_Verification):
|
||||
- def __init__(self, pgp_site = 'pgp.mit.edu', key = 0x4ABA2F66DBD5A95894910E0673D770CDA59047B9):
|
||||
+ def __init__(self, pgp_site = 'pool.sks-keyservers.net', key = 0x4ABA2F66DBD5A95894910E0673D770CDA59047B9):
|
||||
self.__pgp_site = pgp_site
|
||||
- self.__pgp_site = pgp_site
|
||||
+ def __init__(self, keyservers = ['pool.sks-keyservers.net',
|
||||
+ 'keyserver.ubuntu.com',
|
||||
+ 'sks-keyservers.net', 'pgp.mit.edu'],
|
||||
+ key = 0x4ABA2F66DBD5A95894910E0673D770CDA59047B9):
|
||||
+ self.__keyservers = keyservers
|
||||
self.__key = key
|
||||
self.__gpg = utils.which('gpg',True)
|
||||
|
||||
@@ -82,13 +85,18 @@ class GPG_Verification(DigiSign_Verifica
|
||||
|
||||
|
||||
def __acquire_gpg_key(self):
|
||||
-
|
||||
- cmd = '%s --homedir %s --no-permission-warning --keyserver %s --recv-keys 0x%X' \
|
||||
- % (self.__gpg, self.__gpg_dir, self.__pgp_site, self.__key)
|
||||
-
|
||||
- log.info("Receiving digital keys: %s" % cmd)
|
||||
- status, output = utils.run(cmd)
|
||||
- log.debug(output)
|
||||
+ for kserver in self.__keyservers:
|
||||
+ cmd = '%s --homedir %s --no-permission-warning --keyserver %s --recv-keys 0x%X' \
|
||||
+ % (self.__gpg, self.__gpg_dir, kserver, self.__key)
|
||||
+
|
||||
+ log.info("Receiving digital keys: %s" % cmd)
|
||||
+ status, output = utils.run(cmd)
|
||||
+ log.debug(output)
|
||||
+
|
||||
+ if not status:
|
||||
+ break
|
||||
+ log.info("Receiving keys from {} failed, trying the next keyserver."
|
||||
+ .format(kserver))
|
||||
|
||||
self.__change_owner(True)
|
||||
|
||||
|
@ -0,0 +1,13 @@
|
||||
diff --git a/io/hpmud/musb.c b/io/hpmud/musb.c
|
||||
index 755493e..6d9c7fc 100644
|
||||
--- a/io/hpmud/musb.c
|
||||
+++ b/io/hpmud/musb.c
|
||||
@@ -1454,7 +1454,7 @@ enum HPMUD_RESULT __attribute__ ((visibility ("hidden"))) musb_raw_channel_write
|
||||
BUG("unable to write data %s: %d second io timeout\n", msp->device[pc->dindex].uri, sec_timeout);
|
||||
}
|
||||
else
|
||||
- BUG("unable to write data (len = %d) %s: %m\n", msp->device[pc->dindex].uri, len);
|
||||
+ BUG("unable to write data (len = %d) %s: %m\n", len, msp->device[pc->dindex].uri);
|
||||
goto bugout;
|
||||
}
|
||||
if(len == 0 && size > 0)
|
@ -0,0 +1,15 @@
|
||||
diff --git a/data/models/models.dat b/data/models/models.dat
|
||||
index 4b21c1a..76c4cc0 100644
|
||||
--- a/data/models/models.dat
|
||||
+++ b/data/models/models.dat
|
||||
@@ -64063,8 +64063,8 @@ model11=HP Color LaserJet Pro MFP M280c2
|
||||
monitor-type=0
|
||||
panel-check-type=0
|
||||
pcard-type=0
|
||||
-plugin=0
|
||||
-plugin-reason=0
|
||||
+plugin=1
|
||||
+plugin-reason=64
|
||||
power-settings=0
|
||||
ppd-name=hp-color_laserjet_mfp_m278-m281-ps.ppd
|
||||
family-ppd=hp-postscript-laserjet-pro.ppd
|
@ -0,0 +1,602 @@
|
||||
diff -up hplip-3.20.6/cups_drv.inc.missing-drivers hplip-3.20.6/cups_drv.inc
|
||||
--- hplip-3.20.6/cups_drv.inc.missing-drivers 2020-06-09 13:23:14.000000000 +0200
|
||||
+++ hplip-3.20.6/cups_drv.inc 2020-06-17 13:49:39.110952720 +0200
|
||||
@@ -407,6 +407,7 @@ cups_ppd_printers = \
|
||||
ppd/hpcups/hp-laserjet_cm1418fnw-pcl3.ppd.gz \
|
||||
ppd/hpcups/hp-laserjet_cp1025.ppd.gz \
|
||||
ppd/hpcups/hp-laserjet_cp1025nw.ppd.gz \
|
||||
+ ppd/hpcups/hp-laserjet_cp_1025nw.ppd.gz \
|
||||
ppd/hpcups/hp-laserjet_m1005.ppd.gz \
|
||||
ppd/hpcups/hp-laserjet_m101-m106.ppd.gz \
|
||||
ppd/hpcups/hp-laserjet_m1120_mfp.ppd.gz \
|
||||
@@ -520,6 +521,7 @@ cups_ppd_printers = \
|
||||
ppd/hpcups/hp-laserjet_professional_p1607dn.ppd.gz \
|
||||
ppd/hpcups/hp-laserjet_professional_p1608dn.ppd.gz \
|
||||
ppd/hpcups/hp-laserjet_professional_p1609dn.ppd.gz \
|
||||
+ ppd/hpcups/hp-laserjet_professional_p1102w.ppd.gz \
|
||||
ppd/hpcups/hp-laserjet_professional_p_1102w.ppd.gz \
|
||||
ppd/hpcups/hp-mopier_240-pcl3.ppd.gz \
|
||||
ppd/hpcups/hp-mopier_320-pcl3.ppd.gz \
|
||||
diff -up hplip-3.20.6/data/models/models.dat.missing-drivers hplip-3.20.6/data/models/models.dat
|
||||
--- hplip-3.20.6/data/models/models.dat.missing-drivers 2020-06-17 13:49:39.080953000 +0200
|
||||
+++ hplip-3.20.6/data/models/models.dat 2020-06-17 13:49:39.120952626 +0200
|
||||
@@ -2104,7 +2104,7 @@ usb-pid=411
|
||||
usb-vid=3f0
|
||||
wifi-config=0
|
||||
|
||||
-[hp_laserjet_100_colormfp_m175]
|
||||
+[hp_laserjet_100_colormfp_m175nw]
|
||||
align-type=0
|
||||
clean-type=0
|
||||
color-cal-type=0
|
||||
@@ -2119,14 +2119,6 @@ io-support=14
|
||||
job-storage=0
|
||||
linefeed-cal-type=0
|
||||
model1=HP LaserJet 100 Color MFP M175
|
||||
-model2=HP LaserJet 100 Color MFP M175a
|
||||
-model3=HP LaserJet 100 Color MFP M175b
|
||||
-model4=HP LaserJet 100 Color MFP M175c
|
||||
-model5=HP LaserJet 100 Color MFP M175e
|
||||
-model6=HP LaserJet 100 Color MFP M175nw
|
||||
-model7=HP LaserJet 100 Color MFP M175p
|
||||
-model8=HP LaserJet 100 Color MFP M175q
|
||||
-model9=HP LaserJet 100 Color MFP M175r
|
||||
ppd-name=hp-laserjet_100_color_mfp_m175-ps.ppd
|
||||
monitor-type=0
|
||||
panel-check-type=0
|
||||
@@ -2165,6 +2157,378 @@ usb-pid=62a
|
||||
usb-vid=3f0
|
||||
wifi-config=3
|
||||
|
||||
+[hp_laserjet_100_colormfp_m175r]
|
||||
+align-type=0
|
||||
+clean-type=0
|
||||
+color-cal-type=0
|
||||
+copy-type=0
|
||||
+embedded-server-type=1
|
||||
+fax-type=0
|
||||
+fw-download=False
|
||||
+icon=hp_color_laserjet_cm1312_mfp.png
|
||||
+io-mfp-mode=3
|
||||
+io-mode=1
|
||||
+io-support=14
|
||||
+job-storage=0
|
||||
+linefeed-cal-type=0
|
||||
+model1=HP LaserJet 100 Color MFP M175
|
||||
+ppd-name=hp-laserjet_100_color_mfp_m175-ps.ppd
|
||||
+monitor-type=0
|
||||
+panel-check-type=0
|
||||
+pcard-type=0
|
||||
+plugin=1
|
||||
+plugin-reason=64
|
||||
+power-settings=0
|
||||
+pq-diag-type=0
|
||||
+r-type=0
|
||||
+r0-agent1-kind=4
|
||||
+r0-agent1-sku=CE310A
|
||||
+r0-agent1-type=1
|
||||
+r0-agent2-kind=4
|
||||
+r0-agent2-sku=CE311A
|
||||
+r0-agent2-type=4
|
||||
+r0-agent3-kind=4
|
||||
+r0-agent3-sku=CE313A
|
||||
+r0-agent3-type=5
|
||||
+r0-agent4-kind=4
|
||||
+r0-agent4-sku=CE312A
|
||||
+r0-agent4-type=6
|
||||
+scan-src=3
|
||||
+scan-type=5
|
||||
+status-battery-check=0
|
||||
+status-dynamic-counters=0
|
||||
+status-type=10
|
||||
+support-released=True
|
||||
+support-subtype=219b2b
|
||||
+support-type=2
|
||||
+support-ver=3.11.7
|
||||
+tech-class=Postscript
|
||||
+family-class=Undefined
|
||||
+tech-subclass=Normal
|
||||
+tech-type=4
|
||||
+usb-pid=62a
|
||||
+usb-vid=3f0
|
||||
+wifi-config=3
|
||||
+
|
||||
+[hp_laserjet_100_colormfp_m175q]
|
||||
+align-type=0
|
||||
+clean-type=0
|
||||
+color-cal-type=0
|
||||
+copy-type=0
|
||||
+embedded-server-type=1
|
||||
+fax-type=0
|
||||
+fw-download=False
|
||||
+icon=hp_color_laserjet_cm1312_mfp.png
|
||||
+io-mfp-mode=3
|
||||
+io-mode=1
|
||||
+io-support=14
|
||||
+job-storage=0
|
||||
+linefeed-cal-type=0
|
||||
+model1=HP LaserJet 100 Color MFP M175
|
||||
+ppd-name=hp-laserjet_100_color_mfp_m175-ps.ppd
|
||||
+monitor-type=0
|
||||
+panel-check-type=0
|
||||
+pcard-type=0
|
||||
+plugin=1
|
||||
+plugin-reason=64
|
||||
+power-settings=0
|
||||
+pq-diag-type=0
|
||||
+r-type=0
|
||||
+r0-agent1-kind=4
|
||||
+r0-agent1-sku=CE310A
|
||||
+r0-agent1-type=1
|
||||
+r0-agent2-kind=4
|
||||
+r0-agent2-sku=CE311A
|
||||
+r0-agent2-type=4
|
||||
+r0-agent3-kind=4
|
||||
+r0-agent3-sku=CE313A
|
||||
+r0-agent3-type=5
|
||||
+r0-agent4-kind=4
|
||||
+r0-agent4-sku=CE312A
|
||||
+r0-agent4-type=6
|
||||
+scan-src=3
|
||||
+scan-type=5
|
||||
+status-battery-check=0
|
||||
+status-dynamic-counters=0
|
||||
+status-type=10
|
||||
+support-released=True
|
||||
+support-subtype=219b2b
|
||||
+support-type=2
|
||||
+support-ver=3.11.7
|
||||
+tech-class=Postscript
|
||||
+family-class=Undefined
|
||||
+tech-subclass=Normal
|
||||
+tech-type=4
|
||||
+usb-pid=62a
|
||||
+usb-vid=3f0
|
||||
+wifi-config=3
|
||||
+
|
||||
+[hp_laserjet_100_colormfp_m175p]
|
||||
+align-type=0
|
||||
+clean-type=0
|
||||
+color-cal-type=0
|
||||
+copy-type=0
|
||||
+embedded-server-type=1
|
||||
+fax-type=0
|
||||
+fw-download=False
|
||||
+icon=hp_color_laserjet_cm1312_mfp.png
|
||||
+io-mfp-mode=3
|
||||
+io-mode=1
|
||||
+io-support=14
|
||||
+job-storage=0
|
||||
+linefeed-cal-type=0
|
||||
+model1=HP LaserJet 100 Color MFP M175
|
||||
+ppd-name=hp-laserjet_100_color_mfp_m175-ps.ppd
|
||||
+monitor-type=0
|
||||
+panel-check-type=0
|
||||
+pcard-type=0
|
||||
+plugin=1
|
||||
+plugin-reason=64
|
||||
+power-settings=0
|
||||
+pq-diag-type=0
|
||||
+r-type=0
|
||||
+r0-agent1-kind=4
|
||||
+r0-agent1-sku=CE310A
|
||||
+r0-agent1-type=1
|
||||
+r0-agent2-kind=4
|
||||
+r0-agent2-sku=CE311A
|
||||
+r0-agent2-type=4
|
||||
+r0-agent3-kind=4
|
||||
+r0-agent3-sku=CE313A
|
||||
+r0-agent3-type=5
|
||||
+r0-agent4-kind=4
|
||||
+r0-agent4-sku=CE312A
|
||||
+r0-agent4-type=6
|
||||
+scan-src=3
|
||||
+scan-type=5
|
||||
+status-battery-check=0
|
||||
+status-dynamic-counters=0
|
||||
+status-type=10
|
||||
+support-released=True
|
||||
+support-subtype=219b2b
|
||||
+support-type=2
|
||||
+support-ver=3.11.7
|
||||
+tech-class=Postscript
|
||||
+family-class=Undefined
|
||||
+tech-subclass=Normal
|
||||
+tech-type=4
|
||||
+usb-pid=62a
|
||||
+usb-vid=3f0
|
||||
+wifi-config=3
|
||||
+
|
||||
+[hp_laserjet_100_colormfp_m175e]
|
||||
+align-type=0
|
||||
+clean-type=0
|
||||
+color-cal-type=0
|
||||
+copy-type=0
|
||||
+embedded-server-type=1
|
||||
+fax-type=0
|
||||
+fw-download=False
|
||||
+icon=hp_color_laserjet_cm1312_mfp.png
|
||||
+io-mfp-mode=3
|
||||
+io-mode=1
|
||||
+io-support=2
|
||||
+job-storage=0
|
||||
+linefeed-cal-type=0
|
||||
+model1=HP LaserJet 100 Color MFP M175
|
||||
+ppd-name=hp-laserjet_100_color_mfp_m175-ps.ppd
|
||||
+monitor-type=0
|
||||
+panel-check-type=0
|
||||
+pcard-type=0
|
||||
+plugin=1
|
||||
+plugin-reason=64
|
||||
+power-settings=0
|
||||
+pq-diag-type=0
|
||||
+r-type=0
|
||||
+r0-agent1-kind=4
|
||||
+r0-agent1-sku=CE310A
|
||||
+r0-agent1-type=1
|
||||
+r0-agent2-kind=4
|
||||
+r0-agent2-sku=CE311A
|
||||
+r0-agent2-type=4
|
||||
+r0-agent3-kind=4
|
||||
+r0-agent3-sku=CE313A
|
||||
+r0-agent3-type=5
|
||||
+r0-agent4-kind=4
|
||||
+r0-agent4-sku=CE312A
|
||||
+r0-agent4-type=6
|
||||
+scan-src=3
|
||||
+scan-type=5
|
||||
+status-battery-check=0
|
||||
+status-dynamic-counters=0
|
||||
+status-type=10
|
||||
+support-released=True
|
||||
+support-subtype=219b2b
|
||||
+support-type=2
|
||||
+support-ver=3.11.7
|
||||
+tech-class=Postscript
|
||||
+family-class=Undefined
|
||||
+tech-subclass=Normal
|
||||
+tech-type=4
|
||||
+usb-pid=62a
|
||||
+usb-vid=3f0
|
||||
+wifi-config=-1
|
||||
+
|
||||
+[hp_laserjet_100_colormfp_m175a]
|
||||
+align-type=0
|
||||
+clean-type=0
|
||||
+color-cal-type=0
|
||||
+copy-type=0
|
||||
+embedded-server-type=1
|
||||
+ppd-name=hp-laserjet_100_color_mfp_m175-ps.ppd
|
||||
+family-ppd=hp-postscript-laserjet-pro.ppd
|
||||
+fax-type=0
|
||||
+fw-download=False
|
||||
+icon=hp_color_laserjet_cm1312_mfp.png
|
||||
+io-mfp-mode=3
|
||||
+io-mode=1
|
||||
+io-support=2
|
||||
+job-storage=0
|
||||
+linefeed-cal-type=0
|
||||
+model1=HP LaserJet 100 Color MFP M175
|
||||
+monitor-type=0
|
||||
+panel-check-type=0
|
||||
+pcard-type=0
|
||||
+plugin=1
|
||||
+plugin-reason=64
|
||||
+power-settings=0
|
||||
+pq-diag-type=0
|
||||
+r-type=0
|
||||
+r0-agent1-kind=4
|
||||
+r0-agent1-sku=CE310A
|
||||
+r0-agent1-type=1
|
||||
+r0-agent2-kind=4
|
||||
+r0-agent2-sku=CE311A
|
||||
+r0-agent2-type=4
|
||||
+r0-agent3-kind=4
|
||||
+r0-agent3-sku=CE313A
|
||||
+r0-agent3-type=5
|
||||
+r0-agent4-kind=4
|
||||
+r0-agent4-sku=CE312A
|
||||
+r0-agent4-type=6
|
||||
+scan-src=3
|
||||
+scan-type=5
|
||||
+status-battery-check=0
|
||||
+status-dynamic-counters=0
|
||||
+status-type=10
|
||||
+support-released=True
|
||||
+support-subtype=219b2b
|
||||
+support-type=2
|
||||
+support-ver=3.11.7
|
||||
+tech-class=Postscript
|
||||
+family-class=Undefined
|
||||
+tech-subclass=Normal
|
||||
+tech-type=4
|
||||
+usb-pid=62a
|
||||
+usb-vid=3f0
|
||||
+wifi-config=-1
|
||||
+
|
||||
+[hp_laserjet_100_colormfp_m175c]
|
||||
+align-type=0
|
||||
+clean-type=0
|
||||
+color-cal-type=0
|
||||
+copy-type=0
|
||||
+embedded-server-type=1
|
||||
+fax-type=0
|
||||
+fw-download=False
|
||||
+icon=hp_color_laserjet_cm1312_mfp.png
|
||||
+io-mfp-mode=3
|
||||
+io-mode=1
|
||||
+io-support=2
|
||||
+job-storage=0
|
||||
+linefeed-cal-type=0
|
||||
+model1=HP LaserJet 100 Color MFP M175
|
||||
+ppd-name=hp-laserjet_100_color_mfp_m175-ps.ppd
|
||||
+monitor-type=0
|
||||
+panel-check-type=0
|
||||
+pcard-type=0
|
||||
+plugin=1
|
||||
+plugin-reason=64
|
||||
+power-settings=0
|
||||
+pq-diag-type=0
|
||||
+r-type=0
|
||||
+r0-agent1-kind=4
|
||||
+r0-agent1-sku=CE310A
|
||||
+r0-agent1-type=1
|
||||
+r0-agent2-kind=4
|
||||
+r0-agent2-sku=CE311A
|
||||
+r0-agent2-type=4
|
||||
+r0-agent3-kind=4
|
||||
+r0-agent3-sku=CE313A
|
||||
+r0-agent3-type=5
|
||||
+r0-agent4-kind=4
|
||||
+r0-agent4-sku=CE312A
|
||||
+r0-agent4-type=6
|
||||
+scan-src=3
|
||||
+scan-type=5
|
||||
+status-battery-check=0
|
||||
+status-dynamic-counters=0
|
||||
+status-type=10
|
||||
+support-released=True
|
||||
+support-subtype=219b2b
|
||||
+support-type=2
|
||||
+support-ver=3.11.7
|
||||
+tech-class=Postscript
|
||||
+family-class=Undefined
|
||||
+tech-subclass=Normal
|
||||
+tech-type=4
|
||||
+usb-pid=62a
|
||||
+usb-vid=3f0
|
||||
+wifi-config=-1
|
||||
+
|
||||
+[hp_laserjet_100_colormfp_m175b]
|
||||
+align-type=0
|
||||
+clean-type=0
|
||||
+color-cal-type=0
|
||||
+copy-type=0
|
||||
+embedded-server-type=1
|
||||
+fax-type=0
|
||||
+fw-download=False
|
||||
+icon=hp_color_laserjet_cm1312_mfp.png
|
||||
+io-mfp-mode=3
|
||||
+io-mode=1
|
||||
+io-support=2
|
||||
+job-storage=0
|
||||
+linefeed-cal-type=0
|
||||
+model1=HP LaserJet 100 Color MFP M175
|
||||
+ppd-name=hp-laserjet_100_color_mfp_m175-ps.ppd
|
||||
+monitor-type=0
|
||||
+panel-check-type=0
|
||||
+pcard-type=0
|
||||
+plugin=1
|
||||
+plugin-reason=64
|
||||
+power-settings=0
|
||||
+pq-diag-type=0
|
||||
+r-type=0
|
||||
+r0-agent1-kind=4
|
||||
+r0-agent1-sku=CE310A
|
||||
+r0-agent1-type=1
|
||||
+r0-agent2-kind=4
|
||||
+r0-agent2-sku=CE311A
|
||||
+r0-agent2-type=4
|
||||
+r0-agent3-kind=4
|
||||
+r0-agent3-sku=CE313A
|
||||
+r0-agent3-type=5
|
||||
+r0-agent4-kind=4
|
||||
+r0-agent4-sku=CE312A
|
||||
+r0-agent4-type=6
|
||||
+scan-src=3
|
||||
+scan-type=5
|
||||
+status-battery-check=0
|
||||
+status-dynamic-counters=0
|
||||
+status-type=10
|
||||
+support-released=True
|
||||
+support-subtype=219b2b
|
||||
+support-type=2
|
||||
+support-ver=3.11.7
|
||||
+tech-class=Postscript
|
||||
+family-class=Undefined
|
||||
+tech-subclass=Normal
|
||||
+tech-type=4
|
||||
+usb-pid=62a
|
||||
+usb-vid=3f0
|
||||
+wifi-config=-1
|
||||
+
|
||||
[officejet_100_mobile_l411]
|
||||
align-type=-1
|
||||
clean-type=1
|
||||
@@ -17867,6 +18231,58 @@ usb-pid=2c17
|
||||
usb-vid=3f0
|
||||
wifi-config=0
|
||||
|
||||
+[hp_laserjet_cp_1025nw]
|
||||
+align-type=0
|
||||
+clean-type=0
|
||||
+color-cal-type=0
|
||||
+copy-type=0
|
||||
+embedded-server-type=1
|
||||
+fax-type=0
|
||||
+fw-download=False
|
||||
+icon=hp_color_laserjet_cp2025.png
|
||||
+io-mfp-mode=1
|
||||
+io-mode=1
|
||||
+io-support=14
|
||||
+job-storage=0
|
||||
+linefeed-cal-type=0
|
||||
+model1=HP LaserJet Pro CP 1025nw Color Printer Series
|
||||
+monitor-type=0
|
||||
+panel-check-type=0
|
||||
+pcard-type=0
|
||||
+plugin=1
|
||||
+plugin-reason=1
|
||||
+power-settings=0
|
||||
+pq-diag-type=0
|
||||
+r-type=0
|
||||
+r0-agent1-kind=4
|
||||
+r0-agent1-sku=CE310A
|
||||
+r0-agent1-type=1
|
||||
+r0-agent2-kind=4
|
||||
+r0-agent2-sku=CE311A
|
||||
+r0-agent2-type=4
|
||||
+r0-agent3-kind=4
|
||||
+r0-agent3-sku=CE313A
|
||||
+r0-agent3-type=5
|
||||
+r0-agent4-kind=4
|
||||
+r0-agent4-sku=CE312A
|
||||
+r0-agent4-type=6
|
||||
+scan-src=0
|
||||
+scan-type=0
|
||||
+status-battery-check=0
|
||||
+status-dynamic-counters=0
|
||||
+status-type=8
|
||||
+support-released=True
|
||||
+support-subtype=219b2b
|
||||
+support-type=2
|
||||
+support-ver=3.12.4
|
||||
+tech-class=LJZjsColor
|
||||
+family-class=LJ-Class4
|
||||
+tech-subclass=Advanced
|
||||
+tech-type=4
|
||||
+usb-pid=112a
|
||||
+usb-vid=3f0
|
||||
+wifi-config=3
|
||||
+
|
||||
[hp_laserjet_cp1025nw]
|
||||
align-type=0
|
||||
clean-type=0
|
||||
@@ -18468,6 +18884,49 @@ usb-pid=3011
|
||||
usb-vid=3f0
|
||||
wifi-config=0
|
||||
|
||||
+[hp_laserjet_professional_p1102w]
|
||||
+align-type=0
|
||||
+clean-type=0
|
||||
+color-cal-type=0
|
||||
+copy-type=0
|
||||
+embedded-server-type=0
|
||||
+fax-type=0
|
||||
+fw-download=False
|
||||
+icon=HP_LaserJet_1012.png
|
||||
+io-mfp-mode=6
|
||||
+io-mode=1
|
||||
+io-support=10
|
||||
+job-storage=0
|
||||
+linefeed-cal-type=0
|
||||
+model1=HP LaserJet Professional P1102w Printer
|
||||
+monitor-type=0
|
||||
+panel-check-type=0
|
||||
+pcard-type=0
|
||||
+plugin=1
|
||||
+plugin-reason=1
|
||||
+power-settings=0
|
||||
+pq-diag-type=0
|
||||
+r-type=0
|
||||
+r0-agent1-kind=4
|
||||
+r0-agent1-sku=85A
|
||||
+r0-agent1-type=1
|
||||
+scan-src=0
|
||||
+scan-type=0
|
||||
+status-battery-check=0
|
||||
+status-dynamic-counters=0
|
||||
+status-type=8
|
||||
+support-released=True
|
||||
+support-subtype=219b2b
|
||||
+support-type=2
|
||||
+support-ver=3.10.4
|
||||
+tech-class=LJZjsMono
|
||||
+family-class=LJ-Class4
|
||||
+tech-subclass=NoAutoDuplex
|
||||
+tech-type=3
|
||||
+usb-pid=32a
|
||||
+usb-vid=3f0
|
||||
+wifi-config=3
|
||||
+
|
||||
[hp_laserjet_professional_p1102]
|
||||
align-type=0
|
||||
clean-type=0
|
||||
diff -up hplip-3.20.6/Makefile.in.missing-drivers hplip-3.20.6/Makefile.in
|
||||
--- hplip-3.20.6/Makefile.in.missing-drivers 2020-06-09 13:23:20.000000000 +0200
|
||||
+++ hplip-3.20.6/Makefile.in 2020-06-17 13:49:39.110952720 +0200
|
||||
@@ -1571,6 +1571,7 @@ am__dist_ppd_DATA_DIST = prnt/ps/hp-lase
|
||||
ppd/hpcups/hp-laserjet_cm1418fnw-pcl3.ppd.gz \
|
||||
ppd/hpcups/hp-laserjet_cp1025.ppd.gz \
|
||||
ppd/hpcups/hp-laserjet_cp1025nw.ppd.gz \
|
||||
+ ppd/hpcups/hp-laserjet_cp_1025nw.ppd.gz \
|
||||
ppd/hpcups/hp-laserjet_m1005.ppd.gz \
|
||||
ppd/hpcups/hp-laserjet_m101-m106.ppd.gz \
|
||||
ppd/hpcups/hp-laserjet_m1120_mfp.ppd.gz \
|
||||
@@ -1685,6 +1686,7 @@ am__dist_ppd_DATA_DIST = prnt/ps/hp-lase
|
||||
ppd/hpcups/hp-laserjet_professional_p1608dn.ppd.gz \
|
||||
ppd/hpcups/hp-laserjet_professional_p1609dn.ppd.gz \
|
||||
ppd/hpcups/hp-laserjet_professional_p_1102w.ppd.gz \
|
||||
+ ppd/hpcups/hp-laserjet_professional_p1102w.ppd.gz \
|
||||
ppd/hpcups/hp-mopier_240-pcl3.ppd.gz \
|
||||
ppd/hpcups/hp-mopier_320-pcl3.ppd.gz \
|
||||
ppd/hpcups/hp-neverstop_laser_100x.ppd.gz \
|
||||
@@ -3961,6 +3963,7 @@ dist_unrel_DATA =
|
||||
@HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_cm1418fnw-pcl3.ppd.gz \
|
||||
@HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_cp1025.ppd.gz \
|
||||
@HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_cp1025nw.ppd.gz \
|
||||
+@HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_cp_1025nw.ppd.gz \
|
||||
@HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_m1005.ppd.gz \
|
||||
@HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_m101-m106.ppd.gz \
|
||||
@HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_m1120_mfp.ppd.gz \
|
||||
@@ -4074,6 +4077,7 @@ dist_unrel_DATA =
|
||||
@HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_professional_p1607dn.ppd.gz \
|
||||
@HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_professional_p1608dn.ppd.gz \
|
||||
@HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_professional_p1609dn.ppd.gz \
|
||||
+@HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_professional_p1102w.ppd.gz \
|
||||
@HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-laserjet_professional_p_1102w.ppd.gz \
|
||||
@HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-mopier_240-pcl3.ppd.gz \
|
||||
@HPLIP_CLASS_DRIVER_FALSE@ ppd/hpcups/hp-mopier_320-pcl3.ppd.gz \
|
||||
diff -up hplip-3.20.6/prnt/drv/hpcups.drv.in.missing-drivers hplip-3.20.6/prnt/drv/hpcups.drv.in
|
||||
--- hplip-3.20.6/prnt/drv/hpcups.drv.in.missing-drivers 2020-06-17 13:49:39.009953663 +0200
|
||||
+++ hplip-3.20.6/prnt/drv/hpcups.drv.in 2020-06-17 13:51:49.576733820 +0200
|
||||
@@ -22319,6 +22319,14 @@ Group "RLT/HP Real Life Technologies"
|
||||
Attribute "Product" "" "(HP LaserJet Professional p1102s Printer)"
|
||||
}
|
||||
{
|
||||
+ ModelName "HP LaserJet Professional p1102w"
|
||||
+ Attribute "NickName" "" "HP LaserJet Professional p1102w, hpcups $Version, requires proprietary plugin"
|
||||
+ Attribute "ShortNickName" "" "HP LaserJet Professional p1102w hpijs"
|
||||
+ Attribute "1284DeviceID" "" "MFG:Hewlett-Packard;MDL:hp laserjet professional p1102w;DES:hp laserjet professional p1102w;"
|
||||
+ PCFileName "hp-laserjet_professional_p1102w.ppd"
|
||||
+ Attribute "Product" "" "(HP LaserJet Professional p1102w Printer)"
|
||||
+ }
|
||||
+ {
|
||||
ModelName "HP LaserJet Professional p1106"
|
||||
Attribute "NickName" "" "HP LaserJet Professional p1106, hpcups $Version"
|
||||
Attribute "ShortNickName" "" "HP LJ Pro p1106 hpijs"
|
||||
@@ -22752,6 +22760,14 @@ Group "RLT/HP Real Life Technologies"
|
||||
PCFileName "hp-laserjet_cp1025nw.ppd"
|
||||
Attribute "Product" "" "(HP LaserJet Pro cp1025nw Color Printer Series)"
|
||||
}
|
||||
+ {
|
||||
+ ModelName "HP LaserJet Cp 1025nw"
|
||||
+ Attribute "NickName" "" "HP LaserJet Cp 1025nw, hpcups $Version, requires proprietary plugin"
|
||||
+ Attribute "ShortNickName" "" "HP LaserJet Cp 1025nw hpijs"
|
||||
+ Attribute "1284DeviceID" "" "MFG:Hewlett-Packard;MDL:hp laserjet cp 1025nw;DES:hp laserjet cp 1025nw;"
|
||||
+ PCFileName "hp-laserjet_cp_1025nw.ppd"
|
||||
+ Attribute "Product" "" "(HP LaserJet Pro Cp 1025nw Color Printer Series)"
|
||||
+ }
|
||||
}
|
||||
} // End LJZjsColor (for proprietary plugin)
|
||||
|
@ -0,0 +1,13 @@
|
||||
diff --git a/installer/pluginhandler.py b/installer/pluginhandler.py
|
||||
index 4d7c1b8..1af8d85 100755
|
||||
--- a/installer/pluginhandler.py
|
||||
+++ b/installer/pluginhandler.py
|
||||
@@ -164,7 +164,7 @@ class PluginHandle(object):
|
||||
for src, trg, link in copies:
|
||||
if link != "":
|
||||
if not utils.check_library(link):
|
||||
- self.__plugin_state = PLUGIN_FILES_CORRUPTED
|
||||
+ pass
|
||||
|
||||
|
||||
def __getPluginInformation(self, callback=None):
|
@ -0,0 +1,64 @@
|
||||
diff --git a/io/hpmud/jd.c b/io/hpmud/jd.c
|
||||
index 20df27a..7ed4918 100644
|
||||
--- a/io/hpmud/jd.c
|
||||
+++ b/io/hpmud/jd.c
|
||||
@@ -208,7 +208,22 @@ enum HPMUD_RESULT __attribute__ ((visibility ("hidden"))) jd_open(mud_device *pd
|
||||
{
|
||||
/* Make sure uri model matches device id model. */
|
||||
hpmud_get_uri_model(pd->uri, uri_model, sizeof(uri_model));
|
||||
+
|
||||
+ /* remove possible hp_ string */
|
||||
+ if (strncasecmp(uri_model, "HP_", 3) == 0)
|
||||
+ {
|
||||
+ memmove(uri_model, uri_model + 3, 127);
|
||||
+ uri_model[127] = '\0';
|
||||
+ }
|
||||
+
|
||||
hpmud_get_model(pd->id, model, sizeof(model));
|
||||
+ /* remove possible hp_ string */
|
||||
+ if (strncasecmp(model, "HP_", 3) == 0)
|
||||
+ {
|
||||
+ memmove(model, model + 3, 127);
|
||||
+ model[127] = '\0';
|
||||
+ }
|
||||
+
|
||||
if (strcasecmp(uri_model, model) != 0)
|
||||
{
|
||||
stat = HPMUD_R_INVALID_URI; /* different device plugged in */
|
||||
diff --git a/io/hpmud/model.c b/io/hpmud/model.c
|
||||
index d546ec1..adb3d87 100644
|
||||
--- a/io/hpmud/model.c
|
||||
+++ b/io/hpmud/model.c
|
||||
@@ -407,7 +407,10 @@ static int ParseFile(char *datFile, char *model, char *attr, int attrSize, int *
|
||||
char rcbuf[255];
|
||||
char section[128];
|
||||
char file[128];
|
||||
- int found=0, n;
|
||||
+ int found=0;
|
||||
+ size_t n;
|
||||
+
|
||||
+ size_t model_len = strlen(model);
|
||||
|
||||
if ((fp = fopen(datFile, "r")) == NULL)
|
||||
goto bugout;
|
||||
@@ -422,10 +425,17 @@ static int ParseFile(char *datFile, char *model, char *attr, int attrSize, int *
|
||||
strncpy(section, rcbuf+1, sizeof(section)); /* found new section */
|
||||
n = strlen(section);
|
||||
section[n-2]=0; /* remove ']' and CR */
|
||||
+ n -= 2;
|
||||
if (strcasecmp(model, section) == 0 ||
|
||||
- (section[0] == 'h' && section[1] == 'p' &&
|
||||
- section[2] == '_' &&
|
||||
- strcasecmp(model, section + 3) == 0))
|
||||
+ (section[0] == 'h' &&
|
||||
+ section[1] == 'p' &&
|
||||
+ section[2] == '_' &&
|
||||
+ strcasecmp(model, section + 3) == 0) ||
|
||||
+ (n > model_len &&
|
||||
+ strncasecmp(section, model, model_len) == 0 &&
|
||||
+ strncasecmp(section + model_len, "_series", strlen("_series")) == 0
|
||||
+ )
|
||||
+ )
|
||||
{
|
||||
/* Found model match. */
|
||||
*bytes_read = ResolveAttributes(fp, attr, attrSize);
|
@ -0,0 +1,22 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
|
||||
VERSION=$1
|
||||
|
||||
if [ "${VERSION:="*"}" == "*" ]
|
||||
then
|
||||
echo "Define a version of hplip as an argument."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# extract the original tarball
|
||||
tar -xaf hplip-$VERSION.tar.gz || exit 1
|
||||
|
||||
# remove unwanted files
|
||||
rm hplip-$VERSION/prnt/hpcups/ErnieFilter.{cpp,h} hplip-$VERSION/prnt/hpijs/ernieplatform.h || exit 1
|
||||
|
||||
# compress into a new tarball
|
||||
tar -cjvf hplip-$VERSION-repack.tar.gz hplip-$VERSION || exit 1
|
||||
|
||||
# upload a new source tarball
|
||||
#fedpkg new-sources hplip-$VERSION-repack.tar.gz || exit 1
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,20 @@
|
||||
diff --git a/systray.py b/systray.py
|
||||
index 07db0fa..3a35b30 100644
|
||||
--- a/systray.py
|
||||
+++ b/systray.py
|
||||
@@ -89,7 +89,14 @@ if __name__ == '__main__':
|
||||
log.debug("Creating pipe: hpssd (%d) ==> systemtray (%d)" % (w1, r1))
|
||||
|
||||
parent_pid = os.getpid()
|
||||
- child_pid1 = os.fork()
|
||||
+ try:
|
||||
+ child_pid1 = os.fork()
|
||||
+ except BlockingIOErrror as e:
|
||||
+ log.error("hp-systray: error during fork - %s" % e)
|
||||
+ os.close(w1)
|
||||
+ os.close(r1)
|
||||
+ mod.unlockInstance()
|
||||
+ sys.exit(1)
|
||||
|
||||
if child_pid1:
|
||||
# parent (UI)
|
@ -0,0 +1,93 @@
|
||||
diff --git a/copier/copier.py b/copier/copier.py
|
||||
index a595baa..7794f48 100644
|
||||
--- a/copier/copier.py
|
||||
+++ b/copier/copier.py
|
||||
@@ -73,13 +73,13 @@ class PMLCopyDevice(device.Device):
|
||||
|
||||
def isCopyActive(self):
|
||||
if self.copy_thread is not None:
|
||||
- return self.copy_thread.isAlive()
|
||||
+ return self.copy_thread.is_alive()
|
||||
else:
|
||||
return False
|
||||
|
||||
def waitForCopyThread(self):
|
||||
if self.copy_thread is not None and \
|
||||
- self.copy_thread.isAlive():
|
||||
+ self.copy_thread.is_alive():
|
||||
|
||||
self.copy_thread.join()
|
||||
|
||||
diff --git a/fax/fax.py b/fax/fax.py
|
||||
index 3d69226..0878a64 100644
|
||||
--- a/fax/fax.py
|
||||
+++ b/fax/fax.py
|
||||
@@ -478,13 +478,13 @@ class FaxDevice(device.Device):
|
||||
|
||||
def isSendFaxActive(self):
|
||||
if self.send_fax_thread is not None:
|
||||
- return self.send_fax_thread.isAlive()
|
||||
+ return self.send_fax_thread.is_alive()
|
||||
else:
|
||||
return False
|
||||
|
||||
def waitForSendFaxThread(self):
|
||||
if self.send_fax_thread is not None and \
|
||||
- self.send_fax_thread.isAlive():
|
||||
+ self.send_fax_thread.is_alive():
|
||||
|
||||
try:
|
||||
self.send_fax_thread.join()
|
||||
diff --git a/fax/pmlfax.py b/fax/pmlfax.py
|
||||
index b68ff6a..b1020d0 100644
|
||||
--- a/fax/pmlfax.py
|
||||
+++ b/fax/pmlfax.py
|
||||
@@ -179,13 +179,13 @@ class PMLFaxDevice(FaxDevice):
|
||||
|
||||
def isUploadLogActive(self):
|
||||
if self.upload_log_thread is not None:
|
||||
- return self.upload_log_thread.isAlive()
|
||||
+ return self.upload_log_thread.is_alive()
|
||||
else:
|
||||
return False
|
||||
|
||||
def waitForUploadLogThread(self):
|
||||
if self.upload_log_thread is not None and \
|
||||
- self.upload_log_thread.isAlive():
|
||||
+ self.upload_log_thread.is_alive():
|
||||
|
||||
self.upload_log_thread.join()
|
||||
|
||||
diff --git a/scan/sane.py b/scan/sane.py
|
||||
index b6c4acd..e8f8db8 100755
|
||||
--- a/scan/sane.py
|
||||
+++ b/scan/sane.py
|
||||
@@ -378,14 +378,14 @@ class ScanDevice:
|
||||
|
||||
def isScanActive(self):
|
||||
if self.scan_thread is not None:
|
||||
- return self.scan_thread.isAlive() and self.scan_thread.scan_active
|
||||
+ return self.scan_thread.is_alive() and self.scan_thread.scan_active
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
def waitForScanDone(self):
|
||||
if self.scan_thread is not None and \
|
||||
- self.scan_thread.isAlive() and \
|
||||
+ self.scan_thread.is_alive() and \
|
||||
self.scan_thread.scan_active:
|
||||
|
||||
try:
|
||||
@@ -398,9 +398,9 @@ class ScanDevice:
|
||||
#time.sleep(0.5)
|
||||
if self.scan_thread is not None:
|
||||
while True:
|
||||
- #print self.scan_thread.isAlive()
|
||||
+ #print self.scan_thread.is_alive()
|
||||
#print self.scan_thread.scan_active
|
||||
- if self.scan_thread.isAlive() and \
|
||||
+ if self.scan_thread.is_alive() and \
|
||||
self.scan_thread.scan_active:
|
||||
return
|
||||
|
@ -0,0 +1,12 @@
|
||||
diff --git a/prnt/hpcups/CommonDefinitions.h b/prnt/hpcups/CommonDefinitions.h
|
||||
index 082aec9..86763d4 100644
|
||||
--- a/prnt/hpcups/CommonDefinitions.h
|
||||
+++ b/prnt/hpcups/CommonDefinitions.h
|
||||
@@ -48,7 +48,6 @@
|
||||
#include <syslog.h>
|
||||
#include <assert.h>
|
||||
#include <time.h>
|
||||
-#include <sys/timeb.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifndef _GNU_SOURCE
|
@ -1,54 +1,96 @@
|
||||
diff -up hplip-3.16.7/base/utils.py.ui-optional hplip-3.16.7/base/utils.py
|
||||
--- hplip-3.16.7/base/utils.py.ui-optional 2016-07-15 12:12:28.000000000 +0200
|
||||
+++ hplip-3.16.7/base/utils.py 2016-08-12 10:12:24.599398769 +0200
|
||||
@@ -733,6 +733,13 @@ def checkPyQtImport(): # qt3
|
||||
diff --git a/base/module.py b/base/module.py
|
||||
index dd3efa3..04ac5b8 100644
|
||||
--- a/base/module.py
|
||||
+++ b/base/module.py
|
||||
@@ -432,6 +432,12 @@ class Module(object):
|
||||
if show_usage is not None:
|
||||
sys.exit(0)
|
||||
|
||||
+ if mode == GUI_MODE:
|
||||
+ if not utils.canEnterGUIMode4():
|
||||
+ log.warn("GUI mode not available - switching to interactive mode.")
|
||||
+ mode = INTERACTIVE_MODE
|
||||
+ ui_toolkit = 'none'
|
||||
+
|
||||
self.mode = mode
|
||||
return opts, device_uri, printer_name, mode, ui_toolkit, lang
|
||||
|
||||
diff --git a/base/utils.py b/base/utils.py
|
||||
index 98437a3..9b8813b 100644
|
||||
--- a/base/utils.py
|
||||
+++ b/base/utils.py
|
||||
@@ -722,6 +722,15 @@ def canEnterGUIMode4(): # qt4
|
||||
log.warn(e)
|
||||
return False
|
||||
|
||||
+ try:
|
||||
+ import ui4
|
||||
+ except ImportError:
|
||||
+ try:
|
||||
+ import ui5
|
||||
+ except ImportError as e:
|
||||
+ log.warn(e)
|
||||
+ return False
|
||||
+
|
||||
return True
|
||||
|
||||
|
||||
@@ -734,6 +743,11 @@ def checkPyQtImport(): # qt3
|
||||
if os.getenv('DISPLAY') and os.getenv('STARTED_FROM_MENU'):
|
||||
no_qt_message_gtk()
|
||||
|
||||
+ # hplip-gui sub-package (Fedora)
|
||||
+ try:
|
||||
+ import ui
|
||||
+ except ImportError:
|
||||
+ log.error("hplip-gui not installed. GUI not available. Exiting.")
|
||||
+ return False
|
||||
+
|
||||
log.error("PyQt not installed. GUI not available. Exiting.")
|
||||
return False
|
||||
|
||||
@@ -783,7 +790,8 @@ def checkPyQtImport4():
|
||||
import PyQt5
|
||||
import ui5
|
||||
else:
|
||||
@@ -781,11 +795,13 @@ def checkPyQtImport4():
|
||||
import PyQt4
|
||||
import ui4
|
||||
except ImportError:
|
||||
- import PyQt5
|
||||
- import ui5
|
||||
- else:
|
||||
- log.debug("HPLIP is not installed properly or is installed without graphical support. Please reinstall HPLIP again")
|
||||
+ # hplip-gui sub-package (Fedora) requires python3-qt5
|
||||
+ log.error("Install the hplip-gui package for graphical support.")
|
||||
return False
|
||||
- return False
|
||||
+ try:
|
||||
+ import PyQt5
|
||||
+ import ui5
|
||||
+ except ImportError:
|
||||
+ log.debug('GUI not available.')
|
||||
+ return False
|
||||
+
|
||||
return True
|
||||
|
||||
@@ -2434,6 +2442,7 @@ def checkPyQtImport45():
|
||||
except ImportError as e:
|
||||
log.debug(e)
|
||||
|
||||
+ log.error("Install the hplip-gui package for graphical support.")
|
||||
raise ImportError("GUI Modules PyQt4 and PyQt5 are not installed")
|
||||
|
||||
|
||||
@@ -2455,6 +2464,7 @@ def import_dialog(ui_toolkit):
|
||||
return (QApplication, "ui4")
|
||||
except ImportError as e:
|
||||
log.error(e)
|
||||
+ log.error("Unable to load Qt support. Is hplip-gui package installed?")
|
||||
sys.exit(1)
|
||||
elif ui_toolkit == "qt5":
|
||||
try:
|
||||
@@ -2463,9 +2473,7 @@ def import_dialog(ui_toolkit):
|
||||
return (QApplication, "ui5")
|
||||
except ImportError as e:
|
||||
log.error(e)
|
||||
- sys.exit(1)
|
||||
- else:
|
||||
- log.error("Unable to load Qt support. Is it installed?")
|
||||
+ log.error("Unable to load Qt support. Is hplip-gui package installed?")
|
||||
sys.exit(1)
|
||||
# def checkPyQtImport5():
|
||||
diff --git a/fab.py b/fab.py
|
||||
index 5577af5..194ceed 100755
|
||||
--- a/fab.py
|
||||
+++ b/fab.py
|
||||
@@ -776,14 +776,15 @@ mod.setUsage(module.USAGE_FLAG_NONE)
|
||||
opts, device_uri, printer_name, mode, ui_toolkit, loc = \
|
||||
mod.parseStdOpts(handle_device_printer=False)
|
||||
|
||||
-if ui_toolkit == 'qt3':
|
||||
- if not utils.canEnterGUIMode():
|
||||
- log.error("%s GUI mode requires GUI support (try running with --qt4). Entering interactive mode." % __mod__)
|
||||
- mode = INTERACTIVE_MODE
|
||||
-else:
|
||||
- if not utils.canEnterGUIMode4():
|
||||
- log.error("%s GUI mode requires GUI support (try running with --qt3). Entering interactive mode." % __mod__)
|
||||
- mode = INTERACTIVE_MODE
|
||||
+if ui_toolkit != 'none':
|
||||
+ if ui_toolkit == 'qt3':
|
||||
+ if not utils.canEnterGUIMode():
|
||||
+ log.error("%s GUI mode requires GUI support (try running with --qt4). Entering interactive mode." % __mod__)
|
||||
+ mode = INTERACTIVE_MODE
|
||||
+ else:
|
||||
+ if not utils.canEnterGUIMode4():
|
||||
+ log.error("%s GUI mode requires GUI support (try running with --qt3). Entering interactive mode." % __mod__)
|
||||
+ mode = INTERACTIVE_MODE
|
||||
|
||||
|
||||
if mode == GUI_MODE:
|
||||
|
@ -0,0 +1,18 @@
|
||||
diff --git a/base/sixext.py b/base/sixext.py
|
||||
index 0bf4fc4..311bf72 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):
|
@ -0,0 +1,40 @@
|
||||
diff -up hplip-3.18.5/base/utils.py.use-binary-str hplip-3.18.5/base/utils.py
|
||||
--- hplip-3.18.5/base/utils.py.use-binary-str 2018-05-28 13:52:32.698082273 +0200
|
||||
+++ hplip-3.18.5/base/utils.py 2018-05-28 13:53:20.563707314 +0200
|
||||
@@ -961,10 +961,7 @@ else:
|
||||
|
||||
|
||||
def printable(s):
|
||||
- if s:
|
||||
- return s.translate(identity, unprintable)
|
||||
- else:
|
||||
- return ""
|
||||
+ return s.translate(identity, unprintable)
|
||||
|
||||
|
||||
def any(S,f=lambda x:x):
|
||||
diff -up hplip-3.18.5/fax/pmlfax.py.use-binary-str hplip-3.18.5/fax/pmlfax.py
|
||||
--- hplip-3.18.5/fax/pmlfax.py.use-binary-str 2018-05-24 06:34:40.000000000 +0200
|
||||
+++ hplip-3.18.5/fax/pmlfax.py 2018-05-28 13:52:05.752293151 +0200
|
||||
@@ -143,8 +143,8 @@ class PMLFaxDevice(FaxDevice):
|
||||
|
||||
def getPhoneNum(self):
|
||||
if PY3:
|
||||
- data = utils.printable(self.getPML(pml.OID_FAX_LOCAL_PHONE_NUM)[1])
|
||||
- return data
|
||||
+ data = utils.printable(self.getPML(pml.OID_FAX_LOCAL_PHONE_NUM)[1].encode('utf-8'))
|
||||
+ return data.decode('utf-8')
|
||||
else:
|
||||
return utils.printable(self.getPML(pml.OID_FAX_LOCAL_PHONE_NUM)[1])
|
||||
phone_num = property(getPhoneNum, setPhoneNum, doc="OID_FAX_LOCAL_PHONE_NUM")
|
||||
@@ -155,8 +155,8 @@ class PMLFaxDevice(FaxDevice):
|
||||
|
||||
def getStationName(self):
|
||||
if PY3:
|
||||
- data = utils.printable(self.getPML(pml.OID_FAX_STATION_NAME)[1])
|
||||
- return data
|
||||
+ data = utils.printable(self.getPML(pml.OID_FAX_STATION_NAME)[1].encode('utf-8'))
|
||||
+ return data.decode('utf-8')
|
||||
else:
|
||||
return utils.printable(self.getPML(pml.OID_FAX_STATION_NAME)[1])
|
||||
|
@ -0,0 +1,12 @@
|
||||
diff -up hplip-3.19.6/ui5/wifisetupdialog.py.wifisetup-bad-call-fix hplip-3.19.6/ui5/wifisetupdialog.py
|
||||
--- hplip-3.19.6/ui5/wifisetupdialog.py.wifisetup-bad-call-fix 2019-07-12 08:46:56.873167869 +0200
|
||||
+++ hplip-3.19.6/ui5/wifisetupdialog.py 2019-07-12 08:49:36.813769803 +0200
|
||||
@@ -570,7 +570,7 @@ class WifiSetupDialog(QDialog, Ui_Dialog
|
||||
try:
|
||||
self.ip,_,addressmode, subnetmask, gateway, pridns, sec_dns= self.wifiObj.getIPConfiguration(self.dev, self.adapterName)
|
||||
if self.ip == "0.0.0.0":
|
||||
- self.ip, subnetmask, gateway, pri_dns, sec_dns, addressmode = self.wifiObj.getwifiotherdetails(self.dev,self.adapterName)
|
||||
+ self.ip, subnetmask, gateway, pridns, sec_dns, addressmode = self.wifiObj.getwifiotherdetails(self.dev,self.adapterName)
|
||||
vsa_codes = self.wifiObj.getVSACodes(self.dev, self.adapterName)
|
||||
ss_max, ss_min, ss_val, ss_dbm = self.wifiObj.getSignalStrength(self.dev, self.adapterName,self.network, self.adaptor_id)
|
||||
self.hn = self.wifiObj.getHostname(self.dev)
|
Loading…
Reference in new issue