Changeset 1182 in josm for trunk/src/org
- Timestamp:
- 2008-12-27T00:09:20+01:00 (16 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/JosmAction.java
r1180 r1182 1 1 // License: GPL. Copyright 2007 by Immanuel Scholz and others 2 2 package org.openstreetmap.josm.actions; 3 4 import static org.openstreetmap.josm.tools.I18n.tr; 3 5 4 6 import java.awt.event.InputEvent; … … 29 31 public Shortcut getShortcut() { 30 32 if (sc == null) { 31 sc = Shortcut.registerShortcut("core:none", "No Shortcut", 0, Shortcut.GROUP_NONE); 32 sc.setAutomatic(); // as this shortcut is shared by all action that don't want to have a shortcut, 33 // we shouldn't allow the user to change it... 33 sc = Shortcut.registerShortcut("core:none", tr("No Shortcut"), 0, Shortcut.GROUP_NONE); 34 // as this shortcut is shared by all action that don't want to have a shortcut, 35 // we shouldn't allow the user to change it... 36 // this is handled by special name "core:none" 34 37 } 35 38 return sc; -
trunk/src/org/openstreetmap/josm/command/ChangePropertyCommand.java
r1169 r1182 89 89 90 90 @Override public MutableTreeNode description() { 91 String text = value == null ? tr( "Remove \"{0}\" for", key) : tr("Set {0}={1} for",key,value);91 String text; 92 92 if (objects.size() == 1) { 93 93 NameVisitor v = new NameVisitor(); 94 94 objects.iterator().next().visit(v); 95 text += " "+tr(v.className)+" "+v.name; 96 } else 97 text += " "+objects.size()+" "+trn("object","objects",objects.size()); 95 text = value == null 96 ? tr("Remove \"{0}\" for {1} ''{2}''", key, tr(v.className), v.name) 97 : tr("Set {0}={1} for {1} ''{2}''",key,value, tr(v.className), v.name); 98 } 99 else 100 { 101 text = value == null 102 ? tr("Remove \"{0}\" for {1} {2}", key, objects.size(), trn("object","objects",objects.size())) 103 : tr("Set {0}={1} for {1} {2}",key,value, objects.size(), trn("object","objects",objects.size())); 104 } 98 105 DefaultMutableTreeNode root = new DefaultMutableTreeNode(new JLabel(text, ImageProvider.get("data", "key"), JLabel.HORIZONTAL)); 99 106 if (objects.size() == 1) -
trunk/src/org/openstreetmap/josm/gui/preferences/prefJPanel.java
r1169 r1182 392 392 tfKey.setSelectedItem(keyList.get(-1)); 393 393 } 394 if (sc. getAutomatic()) {394 if (sc.isChangeable()) { 395 395 panel.cbDefault.setEnabled(false); 396 396 panel.cbDisable.setEnabled(false); -
trunk/src/org/openstreetmap/josm/tools/Shortcut.java
r1169 r1182 101 101 } 102 102 103 public boolean isChangeable() { 104 return !automatic && !shortText.equals("core:none"); 105 } 106 103 107 private boolean getReset() { 104 108 return reset;
Note:
See TracChangeset
for help on using the changeset viewer.