- Timestamp:
- 2009-07-25T13:12:33+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
r1748 r1837 12 12 import java.util.Arrays; 13 13 import java.util.Collection; 14 import java.util.Collections; 14 15 import java.util.LinkedList; 15 16 import java.util.List; … … 256 257 new String[] {"dialogs/delete.png", "cancel.png"}).getValue(); 257 258 if (answer == 1) { 258 Li nkedList<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())); 259 260 if (plugins.contains(plugin.info.name)) { 260 261 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); 267 263 JOptionPane.showMessageDialog(Main.parent, 268 264 tr("The plugin has been removed from the configuration. Please restart JOSM to unload the plugin.")); 269 265 } else { 270 266 JOptionPane.showMessageDialog(Main.parent, 271 tr("The plugin could not be removed. P lease tell the people you got JOSM from about the problem."));267 tr("The plugin could not be removed. Probably it was already disabled")); 272 268 } 273 269 return true;
Note:
See TracChangeset
for help on using the changeset viewer.