- Timestamp:
- 2017-05-18T20:38:56+12:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/gli/src/org/greenstone/gatherer/download/DownloadScrollPane.java
r18221 r31692 44 44 import javax.swing.tree.*; 45 45 import org.greenstone.gatherer.*; 46 import org.greenstone.gatherer.util.SafeProcess; 46 47 47 48 /** This class provides access to the functionality of the WGet program, either by calling it via a shell script or by the JNI. It maintains a queue of pending jobs, and the component for showing these tasks to the user. … … 78 79 } 79 80 80 public void deleteDownloadJob(DownloadJob delete_me) { 81 /** 82 * To be used with DownloadJob.java's old_callDownload() and old_actionPerformed() 83 * OR by uncommenting the "synchronized(this)" section in Download.java at the end of 84 * its new callDownload() along with commenting out "mummy.deleteCurrentDownloadJob(this);" 85 * in Download.java's doneCleanup(). 86 */ 87 public void old_deleteDownloadJob(DownloadJob delete_me) { 81 88 if (delete_me == job) { 82 89 try { … … 86 93 synchronized(delete_me) { 87 94 if (!delete_me.hasSignalledStop()) { // don't wait if DownloadJob.COMPLETED 95 ///SafeProcess.log("**************** download scrollpane waiting for downloadjob to stop"); 88 96 delete_me.wait(); 89 97 } … … 93 101 } 94 102 } 103 104 ///System.err.println("**************** Deleting job from download scroll pane"); 95 105 // Close button pressed, get rid of this download's dedicated pane 96 106 finishedDownloadJob(delete_me, true); 97 107 } 108 109 /** 110 * If called to delete the current download job, this method won't do anything. 111 * But if called on any inactive download job, its display is removed. 112 */ 113 public void deleteDownloadJob(DownloadJob delete_me) { 114 if (delete_me != job) { 115 116 SafeProcess.log("**************** Deleting job from download scroll pane"); 117 // Close button pressed, get rid of this download's dedicated pane 118 finishedDownloadJob(delete_me, true); 119 } // else don't do anything, we'll be contacted again when the current job can be deleted 120 121 } 122 123 /** 124 * To be called when we're ready to delete the current download job, 125 * else this method won't do anything 126 */ 127 public void deleteCurrentDownloadJob(DownloadJob delete_me) { 128 if (delete_me == job) { 129 SafeProcess.log("**************** Deleting current job from download scroll pane"); 130 // Close button pressed, get rid of this download's dedicated pane 131 finishedDownloadJob(delete_me, true); 132 } 133 } 134 98 135 99 136 /** To be called when a download job has terminated naturally or was prematurely stopped
Note:
See TracChangeset
for help on using the changeset viewer.