- Timestamp:
- 2016-01-02T14:38:01+01:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/DistributeAction.java
r9226 r9258 3 3 4 4 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 import static org.openstreetmap.josm.tools.I18n.marktr;6 5 import static org.openstreetmap.josm.tools.I18n.tr; 7 6 … … 34 33 public final class DistributeAction extends JosmAction { 35 34 36 private static final String ACTION_SHORT_NAME = marktr("Distribute Nodes");37 38 35 /** 39 36 * Constructs a new {@code DistributeAction}. 40 37 */ 41 38 public DistributeAction() { 42 super(tr( ACTION_SHORT_NAME), "distribute",39 super(tr("Distribute Nodes"), "distribute", 43 40 tr("Distribute the selected nodes to equal distances along a line."), 44 Shortcut.registerShortcut("tools:distribute", tr("Tool: {0}", tr( ACTION_SHORT_NAME)), KeyEvent.VK_B, Shortcut.SHIFT),41 Shortcut.registerShortcut("tools:distribute", tr("Tool: {0}", tr("Distribute Nodes")), KeyEvent.VK_B, Shortcut.SHIFT), 45 42 true); 46 43 putValue("help", ht("/Action/DistributeNodes")); … … 100 97 101 98 // Do it! 102 Main.main.undoRedo.add(new SequenceCommand(tr( ACTION_SHORT_NAME), cmds));99 Main.main.undoRedo.add(new SequenceCommand(tr("Distribute Nodes"), cmds)); 103 100 Main.map.repaint(); 104 101 } -
trunk/src/org/openstreetmap/josm/actions/relation/EditRelationAction.java
r7937 r9258 6 6 7 7 import java.awt.event.ActionEvent; 8 import java.awt.event.KeyEvent; 8 9 import java.util.Collection; 9 10 import java.util.HashSet; … … 19 20 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 20 21 import org.openstreetmap.josm.tools.ImageProvider; 22 import org.openstreetmap.josm.tools.Shortcut; 21 23 22 24 /** … … 33 35 putValue(SHORT_DESCRIPTION, tr("Call relation editor for selected relation")); 34 36 putValue(SMALL_ICON, ImageProvider.get("dialogs", "edit")); 37 Main.registerActionShortcut(this, 38 Shortcut.registerShortcut("relations:edit", tr("Edit relation"), KeyEvent.VK_X, Shortcut.ALT)); 35 39 } 36 40 -
trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java
r9246 r9258 138 138 } 139 139 140 private final transient Shortcut[] visibilityToggleShortcuts = new Shortcut[10]; 140 private final transient Shortcut[] visibilityToggleShortcuts = new Shortcut[]{ 141 Shortcut.registerShortcut("subwindow:layers:toggleLayer1", tr("Toggle visibility of layer: {0}", 1), KeyEvent.VK_1, Shortcut.ALT), 142 Shortcut.registerShortcut("subwindow:layers:toggleLayer2", tr("Toggle visibility of layer: {0}", 2), KeyEvent.VK_2, Shortcut.ALT), 143 Shortcut.registerShortcut("subwindow:layers:toggleLayer3", tr("Toggle visibility of layer: {0}", 3), KeyEvent.VK_3, Shortcut.ALT), 144 Shortcut.registerShortcut("subwindow:layers:toggleLayer4", tr("Toggle visibility of layer: {0}", 4), KeyEvent.VK_4, Shortcut.ALT), 145 Shortcut.registerShortcut("subwindow:layers:toggleLayer5", tr("Toggle visibility of layer: {0}", 5), KeyEvent.VK_5, Shortcut.ALT), 146 Shortcut.registerShortcut("subwindow:layers:toggleLayer6", tr("Toggle visibility of layer: {0}", 6), KeyEvent.VK_6, Shortcut.ALT), 147 Shortcut.registerShortcut("subwindow:layers:toggleLayer7", tr("Toggle visibility of layer: {0}", 7), KeyEvent.VK_7, Shortcut.ALT), 148 Shortcut.registerShortcut("subwindow:layers:toggleLayer8", tr("Toggle visibility of layer: {0}", 8), KeyEvent.VK_8, Shortcut.ALT), 149 Shortcut.registerShortcut("subwindow:layers:toggleLayer9", tr("Toggle visibility of layer: {0}", 9), KeyEvent.VK_9, Shortcut.ALT), 150 Shortcut.registerShortcut("subwindow:layers:toggleLayer10", tr("Toggle visibility of layer: {0}", 10), KeyEvent.VK_0, Shortcut.ALT), 151 }; 141 152 private final ToggleLayerIndexVisibility[] visibilityToggleActions = new ToggleLayerIndexVisibility[10]; 142 153 … … 146 157 */ 147 158 private void createVisibilityToggleShortcuts() { 148 final int[] k = {149 KeyEvent.VK_1, KeyEvent.VK_2, KeyEvent.VK_3, KeyEvent.VK_4, KeyEvent.VK_5,150 KeyEvent.VK_6, KeyEvent.VK_7, KeyEvent.VK_8, KeyEvent.VK_9, KeyEvent.VK_0};151 152 159 for (int i = 0; i < 10; i++) { 153 visibilityToggleShortcuts[i] = Shortcut.registerShortcut("subwindow:layers:toggleLayer" + (i+1),154 tr("Toggle visibility of layer: {0}", i+1), k[i], Shortcut.ALT);155 160 visibilityToggleActions[i] = new ToggleLayerIndexVisibility(i); 156 161 Main.registerActionShortcut(visibilityToggleActions[i], visibilityToggleShortcuts[i]);
Note:
See TracChangeset
for help on using the changeset viewer.