hplip/simple-scan-as-default.dpatch
2013-08-26 10:37:49 +04:00

49 lines
1.5 KiB
Text

#! /bin/sh /usr/share/dpatch/dpatch-run
## simple-scan-as-default.dpatch by <till.kamppeter@gmail.com>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.
@DPATCH@
--- a/base/utils.py
+++ b/base/utils.py
@@ -550,18 +550,21 @@
# Scan
self.cmd_scan = ''
- path = which('xsane')
-
+ path = which('simple-scan')
if len(path) > 0:
- self.cmd_scan = 'xsane -V %SANE_URI%'
+ self.cmd_scan = 'simple-scan %SANE_URI%'
else:
- path = which('kooka')
+ path = which('xsane')
if len(path) > 0:
- self.cmd_scan = 'kooka'
+ self.cmd_scan = 'xsane -V %SANE_URI%'
else:
- path = which('xscanimage')
+ path = which('kooka')
if len(path) > 0:
- self.cmd_scan = 'xscanimage'
+ self.cmd_scan = 'kooka'
+ else:
+ path = which('xscanimage')
+ if len(path) > 0:
+ self.cmd_scan = 'xscanimage'
# Photo Card
path = which('hp-unload')
--- a/ui4/ui_utils.py
+++ b/ui4/ui_utils.py
@@ -141,7 +141,7 @@
def loadDefaults(self):
- self.cmd_scan = self.__setup(['xsane -V %SANE_URI%', 'kooka', 'xscanimage'])
+ self.cmd_scan = self.__setup(['simple-scan %SANE_URI%', 'xsane -V %SANE_URI%', 'kooka', 'xscanimage'])
self.cmd_fab = self.__setup(['hp-fab'])