Ticket #1915: context_help_menu.diff
| File context_help_menu.diff, 1.4 KB (added by , 17 years ago) |
|---|
-
src/org/openstreetmap/josm/actions/HelpAction.java
133 133 private String contextSensitiveHelp(Object c) { 134 134 if (c instanceof Helpful) 135 135 return ((Helpful)c).helpTopic(); 136 if (c instanceof JMenu)137 return "Menu/"+((JMenu)c).getText(); 136 /* if (c instanceof JMenu) 137 return "Menu/"+((JMenu)c).getText();*/ 138 138 if (c instanceof AbstractButton) { 139 139 AbstractButton b = (AbstractButton)c; 140 140 if (b.getClientProperty("help") != null) -
src/org/openstreetmap/josm/gui/MainMenu.java
163 163 public void add(JMenu menu, int mnemonicKey, String shortName) { 164 164 Shortcut.registerShortcut("menu:" + shortName, tr("Menu: {0}", menu.getText()), mnemonicKey, 165 165 Shortcut.GROUP_MNEMONIC).setMnemonic(menu); 166 167 char initialChar = shortName.charAt(0); 168 String helpText = Character.toUpperCase(initialChar)+shortName.substring(1); 169 170 menu.putClientProperty("help", "Menu/"+helpText); 166 171 add(menu); 167 172 } 168 173
