Ignore:
Timestamp:
2009-07-19T17:38:55+02:00 (15 years ago)
Author:
jttt
Message:

PleaseWait refactoring. Progress is now reported using ProgressMonitor interface, that is available through PleaseWaitRunnable.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/plugins/PluginDownloader.java

    r1791 r1811  
    4949
    5050        @Override protected void finish() {
    51             Main.pleaseWaitDlg.setVisible(false);
    5251            if (errors.length() > 0)
    5352                JOptionPane.showMessageDialog(Main.parent, tr("There were problems with the following plugins:\n\n {0}",errors));
     
    6059            if (!pluginDir.exists())
    6160                pluginDir.mkdirs();
    62             Main.pleaseWaitDlg.progress.setMaximum(toUpdate.size());
    63             int progressValue = 0;
     61            progressMonitor.setTicksCount(toUpdate.size());
    6462            for (PluginInformation d : toUpdate) {
    65                 Main.pleaseWaitDlg.progress.setValue(progressValue++);
    66                 Main.pleaseWaitDlg.currentAction.setText(tr("Downloading Plugin {0}...", d.name));
     63                progressMonitor.subTask(tr("Downloading Plugin {0}...", d.name));
     64                progressMonitor.worked(1);
    6765                File pluginFile = new File(pluginDir, d.name + ".jar.new");
    6866                if(download(d, pluginFile))
Note: See TracChangeset for help on using the changeset viewer.