Ignore:
Timestamp:
2017-06-02T17:14:00+12:00 (7 years ago)
Author:
ak19
Message:
  1. GLI's DownloadJobs don't allow pausing and resuming (the button used to work, but didn't ever pause/resume in the background, at least it's been stopping the wget download activity after wget related changes from some years back). Changing the Pause/Resume button in the DownloadProgressBar to the Stop/Stopped button. 2. Added another useful link on InterruptedException to SafeProgress and its documentation.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/gli/src/org/greenstone/gatherer/download/DownloadProgressBar.java

    r31692 r31720  
    132132    // However, now we additionally ensure that the wget launched by the perl is stopped before
    133133    // process.destroy(), so at least it cleans up better. I'm therefore changing it to a "Stop" button.
    134     stop_start_button = new GLIButton(Dictionary.get("Mirroring.DownloadJob.Pause"),Dictionary.get("Mirroring.DownloadJob.Pause_Tooltip"));
    135     //stop_start_button = new GLIButton(Dictionary.get("Mirroring.DownloadJob.Stop"),Dictionary.get("Mirroring.DownloadJob.Stop_Tooltip"));
     134    stop_start_button = new GLIButton(Dictionary.get("Mirroring.DownloadJob.Stop"),Dictionary.get("Mirroring.DownloadJob.Stop_Tooltip"));
    136135    stop_start_button.addActionListener(this);
    137136    stop_start_button.addActionListener(owner);
     
    189188        if (current_action == DownloadJob.RUNNING) {
    190189        current_action = DownloadJob.STOPPED;
    191                 stop_start_button.setText(Dictionary.get("Mirroring.DownloadJob.Resume"));
    192                 stop_start_button.setToolTipText(Dictionary.get("Mirroring.DownloadJob.Resume_Tooltip"));
     190                stop_start_button.setText(Dictionary.get("Mirroring.DownloadJob.Stopped"));
     191                stop_start_button.setToolTipText(Dictionary.get("Mirroring.DownloadJob.Stopped_Tooltip"));
    193192           
    194193        progress.setString(Dictionary.get("Mirroring.DownloadJob.Download_Stopped"));
    195194        progress.setIndeterminate(false);
    196         } else {
    197         current_action = DownloadJob.RUNNING;
    198         // we are stopped, so restart
    199                 stop_start_button.setText(Dictionary.get("Mirroring.DownloadJob.Pause"));
    200                 stop_start_button.setToolTipText(Dictionary.get("Mirroring.DownloadJob.Pause_Tooltip"));
    201         progress.setString(Dictionary.get("Mirroring.DownloadJob.Download_Progress"));
    202         progress.setIndeterminate(true);
     195        stop_start_button.setEnabled(false);
    203196        }
    204197    }
Note: See TracChangeset for help on using the changeset viewer.