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/actions/search/SelectionWebsiteLoader.java

    r1670 r1811  
    3939    }
    4040    @Override protected void realRun() {
    41         Main.pleaseWaitDlg.currentAction.setText(tr("Contact {0}...", url.getHost()));
     41        progressMonitor.setTicksCount(2);
    4242        sel = mode != SearchAction.SearchMode.remove ? new LinkedList<OsmPrimitive>() : Main.ds.allNonDeletedPrimitives();
    4343        try {
    4444            URLConnection con = url.openConnection();
    45             InputStream in = new ProgressInputStream(con, Main.pleaseWaitDlg);
    46             Main.pleaseWaitDlg.currentAction.setText(tr("Downloading..."));
     45            progressMonitor.subTask(tr("Contact {0}...", url.getHost()));
     46            InputStream in = new ProgressInputStream(con, progressMonitor.createSubTaskMonitor(1, true));
     47            progressMonitor.subTask(tr("Downloading..."));
    4748            Map<Long, String> ids = idReader.parseIds(in);
    4849            for (OsmPrimitive osm : Main.ds.allNonDeletedPrimitives()) {
     
    5556                }
    5657            }
     58            progressMonitor.worked(1);
    5759        } catch (IOException e) {
    5860            e.printStackTrace();
Note: See TracChangeset for help on using the changeset viewer.