Changeset 3247 in josm for trunk/src/org/openstreetmap/josm/tools/Shortcut.java
- Timestamp:
- 2010-05-15T10:37:03+02:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/Shortcut.java
r3135 r3247 5 5 6 6 import java.awt.event.KeyEvent; 7 import java.util. Collection;7 import java.util.ArrayList; 8 8 import java.util.HashMap; 9 9 import java.util.LinkedHashMap; 10 import java.util.List; 10 11 import java.util.Map; 11 12 … … 231 232 * FOR PREF PANE ONLY 232 233 */ 233 public static Collection<Shortcut> listAll() {234 return shortcuts.values();234 public static List<Shortcut> listAll() { 235 return new ArrayList<Shortcut>(shortcuts.values()); 235 236 } 236 237 … … 313 314 314 315 // shutdown handling 315 public static voidsavePrefs() {316 public static boolean savePrefs() { 316 317 // we save this directly from the preferences pane, so don't overwrite these values here 317 318 // for (int i = GROUP_NONE; i < GROUP__MAX+GROUPS_ALT2; i++) { 318 319 // Main.pref.put("shortcut.groups."+i, Groups.get(i).toString()); 319 320 // } 321 boolean changed = false; 320 322 int i = 0; 321 323 for (Shortcut sc : shortcuts.values()) { 322 324 // TODO: Remove sc.getAssignedUser() when we fixed all internal conflicts 323 325 if (!sc.getAutomatic() && !sc.getReset() && sc.getAssignedUser()) { 324 Main.pref.put("shortcut.shortcut."+i, sc.asPrefString());326 changed = changed | Main.pref.put("shortcut.shortcut."+i, sc.asPrefString()); 325 327 i++; 326 328 } 327 329 } 328 Main.pref.put("shortcut.shortcut."+i, ""); 330 changed = changed | Main.pref.put("shortcut.shortcut."+i, ""); 331 return changed; 329 332 } 330 333 … … 465 468 * 'Ctrl-C' on windows or 'Meta-C' on a Mac. null, if the platform specific 466 469 * copy command isn't known. 467 * 470 * 468 471 * @return the platform specific key stroke for the 'Copy' command 469 472 */ … … 478 481 * 'Ctrl-V' on windows or 'Meta-V' on a Mac. null, if the platform specific 479 482 * paste command isn't known. 480 * 483 * 481 484 * @return the platform specific key stroke for the 'Paste' command 482 485 */ … … 491 494 * 'Ctrl-X' on windows or 'Meta-X' on a Mac. null, if the platform specific 492 495 * 'Cut' command isn't known. 493 * 496 * 494 497 * @return the platform specific key stroke for the 'Cut' command 495 498 */
Note:
See TracChangeset
for help on using the changeset viewer.