Changeset 5833


Ignore:
Timestamp:
2003-11-13T13:57:27+13:00 (21 years ago)
Author:
mdewsnip
Message:

Fixed file copying bug where only the first file was copied because the action was being cancelled after the first file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/file/FileQueue.java

    r5785 r5833  
    5959    private boolean return_immediately = false;
    6060    /** We are only allowed to wait under specific circumstances. */
    61     private boolean wait_allowed = true;
     61    /* private boolean wait_allowed = true; */
    6262    /** true if the user has selected yes to all from a file 'clash' dialog. */
    6363    private boolean yes_to_all = false;
     
    175175    return file_status;
    176176    }
    177     /** Access to the job state label. */
    178 //      public JLabel getJobStatus() {
    179 //      return job_status;
    180 //      }
     177
    181178    /** Access to the progress bar. */
    182179    public LongProgressBar getProgress() {
    183180    return progress;
    184181    }
    185     /** Prevent the progress bar updating momentarily, while the progress bar size is re-adjusted. */
     182    /** Prevent the progress bar updating momentarily, while its size is re-adjusted. */
    186183    public void pause() {
    187184    progress.setIndeterminate(true);
     
    204201        int position = queue.size() - 1;
    205202        FileJob job = removeJob(position);
    206         if(job != null) {
     203        if (job != null) {
    207204            ///ystem.err.println("Found job: " + job);
    208205            // The user can cancel this individual action at several places, so keep track if the state is 'ready' for the next step.
     
    259256                    break;
    260257                case 3: // No To All
    261                    cancel_action = true;
     258                    cancel_action = true;
    262259                case 2: // No
    263260                default:
    264                    ready = false;
    265                    // Increment progress by size of potentially copied file
    266                    progress.addValue(origin_node.getFile().length());
     261                    ready = false;
     262                    // Increment progress by size of potentially copied file
     263                    progress.addValue(origin_node.getFile().length());
    267264                }
    268265                }
     
    435432                // Otherwise if it came from the workspace use the MSMs parsers to search for folder level metadata (such as metadata.xml or marc records).
    436433                else if (job.source.toString().equals("Workspace")) {
    437                     cancel_action = Gatherer.c_man.getCollection().msm.searchForMetadata(new_node, origin_node, job.folder_level);
     434                    cancel_action = !Gatherer.c_man.getCollection().msm.searchForMetadata(new_node, origin_node, job.folder_level);
    438435                }
    439436                }
     
    639636    }
    640637    } */
     638
    641639    /** Called when the user makes some selection in one of the trees we are listening to. From this we update the status details. */
    642640    public void valueChanged(TreeSelectionEvent event) {
Note: See TracChangeset for help on using the changeset viewer.