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

def rapid::rapid::SelectionTreeView::set_status_to_download_pending (   self,
  selected_only,
  thread_id = None 
)

Sets status of files to be download pending, if they are waiting to be downloaded
if selected_only is true, only applies to selected rows

If thread_id is not None, then after the statuses have been set, 
the thread will be restarted (this is intended for the cases
where this method is called from a thread and auto start is True)

Returns a list of threads which can be downloaded

Definition at line 4272 of file rapid.py.

04272                                                                            :
        """
        Sets status of files to be download pending, if they are waiting to be downloaded
        if selected_only is true, only applies to selected rows
        
        If thread_id is not None, then after the statuses have been set, 
        the thread will be restarted (this is intended for the cases
        where this method is called from a thread and auto start is True)
        
        Returns a list of threads which can be downloaded
        """
        threads = []
        
        if selected_only:
            for iter in self.get_tree_row_iters(selected_only = True):
                self._set_download_pending(iter, threads)
        else:
            for iter in self.get_tree_row_iters():
                apply = True                
                if thread_id is not None:
                    t = self.get_thread(iter)
                    apply = t == thread_id
                if apply:                
                    self._set_download_pending(iter, threads)
                
            if thread_id is not None:
                # restart the thread
                workers[thread_id].startStop()
        return threads
                
    def update_status_post_download(self, treerowref):


Generated by  Doxygen 1.6.0   Back to index