Ignore:
Timestamp:
2009-09-03T09:29:22+02:00 (15 years ago)
Author:
stoecker
Message:

fix #3377 - patch by xeen - removed deprecated calls

File:
1 edited

Legend:

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

    r2017 r2032  
    9797            done = true;
    9898        } else {
    99             int answer = new ExtendedDialog(Main.parent,
     99            ExtendedDialog ed = new ExtendedDialog(Main.parent,
    100100                    tr("Update"),
    101                     tr("Update the following plugins:\n\n{0}", toUpdateStr.toString()),
    102                     new String[] {tr("Update Plugins"), tr("Cancel")},
    103                     new String[] {"dialogs/refresh.png", "cancel.png"}).getValue();
    104             if (answer == 1) {
     101                    new String[] {tr("Update Plugins"), tr("Cancel")});
     102            ed.setButtonIcons(new String[] {"dialogs/refresh.png", "cancel.png"});
     103            ed.setContent(tr("Update the following plugins:\n\n{0}", toUpdateStr.toString()));
     104            ed.showDialog();
     105
     106            if (ed.getValue() == 1) {
    105107                PluginDownloader.update(toUpdate);
    106108                done = true;
     
    133135        }
    134136        if (!toDownload.isEmpty()) {
    135             int answer = new ExtendedDialog(Main.parent,
     137            ExtendedDialog ed = new ExtendedDialog(Main.parent,
    136138                    tr("Download missing plugins"),
    137                     tr("Download the following plugins?\n\n{0}", msg),
    138                     new String[] {tr("Download Plugins"), tr("Cancel")},
    139                     new String[] {"download.png", "cancel.png"}).getValue();
     139                    new String[] {tr("Download Plugins"), tr("Cancel")});
     140            ed.setButtonIcons(new String[] {"download.png", "cancel.png"});
     141            ed.setContent(tr("Download the following plugins?\n\n{0}", msg));
     142            ed.showDialog();
     143
    140144            Collection<PluginInformation> error =
    141                 (answer != 1 ? toDownload : new PluginDownloader().download(toDownload));
     145                (ed.getValue() != 1 ? toDownload : new PluginDownloader().download(toDownload));
    142146            for (PluginInformation pd : error) {
    143147                pluginMap.put(pd.name, false);
     
    330334                                    name = x[0];
    331335                                    url = x[1];
    332                                     manifest = null;
     336                                    // Is null anyway
     337                                    //manifest = null;
    333338                                }
    334339                            }
Note: See TracChangeset for help on using the changeset viewer.