system-config-printer/system-config-printer-hp-scannable.patch

31 lines
1.5 KiB
Diff

diff -up system-config-printer-1.3.0/newprinter.py.hp-scannable system-config-printer-1.3.0/newprinter.py
--- system-config-printer-1.3.0/newprinter.py.hp-scannable 2011-02-16 13:02:45.000000000 +0000
+++ system-config-printer-1.3.0/newprinter.py 2011-02-17 09:58:51.867125793 +0000
@@ -971,7 +971,8 @@ class NewPrinterGUI(GtkGUI):
ready (self.NewPrinterWindow)
return
- if (self.device.hp_scannable and
+ if (hasattr (self.device, 'hp_scannable') and
+ self.device.hp_scannable and
not os.access ("/etc/sane.d/dll.d/hpaio", os.R_OK)):
try:
pk = installpackage.PackageKit ()
@@ -2467,15 +2468,6 @@ class NewPrinterGUI(GtkGUI):
physicaldevice.add_device (faxdev)
physicaldevice.set_data ('hp-scannable', True)
- if hp_scannable and not os.access ("/etc/sane.d/dll.d/hpaio",
- os.R_OK):
- try:
- pk = installpackage.PackageKit ()
- xid = self.NewPrinterWindow.window.xid
- pk.InstallPackageName (xid, 0, "libsane-hpaio")
- except:
- pass
-
physicaldevice.set_data ('checked-hplip', True)
device.hp_scannable = physicaldevice.get_data ('hp-scannable')
diff -up system-config-printer-1.3.0/system-config-printer.py.hp-scannable system-config-printer-1.3.0/system-config-printer.py