Changeset 2372 in josm for trunk/src/org/openstreetmap/josm/plugins/PluginDownloader.java
- Timestamp:
- 2009-11-01T14:14:52+01:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/plugins/PluginDownloader.java
r2358 r2372 39 39 private String errors = ""; 40 40 private int count = 0; 41 private boolean restart; 41 42 42 private UpdateTask(Collection<PluginInformation> toUpdate, boolean up) { 43 private UpdateTask(Collection<PluginInformation> toUpdate, boolean up, boolean restart) { 43 44 super(up ? tr("Update Plugins") : tr("Download Plugins")); 44 45 this.toUpdate = toUpdate; 46 this.restart = restart; 45 47 } 46 48 … … 58 60 ); 59 61 } else { 62 String txt = trn("{0} Plugin successfully downloaded.", "{0} Plugins successfully downloaded.", count, count); 63 if(restart) 64 txt += "\n"+tr("Please restart JOSM."); 65 60 66 JOptionPane.showMessageDialog( 61 67 Main.parent, 62 t rn("{0} Plugin successfully downloaded. Please restart JOSM.", "{0} Plugins successfully downloaded. Please restart JOSM.", count, count),68 txt, 63 69 tr("Information"), 64 70 JOptionPane.INFORMATION_MESSAGE … … 154 160 } 155 161 156 public static void update(Collection<PluginInformation> update) { 157 Main.worker.execute(new UpdateTask(update, true)); 162 public static void update(Collection<PluginInformation> update, boolean restart) { 163 Main.worker.execute(new UpdateTask(update, true, restart)); 158 164 } 159 165 … … 162 168 // Waiting for result is not a good idea because the waiting thread will probably be either EDT 163 169 // or worker thread. Blocking one of these threads will cause deadlock 164 UpdateTask t = new UpdateTask(download, false); 170 UpdateTask t = new UpdateTask(download, false, true); 165 171 t.run(); 166 172 return t.failed;
Note:
See TracChangeset
for help on using the changeset viewer.
