~ubuntu-branches/ubuntu/raring/hplip/raring-proposed

« back to all changes in this revision

Viewing changes to copier/copier.py

  • Committer: Package Import Robot
  • Author(s): Mark Purcell
  • Date: 2012-05-26 11:20:39 UTC
  • mfrom: (1.5.6) (31.1.3 precise)
  • Revision ID: package-import@ubuntu.com-20120526112039-bevxczegxnbyr5m7
Tags: 3.12.4-1
* New upstream release
* Switch to source/format 3.0 (quilt) - drop dpatch
* Refreshed debian/patches
* dh_autoreconf debian/autogen.sh & set local-options single-debian-patch
* Update to debian/compat -> 9
* Fix "hardened build flags" patch from Moritz - thanks (Closes: #667828)
* Fix "duplex descriptor uninitialized" patch from Matej (Closes: #583273)
* Fix "please migrate to kde-runtime" patch from Pino (Closes: #666544)

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
    def copy(self, num_copies=1, contrast=0, reduction=100,
61
61
             quality=pml.COPIER_QUALITY_NORMAL, 
62
62
             fit_to_page=pml.COPIER_FIT_TO_PAGE_ENABLED,
63
 
             scan_style=SCAN_STYLE_FLATBED,
 
63
             scan_src=SCAN_SRC_FLATBED,
64
64
             update_queue=None, event_queue=None): 
65
65
 
66
66
        if not self.isCopyActive():
67
67
            self.copy_thread = PMLCopyThread(self, num_copies, contrast, reduction, quality, 
68
 
                                             fit_to_page, scan_style, update_queue, event_queue)
 
68
                                             fit_to_page, scan_src, update_queue, event_queue)
69
69
            self.copy_thread.start()
70
70
            return True
71
71
        else:
87
87
 
88
88
class PMLCopyThread(threading.Thread):
89
89
    def __init__(self, dev, num_copies, contrast, reduction, quality, 
90
 
                 fit_to_page, scan_style, 
 
90
                 fit_to_page, scan_src, 
91
91
                 update_queue=None, event_queue=None):
92
92
 
93
93
        threading.Thread.__init__(self)
97
97
        self.reduction = reduction
98
98
        self.quality = quality
99
99
        self.fit_to_page = fit_to_page
100
 
        self.scan_style = scan_style
 
100
        self.scan_src = scan_src
101
101
        self.event_queue = event_queue
102
102
        self.update_queue = update_queue
103
103
        self.prev_update = ''
223
223
                    self.dev.setPML(pml.OID_COPIER_JOB_QUALITY, self.quality)
224
224
 
225
225
                    # fit_to_page
226
 
                    if self.scan_style == SCAN_STYLE_FLATBED:
 
226
                    if self.scan_src == SCAN_SRC_FLATBED:
227
227
                        self.dev.setPML(pml.OID_COPIER_JOB_FIT_TO_PAGE, self.fit_to_page)
228
228
 
229
229
                else: # AiO