Changeset 2389 in josm
- Timestamp:
- 2009-11-03T05:32:40+01:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/help/HelpUtil.java
r2347 r2389 12 12 13 13 import org.openstreetmap.josm.Main; 14 import org.openstreetmap.josm.actions.HelpAction; 14 15 import org.openstreetmap.josm.tools.LanguageInfo; 15 16 … … 205 206 206 207 /** 208 * Replies the global help action, if available. Otherwise, creates an instance 209 * of {@see HelpAction}. 210 * 211 * @return 212 */ 213 static private Action getHelpAction() { 214 try { 215 return Main.main.menu.help; 216 } catch(NullPointerException e) { 217 return new HelpAction(); 218 } 219 } 220 221 /** 207 222 * Makes a component aware of context sensitive help. 208 223 * … … 210 225 * code. Example: /Dialog/RelationEditor is a relative help topic, /De:Help/Dialog/RelationEditor 211 226 * is not. 212 * 227 * 213 228 * @param component the component the component 214 229 * @param topic the help topic. Set to the default help topic if null. … … 219 234 } 220 235 component.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke("F1"), "help"); 221 component.getActionMap().put("help", Main.main.menu.help);236 component.getActionMap().put("help", getHelpAction()); 222 237 component.putClientProperty("help", relativeHelpTopic); 223 238 } -
trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java
r2372 r2389 2 2 package org.openstreetmap.josm.plugins; 3 3 4 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 4 5 import static org.openstreetmap.josm.tools.I18n.tr; 5 6 … … 13 14 import java.util.Collection; 14 15 import java.util.Collections; 15 import java.util.HashMap;16 16 import java.util.LinkedList; 17 17 import java.util.List; 18 import java.util.Map;19 18 import java.util.SortedMap; 20 19 import java.util.TreeMap; … … 33 32 34 33 import org.openstreetmap.josm.Main; 35 import org.openstreetmap.josm.actions.AboutAction;36 34 import org.openstreetmap.josm.data.Version; 37 35 import org.openstreetmap.josm.gui.ExtendedDialog; … … 101 99 if(Main.pref.getInteger("pluginmanager.version", 0) < v) 102 100 { 103 doUpdate = tr("You updated your JOSM software \nTo prevent problems the plugins should be updated as well.\n"101 doUpdate = tr("You updated your JOSM software.\nTo prevent problems the plugins should be updated as well.\n" 104 102 + "Update plugins now?"); 105 103 check = "pluginmanger.version"; … … 128 126 dialog.toggleEnable(check); 129 127 dialog.setButtonIcons( new String[] {"dialogs/refresh.png", "cancel.png"}); 128 dialog.configureContextsensitiveHelp(ht("/Plugin/AutomaticUpdate"), true /* show help button */); 130 129 dialog.showDialog(); 131 if(dialog.getValue() == 1) 130 if(dialog.getValue() == 1) { 132 131 new PluginSelection().update(); 132 } 133 133 } 134 134 }
Note:
See TracChangeset
for help on using the changeset viewer.