Logo Search packages:      
Sourcecode: rapid-photo-downloader version File versions  Download package

def rapid::rapid::SelectionTreeView::job_code_missing (   self,
  selected_only 
)

Returns True if any of the pending downloads do not have a 
job code assigned.

If selected_only is True, will only check in rows that the 
user has selected.

Definition at line 4220 of file rapid.py.

04220                                              :
        """
        Returns True if any of the pending downloads do not have a 
        job code assigned.
        
        If selected_only is True, will only check in rows that the 
        user has selected.
        """
        
        def _job_code_missing(iter):
            status = self.get_status(iter)
            if status in [STATUS_WARNING, STATUS_NOT_DOWNLOADED]:
                is_image = self.get_is_image(iter)
                job_code = self.get_job_code(iter)
                return needAJobCode.needAJobCode(job_code, is_image)
            return False
        
        self._setUsesJobCode()
        needAJobCode = NeedAJobCode(self.rapidApp.prefs)
        
        v = False
        if selected_only:
            selection = self.get_selection()
            model, pathlist = selection.get_selected_rows()
            for path in pathlist:
                iter = self.liststore.get_iter(path)
                v = _job_code_missing(iter)
                if v:
                    break
        else:
            iter = self.liststore.get_iter_first()
            while iter:
                v = _job_code_missing(iter)
                if v:
                    break
                iter = self.liststore.iter_next(iter)
        return v

    
    def _set_download_pending(self, iter, threads):


Generated by  Doxygen 1.6.0   Back to index