Ignore:
Timestamp:
2009-07-25T13:12:33+02:00 (15 years ago)
Author:
jttt
Message:

Fix #3067

File:
1 edited

Legend:

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

    r1748 r1837  
    1212import java.util.Arrays;
    1313import java.util.Collection;
     14import java.util.Collections;
    1415import java.util.LinkedList;
    1516import java.util.List;
     
    256257                new String[] {"dialogs/delete.png", "cancel.png"}).getValue();
    257258            if (answer == 1) {
    258                 LinkedList<String> plugins = new LinkedList<String>(Arrays.asList(Main.pref.get("plugins").split(",")));
     259                List<String> plugins = new ArrayList<String>(Main.pref.getCollection("plugins", Collections.<String>emptyList()));
    259260                if (plugins.contains(plugin.info.name)) {
    260261                    while (plugins.remove(plugin.info.name)) {}
    261                     String p = "";
    262                     for (String s : plugins)
    263                         p += ","+s;
    264                     if (p.length() > 0)
    265                         p = p.substring(1);
    266                     Main.pref.put("plugins", p);
     262                    Main.pref.putCollection("plugins", plugins);
    267263                    JOptionPane.showMessageDialog(Main.parent,
    268264                    tr("The plugin has been removed from the configuration. Please restart JOSM to unload the plugin."));
    269265                } else {
    270266                    JOptionPane.showMessageDialog(Main.parent,
    271                     tr("The plugin could not be removed. Please tell the people you got JOSM from about the problem."));
     267                    tr("The plugin could not be removed. Probably it was already disabled"));
    272268                }
    273269                return true;
Note: See TracChangeset for help on using the changeset viewer.