diff options
author | Didier Raboud <odyx@debian.org> | 2016-01-04 16:47:50 +0100 |
---|---|---|
committer | Didier Raboud <odyx@debian.org> | 2016-01-04 16:47:50 +0100 |
commit | 98edb6065e3de2c6645f43ac36bbad5250399be3 (patch) | |
tree | 2bfe2bcb8aba0522bbbf1dda99756c7c97eb561c /ui | |
parent | cbf704ce66be244a56ed60067ae5c9c4ad32f24a (diff) |
Imported Upstream version 2.8.7
Diffstat (limited to 'ui')
-rw-r--r-- | ui/devmgr4.py | 12 | ||||
-rw-r--r-- | ui/faxsendjobform.py | 11 |
2 files changed, 15 insertions, 8 deletions
diff --git a/ui/devmgr4.py b/ui/devmgr4.py index 2c2651dfa..2bc2060af 100644 --- a/ui/devmgr4.py +++ b/ui/devmgr4.py @@ -1574,21 +1574,21 @@ class DevMgr4(DevMgr4_base): def downloadFirmware(self): d = self.cur_device - fail = True + ok = False try: QApplication.setOverrideCursor(QApplication.waitCursor) d.open() if d.isIdleAndNoError(): - fail = d.downloadFirmware() - - if fail: - self.FailureUI(self.__tr("<b>An error occured downloading firmware file.</b><p>Please check your printer and ensure that the HPLIP plugin has been installed.")) - + ok = d.downloadFirmware() + finally: d.close() QApplication.restoreOverrideCursor() + + if not ok: + self.FailureUI(self.__tr("<b>An error occured downloading firmware file.</b><p>Please check your printer and ensure that the HPLIP plugin has been installed.")) def CheckDeviceUI(self): diff --git a/ui/faxsendjobform.py b/ui/faxsendjobform.py index e9ba8abc1..2b620ed7d 100644 --- a/ui/faxsendjobform.py +++ b/ui/faxsendjobform.py @@ -102,10 +102,13 @@ class FaxSendJobForm(QMainWindow): if not self.device_uri and not self.printer_name: t = device.probeDevices(bus=bus, filter={'fax-type':(operator.gt, FAX_TYPE_NONE)}) + #print t probed_devices = [] for d in t: probed_devices.append(d.replace('hp:/', 'hpfax:/')) + + #print probed_devices probed_devices = utils.uniqueList(probed_devices) log.debug(probed_devices) @@ -115,15 +118,19 @@ class FaxSendJobForm(QMainWindow): for d in probed_devices: printers = [] for p in self.cups_printers: + #print p.device_uri, d if p.device_uri == d: + #print "OK" printers.append(p.name) devices[x] = (d, printers) - #x += 1 + x += 1 max_deviceid_size = max(len(d), max_deviceid_size) x = len(devices) + #print devices + if x == 0: from nodevicesform import NoDevicesForm self.FailureUI(self.__tr("<p><b>No devices found.</b><p>Please make sure your device is properly installed and try again.")) @@ -194,7 +201,7 @@ class FaxSendJobForm(QMainWindow): def closeEvent(self, event): #print "close" - print self.FaxView.lock_file + #print self.FaxView.lock_file utils.unlock(self.FaxView.lock_file) event.accept() |