Changeset 2259 in josm for trunk/src/org/openstreetmap/josm/plugins
- Timestamp:
- 2009-10-09T22:58:14+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
r2070 r2259 62 62 "lang-ru", "ewmsplugin", "ywms", "tways-0.2", "geotagged", "landsat", 63 63 "namefinder", "waypoints", "slippy_map_chooser", "tcx-support"}; 64 String [] unmaintained = new String[] {"multipoly", "gpsbabelgui", 65 "Intersect_way"}; 64 66 for (String p : oldplugins) { 65 67 if (plugins.contains(p)) { … … 73 75 ); 74 76 } 77 } 78 for (String p : unmaintained) { 79 if (plugins.contains(p) && disablePlugin(tr("<html>Loading of {0} plugin was requested." 80 +"<br>This plugin is no longer developed and very likely will produce errors." 81 +"<br>It should be disabled.<br>Delete from preferences?</html>", p), p)) 82 plugins.remove(p); 75 83 } 76 84 … … 171 179 } catch (Throwable e) { 172 180 e.printStackTrace(); 173 ExtendedDialog dialog = new ExtendedDialog( 174 Main.parent, 175 tr("Disable plugin"), 176 new String[] {tr("Disable plugin"), tr("Keep plugin")} 177 ); 178 dialog.setContent(tr("Could not load plugin {0}. Delete from preferences?", info.name)); 179 dialog.setButtonIcons( new String[] {"dialogs/delete.png", "cancel.png"}); 180 dialog.showDialog(); 181 int result = dialog.getValue(); 182 183 if(result == 1) 184 { 185 plugins.remove(info.name); 186 Main.pref.removeFromCollection("plugins", info.name); 187 } 188 } 189 } 190 } 191 } 181 disablePlugin(tr("Could not load plugin {0}. Delete from preferences?", info.name), info.name); 182 } 183 } 184 } 185 } 186 public static boolean disablePlugin(String reason, String name) 187 { 188 ExtendedDialog dialog = new ExtendedDialog( 189 Main.parent, 190 tr("Disable plugin"), 191 new String[] {tr("Disable plugin"), tr("Keep plugin")} 192 ); 193 dialog.setContent(reason); 194 dialog.setButtonIcons( new String[] {"dialogs/delete.png", "cancel.png"}); 195 dialog.showDialog(); 196 int result = dialog.getValue(); 197 198 if(result == 1) 199 { 200 Main.pref.removeFromCollection("plugins", name); 201 return true; 202 } 203 return false; 204 } 205 192 206 public static void setMapFrame(MapFrame old, MapFrame map) { 193 207 for (PluginProxy plugin : pluginList) {
Note:
See TracChangeset
for help on using the changeset viewer.