Changeset 1397 in josm for trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
- Timestamp:
- 2009-02-14T12:25:54+01:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
r1390 r1397 34 34 import org.openstreetmap.josm.gui.MapFrame; 35 35 import org.openstreetmap.josm.gui.download.DownloadSelection; 36 import org.openstreetmap.josm.gui.ExtendedDialog; 36 37 import org.openstreetmap.josm.gui.preferences.PreferenceSetting; 37 38 import org.openstreetmap.josm.tools.GBC; … … 150 151 } catch (Throwable e) { 151 152 e.printStackTrace(); 152 if(JOptionPane.showConfirmDialog(Main.parent, 153 tr("Could not load plugin {0}. Delete from preferences?", 154 info.name), tr("Disable plugin"), 155 JOptionPane.YES_NO_OPTION) == JOptionPane.OK_OPTION) 153 154 int result = new ExtendedDialog(Main.parent, 155 tr("Disable plugin"), 156 tr("Could not load plugin {0}. Delete from preferences?", info.name), 157 new String[] {tr("Disable plugin"), tr("Cancel")}, 158 new String[] {"dialogs/delete.png", "cancel.png"}).getValue(); 159 160 if(result == 1) 156 161 { 157 162 plugins.remove(info.name); … … 247 252 248 253 if (plugin != null) { 249 int answer = JOptionPane.showConfirmDialog( 250 Main.parent, tr("An unexpected exception occurred that may have come from the ''{0}'' plugin.", 251 plugin.info.name) + "\n"+ (plugin.info.author != null ? 252 tr("According to the information within the plugin, the author is {0}.", 253 plugin.info.author) : "") + "\n" + 254 tr("Try updating to the newest version of this plugin before reporting a bug.") + "\n" + 255 tr("Should the plugin be disabled?"), 256 tr("Disable plugin"), 257 JOptionPane.YES_NO_OPTION); 258 if (answer == JOptionPane.OK_OPTION) { 254 int answer = new ExtendedDialog(Main.parent, 255 tr("Disable plugin"), 256 tr("An unexpected exception occurred that may have come from the ''{0}'' plugin.", plugin.info.name) 257 + "\n" 258 + (plugin.info.author != null 259 ? tr("According to the information within the plugin, the author is {0}.", plugin.info.author) 260 : "") 261 + "\n" 262 + tr("Try updating to the newest version of this plugin before reporting a bug.") 263 + "\n" 264 + tr("Should the plugin be disabled?"), 265 new String[] {tr("Disable plugin"), tr("Cancel")}, 266 new String[] {"dialogs/delete.png", "cancel.png"}).getValue(); 267 if (answer == 1) { 259 268 LinkedList<String> plugins = new LinkedList<String>(Arrays.asList(Main.pref.get("plugins").split(","))); 260 269 if (plugins.contains(plugin.info.name)) {
Note:
See TracChangeset
for help on using the changeset viewer.