- Timestamp:
- 2009-10-26T15:23:39+01:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 51 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/AddNodeAction.java
r1820 r2323 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 6 6 7 import java.awt.GridBagLayout; … … 30 31 Shortcut.registerShortcut("addnode", tr("Edit: {0}", tr("Add Node...")), KeyEvent.VK_D, Shortcut.GROUP_EDIT, 31 32 Shortcut.SHIFT_DEFAULT), true); 33 putValue("help", ht("/Action/AddNode")); 32 34 } 33 35 -
trunk/src/org/openstreetmap/josm/actions/AlignInCircleAction.java
r2256 r2323 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 6 6 7 import java.awt.event.ActionEvent; … … 37 38 Shortcut.registerShortcut("tools:aligncircle", tr("Tool: {0}", tr("Align Nodes in Circle")), 38 39 KeyEvent.VK_O, Shortcut.GROUP_EDIT), true); 40 putValue("help", ht("/Action/AlignInCircle")); 39 41 } 40 42 -
trunk/src/org/openstreetmap/josm/actions/AlignInLineAction.java
r2256 r2323 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 6 6 7 import java.awt.event.ActionEvent; … … 32 33 super(tr("Align Nodes in Line"), "alignline", tr("Move the selected nodes in to a line."), 33 34 Shortcut.registerShortcut("tools:alignline", tr("Tool: {0}", tr("Align Nodes in Line")), KeyEvent.VK_L, Shortcut.GROUP_EDIT), true); 35 putValue("help", ht("/Action/AlignInLine")); 34 36 } 35 37 -
trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java
r2256 r2323 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.marktr; 5 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 6 import static org.openstreetmap.josm.tools.I18n.tr; 6 7 … … 58 59 putValue("help", "Action/AutoScale/" + modeHelp); 59 60 this.mode = mode; 61 if (mode.equals("data")) { 62 putValue("help", ht("/Action/ZoomToData")); 63 } else if (mode.equals("layer")) { 64 putValue("help", ht("/Action/ZoomToLayer")); 65 } else if (mode.equals("selection")) { 66 putValue("help", ht("/Action/ZoomToSelection")); 67 } else if (mode.equals("conflict")) { 68 putValue("help", ht("/Action/ZoomToConflict")); 69 }else if (mode.equals("download")) { 70 putValue("help", ht("/Action/ZoomToDownload")); 71 } 60 72 } 61 73 -
trunk/src/org/openstreetmap/josm/actions/CloseChangesetAction.java
r2115 r2323 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 6 6 7 import java.awt.event.ActionEvent; … … 41 42 true 42 43 ); 44 putValue("help", ht("/Action/CloseChangeset")); 43 45 44 46 } -
trunk/src/org/openstreetmap/josm/actions/CombineWayAction.java
r2308 r2323 3 3 4 4 import static org.openstreetmap.josm.gui.conflict.tags.TagConflictResolutionUtil.combineTigerTags; 5 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 6 import static org.openstreetmap.josm.gui.conflict.tags.TagConflictResolutionUtil.completeTagCollectionForEditing; 6 7 import static org.openstreetmap.josm.gui.conflict.tags.TagConflictResolutionUtil.normalizeTagCollectionBeforeEditing; … … 48 49 super(tr("Combine Way"), "combineway", tr("Combine several ways into one."), 49 50 Shortcut.registerShortcut("tools:combineway", tr("Tool: {0}", tr("Combine Way")), KeyEvent.VK_C, Shortcut.GROUP_EDIT), true); 51 putValue("help", ht("/Action/CombineWay")); 50 52 } 51 53 -
trunk/src/org/openstreetmap/josm/actions/CopyAction.java
r2305 r2323 4 4 5 5 import static org.openstreetmap.josm.tools.I18n.tr; 6 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 6 7 7 8 import java.awt.event.ActionEvent; … … 24 25 tr("Copy selected objects to paste buffer."), 25 26 Shortcut.registerShortcut("system:copy", tr("Edit: {0}", tr("Copy")), KeyEvent.VK_C, Shortcut.GROUP_MENU), true); 27 putValue("help", ht("/Action/Copy")); 26 28 listeners = new LinkedList<JosmAction>(); 27 29 } -
trunk/src/org/openstreetmap/josm/actions/CreateCircleAction.java
r2256 r2323 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 6 6 7 import java.awt.event.ActionEvent; … … 44 45 super(tr("Create Circle"), "createcircle", tr("Create a circle from three selected nodes."), 45 46 Shortcut.registerShortcut("tools:createcircle", tr("Tool: {0}", tr("Create Circle")), KeyEvent.VK_O, Shortcut.GROUP_EDIT, Shortcut.SHIFT_DEFAULT), true); 47 putValue("help", ht("/Action/CreateCircle")); 46 48 } 47 49 -
trunk/src/org/openstreetmap/josm/actions/DeleteAction.java
r2256 r2323 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 6 6 7 import java.awt.event.ActionEvent; … … 17 18 super(tr("Delete"), "dialogs/delete", tr("Delete selected objects."), 18 19 Shortcut.registerShortcut("system:delete", tr("Edit: {0}", tr("Delete")), KeyEvent.VK_DELETE, Shortcut.GROUP_DIRECT), true); 20 putValue("help", ht("/Action/Delete")); 19 21 } 20 22 -
trunk/src/org/openstreetmap/josm/actions/DistributeAction.java
r2256 r2323 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 6 6 7 import java.awt.event.ActionEvent; … … 30 31 super(tr("Distribute Nodes"), "distribute", tr("Distribute the selected nodes to equal distances along a line."), 31 32 Shortcut.registerShortcut("tools:distribute", tr("Tool: {0}", tr("Distribute Nodes")), KeyEvent.VK_B, Shortcut.GROUP_EDIT), true); 33 putValue("help", ht("/Action/Distribute")); 32 34 } 33 35 -
trunk/src/org/openstreetmap/josm/actions/DownloadAction.java
r2322 r2323 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 6 6 7 import java.awt.BorderLayout; … … 8 9 import java.awt.event.ActionEvent; 9 10 import java.awt.event.KeyEvent; 10 import java.util.List;11 11 import java.util.concurrent.Future; 12 12 … … 17 17 import org.openstreetmap.josm.actions.downloadtasks.DownloadTask; 18 18 import org.openstreetmap.josm.actions.downloadtasks.PostDownloadHandler; 19 import org.openstreetmap.josm.gui.ExceptionDialogUtil;20 19 import org.openstreetmap.josm.gui.ExtendedDialog; 21 20 import org.openstreetmap.josm.gui.download.DownloadDialog; 22 import org.openstreetmap.josm.tools.ExceptionUtil;23 21 import org.openstreetmap.josm.tools.Shortcut; 24 22 import org.openstreetmap.josm.tools.WindowGeometry; … … 39 37 super(tr("Download from OSM..."), "download", tr("Download map data from the OSM server."), 40 38 Shortcut.registerShortcut("file:download", tr("File: {0}", tr("Download from OSM...")), KeyEvent.VK_D, Shortcut.GROUPS_ALT1+Shortcut.GROUP_HOTKEY), true); 39 putValue("help", ht("/Action/Download")); 41 40 } 42 41 -
trunk/src/org/openstreetmap/josm/actions/DownloadReferrersAction.java
r2303 r2323 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 6 6 7 import java.awt.event.ActionEvent; … … 39 40 super(tr("Download parent ways/relations..."), "downloadreferrers", tr("Download primitives referring to one of the selected primitives"), 40 41 Shortcut.registerShortcut("file:downloadreferrers", tr("File: {0}", tr("Download parent ways/relations...")), KeyEvent.VK_D, Shortcut.GROUPS_ALT2+Shortcut.GROUP_HOTKEY), true); 42 putValue("help", ht("/Action/Downloadreferrers")); 41 43 } 42 44 -
trunk/src/org/openstreetmap/josm/actions/DuplicateAction.java
r2305 r2323 4 4 5 5 import static org.openstreetmap.josm.tools.I18n.tr; 6 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 6 7 7 8 import java.awt.event.ActionEvent; … … 19 20 tr("Duplicate selection by copy and immediate paste."), 20 21 Shortcut.registerShortcut("system:duplicate", tr("Edit: {0}", tr("Duplicate")), KeyEvent.VK_D, Shortcut.GROUP_MENU), true); 22 putValue("help", ht("/Action/Duplicate")); 21 23 } 22 24 -
trunk/src/org/openstreetmap/josm/actions/ExitAction.java
r2274 r2323 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 6 6 7 import java.awt.event.ActionEvent; … … 22 23 super(tr("Exit"), "exit", tr("Exit the application."), 23 24 Shortcut.registerShortcut("system:menuexit", tr("Exit"), KeyEvent.VK_Q, Shortcut.GROUP_MENU), true); 25 putValue("help", ht("/Action/Exit")); 24 26 } 25 27 -
trunk/src/org/openstreetmap/josm/actions/GpxExportAction.java
r2181 r2323 3 3 4 4 import static org.openstreetmap.josm.actions.SaveActionBase.createAndOpenSaveFileChooser; 5 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 6 import static org.openstreetmap.josm.tools.I18n.tr; 6 7 … … 28 29 super(tr("Export to GPX..."), "exportgpx", tr("Export the data to GPX file."), 29 30 Shortcut.registerShortcut("file:exportgpx", tr("Export to GPX..."), KeyEvent.VK_E, Shortcut.GROUP_MENU)); 31 putValue("help", ht("/Action/GpxExport")); 30 32 } 31 33 -
trunk/src/org/openstreetmap/josm/actions/HelpAction.java
r2308 r2323 35 35 c = SwingUtilities.getDeepestComponentAt(c, mouse.x, mouse.y); 36 36 topic = HelpUtil.getContextSpecificHelpTopic(c); 37 System.out.println("topic is:" + topic); 37 38 } else { 38 39 topic = null; … … 41 42 Point mouse = Main.parent.getMousePosition(); 42 43 topic = HelpUtil.getContextSpecificHelpTopic(SwingUtilities.getDeepestComponentAt(Main.parent, mouse.x, mouse.y)); 44 System.out.println("topic is:" + topic); 43 45 } 44 46 if (topic == null) { -
trunk/src/org/openstreetmap/josm/actions/HistoryInfoAction.java
r2274 r2323 9 9 import org.openstreetmap.josm.data.osm.OsmPrimitiveType; 10 10 import org.openstreetmap.josm.tools.Shortcut; 11 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 11 12 12 13 public class HistoryInfoAction extends AbstractInfoAction { … … 17 18 Shortcut.registerShortcut("core:history", 18 19 tr("Object history"), KeyEvent.VK_H, Shortcut.GROUP_HOTKEY), true); 20 putValue("help", ht("/Action/HistoryInfo")); 19 21 } 20 22 -
trunk/src/org/openstreetmap/josm/actions/InfoAction.java
r2034 r2323 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 6 6 7 import java.awt.event.KeyEvent; … … 17 18 Shortcut.registerShortcut("core:information", 18 19 tr("Info about Element"), KeyEvent.VK_I, Shortcut.GROUP_HOTKEY), true); 20 putValue("help", ht("/Action/Info")); 19 21 } 20 22 -
trunk/src/org/openstreetmap/josm/actions/JoinNodeWayAction.java
r2256 r2323 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 6 6 7 import java.awt.event.ActionEvent; … … 29 30 super(tr("Join Node to Way"), "joinnodeway", tr("Join a node into the nearest way segments"), 30 31 Shortcut.registerShortcut("tools:joinnodeway", tr("Tool: {0}", tr("Join Node to Way")), KeyEvent.VK_J, Shortcut.GROUP_EDIT), true); 32 putValue("help", ht("/Action/JoinNodeWay")); 31 33 } 32 34 -
trunk/src/org/openstreetmap/josm/actions/MergeLayerAction.java
r1890 r2323 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 6 6 7 import java.awt.event.ActionEvent; … … 20 21 true /* register */ 21 22 ); 23 putValue("help", ht("/Action/MergeLayer")); 22 24 } 23 25 -
trunk/src/org/openstreetmap/josm/actions/MergeNodesAction.java
r2315 r2323 3 3 4 4 import static org.openstreetmap.josm.gui.conflict.tags.TagConflictResolutionUtil.combineTigerTags; 5 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 6 import static org.openstreetmap.josm.gui.conflict.tags.TagConflictResolutionUtil.completeTagCollectionForEditing; 6 7 import static org.openstreetmap.josm.gui.conflict.tags.TagConflictResolutionUtil.normalizeTagCollectionBeforeEditing; … … 46 47 super(tr("Merge Nodes"), "mergenodes", tr("Merge nodes into the oldest one."), 47 48 Shortcut.registerShortcut("tools:mergenodes", tr("Tool: {0}", tr("Merge Nodes")), KeyEvent.VK_M, Shortcut.GROUP_EDIT), true); 49 putValue("help", ht("/Action/MergeNodesAction")); 48 50 } 49 51 -
trunk/src/org/openstreetmap/josm/actions/MergeSelectionAction.java
r2256 r2323 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 6 6 7 import java.awt.event.ActionEvent; … … 23 24 true /* register */ 24 25 ); 26 putValue("help", ht("/Action/MergeSelection")); 25 27 } 26 28 -
trunk/src/org/openstreetmap/josm/actions/MirrorAction.java
r2256 r2323 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 6 6 7 import java.awt.event.ActionEvent; … … 34 35 Shortcut.registerShortcut("tools:mirror", tr("Tool: {0}", tr("Mirror")), 35 36 KeyEvent.VK_M, Shortcut.GROUP_EDIT, Shortcut.SHIFT_DEFAULT), true); 37 putValue("help", ht("/Action/Mirror")); 36 38 } 37 39 -
trunk/src/org/openstreetmap/josm/actions/MoveAction.java
r2305 r2323 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 6 6 7 import java.awt.event.ActionEvent; … … 57 58 (Shortcut)calltosupermustbefirststatementinconstructor(dir, false), true); 58 59 myDirection = dir; 60 putValue("help", ht("/Action/Move")); 59 61 } 60 62 -
trunk/src/org/openstreetmap/josm/actions/NewAction.java
r1790 r2323 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 6 6 7 import java.awt.event.ActionEvent; … … 17 18 super(tr("New"), "new", tr("Create a new map."), 18 19 Shortcut.registerShortcut("system:new", tr("File: {0}", tr("New")), KeyEvent.VK_N, Shortcut.GROUP_MENU), true); 20 putValue("help", ht("/Action/New")); 19 21 } 20 22 -
trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java
r2070 r2323 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 6 6 7 import java.awt.event.ActionEvent; … … 36 37 super(tr("Open..."), "open", tr("Open a file."), 37 38 Shortcut.registerShortcut("system:open", tr("File: {0}", tr("Open...")), KeyEvent.VK_O, Shortcut.GROUP_MENU)); 39 putValue("help", ht("/Action/OpenFile")); 40 38 41 } 39 42 -
trunk/src/org/openstreetmap/josm/actions/OpenLocationAction.java
r2322 r2323 2 2 package org.openstreetmap.josm.actions; 3 3 4 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 4 5 import static org.openstreetmap.josm.tools.I18n.tr; 5 6 … … 23 24 import org.openstreetmap.josm.gui.progress.PleaseWaitProgressMonitor; 24 25 import org.openstreetmap.josm.gui.widgets.HistoryComboBox; 25 import org.openstreetmap.josm.tools.GBC;26 26 import org.openstreetmap.josm.tools.Shortcut; 27 27 … … 39 39 super(tr("Open Location..."), "openlocation", tr("Open an URL."), 40 40 Shortcut.registerShortcut("system:open_location", tr("File: {0}", tr("Open Location...")), KeyEvent.VK_L, Shortcut.GROUP_MENU), true); 41 putValue("help", ht("/Action/OpenLocation")); 41 42 } 42 43 -
trunk/src/org/openstreetmap/josm/actions/OrthogonalizeAction.java
r2268 r2323 3 3 package org.openstreetmap.josm.actions; 4 4 5 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 6 import static org.openstreetmap.josm.tools.I18n.tr; 6 7 … … 10 11 import java.util.Arrays; 11 12 import java.util.Collection; 13 import java.util.HashMap; 12 14 import java.util.HashSet; 13 import java.util.HashMap;14 15 import java.util.LinkedList; 15 16 … … 21 22 import org.openstreetmap.josm.command.SequenceCommand; 22 23 import org.openstreetmap.josm.data.coor.EastNorth; 23 import org.openstreetmap.josm.data.coor.LatLon;24 24 import org.openstreetmap.josm.data.osm.Node; 25 25 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 48 48 KeyEvent.VK_Q, 49 49 Shortcut.GROUP_EDIT), true); 50 putValue("help", ht("/Action/Orthogonalize")); 50 51 } 51 52 -
trunk/src/org/openstreetmap/josm/actions/PasteAction.java
r2312 r2323 4 4 5 5 import static org.openstreetmap.josm.tools.I18n.tr; 6 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 6 7 7 8 import java.awt.event.ActionEvent; … … 30 31 super(tr("Paste"), "paste", tr("Paste contents of paste buffer."), 31 32 Shortcut.registerShortcut("system:paste", tr("Edit: {0}", tr("Paste")), KeyEvent.VK_V, Shortcut.GROUP_MENU), true); 33 putValue("help", ht("/Action/Paste")); 32 34 } 33 35 -
trunk/src/org/openstreetmap/josm/actions/PasteTagsAction.java
r2305 r2323 4 4 5 5 import static org.openstreetmap.josm.tools.I18n.tr; 6 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 6 7 import static org.openstreetmap.josm.tools.I18n.trn; 7 8 … … 33 34 Shortcut.registerShortcut("system:pastestyle", tr("Edit: {0}", tr("Paste Tags")), KeyEvent.VK_V, Shortcut.GROUP_MENU, Shortcut.SHIFT_DEFAULT), true); 34 35 copyAction.addListener(this); 36 putValue("help", ht("/Action/PasteTags")); 35 37 } 36 38 -
trunk/src/org/openstreetmap/josm/actions/PreferencesAction.java
r1742 r2323 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 6 6 7 import java.awt.Dimension; … … 31 32 super(tr("Preferences..."), "preference", tr("Open a preferences page for global settings."), 32 33 Shortcut.registerShortcut("system:preferences", tr("Preferences"), KeyEvent.VK_F12, Shortcut.GROUP_DIRECT), true); 34 putValue("help", ht("/Action/Preferences")); 33 35 } 34 36 -
trunk/src/org/openstreetmap/josm/actions/RedoAction.java
r1820 r2323 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 6 6 7 import java.awt.event.ActionEvent; … … 24 25 Shortcut.registerShortcut("system:redo", tr("Edit: {0}", tr("Redo")), KeyEvent.VK_Y, Shortcut.GROUP_MENU), true); 25 26 setEnabled(false); 27 putValue("help", ht("/Action/Redo")); 26 28 } 27 29 -
trunk/src/org/openstreetmap/josm/actions/RenameLayerAction.java
r2017 r2323 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 6 6 7 import java.awt.event.ActionEvent; … … 37 38 this.file = file; 38 39 this.layer = layer; 39 this.putValue("help", "Action/LayerRename");40 this.putValue("help", ht("/Action/RenameLayer")); 40 41 } 41 42 -
trunk/src/org/openstreetmap/josm/actions/ReverseWayAction.java
r2256 r2323 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 6 6 7 import java.awt.event.ActionEvent; … … 30 31 super(tr("Reverse Ways"), "wayflip", tr("Reverse the direction of all selected ways."), 31 32 Shortcut.registerShortcut("tools:reverse", tr("Tool: {0}", tr("Reverse Ways")), KeyEvent.VK_R, Shortcut.GROUP_EDIT), true); 33 putValue("help", ht("/Action/ReverseWay")); 32 34 } 33 35 -
trunk/src/org/openstreetmap/josm/actions/SaveAction.java
r2070 r2323 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 6 6 7 import java.awt.event.KeyEvent; … … 27 28 super(tr("Save"), "save", tr("Save the current data."), 28 29 Shortcut.registerShortcut("system:save", tr("File: {0}", tr("Save")), KeyEvent.VK_S, Shortcut.GROUP_MENU)); 30 putValue("help", ht("/Action/Save")); 29 31 } 30 32 -
trunk/src/org/openstreetmap/josm/actions/SaveAsAction.java
r2017 r2323 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 6 6 7 import java.awt.event.KeyEvent; … … 24 25 super(tr("Save As..."), "save_as", tr("Save the current data to a new file."), 25 26 Shortcut.registerShortcut("system:saveas", tr("File: {0}", tr("Save As...")), KeyEvent.VK_S, Shortcut.GROUP_MENU, Shortcut.SHIFT_DEFAULT)); 27 putValue("help", ht("/Action/SaveAs")); 26 28 } 27 29 -
trunk/src/org/openstreetmap/josm/actions/SelectAllAction.java
r1865 r2323 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 6 6 7 import java.awt.event.ActionEvent; … … 14 15 super(tr("Select All"),"selectall", tr("Select all undeleted objects in the data layer. This selects incomplete objects too."), 15 16 Shortcut.registerShortcut("system:selectall", tr("Edit: {0}", tr("Select All")), KeyEvent.VK_A, Shortcut.GROUP_MENU), true); 17 putValue("help", ht("/Action/SelectAll")); 16 18 } 17 19 -
trunk/src/org/openstreetmap/josm/actions/ShowStatusReportAction.java
r2108 r2323 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 6 6 7 import java.awt.Dimension; … … 39 40 tr("Show Status Report")), KeyEvent.VK_R, Shortcut.GROUP_NONE), true); 40 41 42 putValue("help", ht("/Action/ShowStatusReport")); 41 43 } 42 44 -
trunk/src/org/openstreetmap/josm/actions/SplitWayAction.java
r2256 r2323 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 6 import static org.openstreetmap.josm.tools.I18n.trn; 6 7 … … 52 53 super(tr("Split Way"), "splitway", tr("Split a way at the selected node."), 53 54 Shortcut.registerShortcut("tools:splitway", tr("Tool: {0}", tr("Split Way")), KeyEvent.VK_P, Shortcut.GROUP_EDIT), true); 55 putValue("help", ht("/Action/SplitWay")); 54 56 } 55 57 -
trunk/src/org/openstreetmap/josm/actions/ToggleGPXLinesAction.java
r1502 r2323 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 6 6 7 import java.awt.event.ActionEvent; … … 15 16 super(tr("Toggle GPX Lines"), "gps-lines", tr("Toggles the global setting ''{0}''.", tr("Draw lines between raw gps points.")), 16 17 Shortcut.registerShortcut("view:gpxlines", tr("View: {0}", tr("Toggle GPX Lines")), KeyEvent.VK_X, Shortcut.GROUP_MENU, Shortcut.SHIFT_DEFAULT), true); 18 putValue("help", ht("/Action/ToggleGPXLines")); 17 19 } 18 20 -
trunk/src/org/openstreetmap/josm/actions/UnGlueAction.java
r2264 r2323 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 6 6 7 import java.awt.event.ActionEvent; … … 51 52 super(tr("UnGlue Ways"), "unglueways", tr("Duplicate nodes that are used by multiple ways."), 52 53 Shortcut.registerShortcut("tools:unglue", tr("Tool: {0}", tr("UnGlue Ways")), KeyEvent.VK_G, Shortcut.GROUP_EDIT), true); 54 putValue("help", ht("/Action/UnGlue")); 53 55 } 54 56 -
trunk/src/org/openstreetmap/josm/actions/UndoAction.java
r1820 r2323 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 6 6 7 import java.awt.event.ActionEvent; … … 24 25 Shortcut.registerShortcut("system:undo", tr("Edit: {0}", tr("Undo")), KeyEvent.VK_Z, Shortcut.GROUP_MENU), true); 25 26 setEnabled(false); 27 putValue("help", ht("/Action/Undo")); 26 28 } 27 29 -
trunk/src/org/openstreetmap/josm/actions/UnselectAllAction.java
r1865 r2323 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 6 6 7 import java.awt.event.ActionEvent; … … 36 37 KeyEvent.VK_ESCAPE, Shortcut.GROUP_DIRECT).getKeyStroke(), 37 38 tr("Unselect All")); 39 40 putValue("help", ht("/Action/UnselectAll")); 38 41 } 39 42 -
trunk/src/org/openstreetmap/josm/actions/UpdateDataAction.java
r2317 r2323 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 6 6 7 import java.awt.event.ActionEvent; … … 25 26 Shortcut.GROUP_HOTKEY), 26 27 true); 28 putValue("help", ht("/Action/UpdateData")); 27 29 } 28 30 -
trunk/src/org/openstreetmap/josm/actions/UpdateSelectionAction.java
r2277 r2323 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 6 6 7 import java.awt.event.ActionEvent; … … 96 97 Shortcut.GROUP_HOTKEY + Shortcut.GROUPS_ALT2), 97 98 true); 99 putValue("help", ht("UpdateSelection")); 98 100 } 99 101 -
trunk/src/org/openstreetmap/josm/actions/UploadAction.java
r2319 r2323 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 6 6 7 import java.awt.event.ActionEvent; … … 119 120 super(tr("Upload data"), "upload", tr("Upload all changes in the active data layer to the OSM server"), 120 121 Shortcut.registerShortcut("file:upload", tr("File: {0}", tr("Upload data")), KeyEvent.VK_U, Shortcut.GROUPS_ALT1+Shortcut.GROUP_HOTKEY), true); 122 putValue("help", ht("/Action/Upload")); 121 123 } 122 124 -
trunk/src/org/openstreetmap/josm/actions/UploadSelectionAction.java
r2273 r2323 33 33 import org.openstreetmap.josm.tools.ExceptionUtil; 34 34 import org.xml.sax.SAXException; 35 35 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 36 36 37 37 /** … … 49 49 null, /* no shortcut */ 50 50 true); 51 putValue("help", ht("/Action/UploadSelection")); 51 52 } 52 53 -
trunk/src/org/openstreetmap/josm/actions/ZoomInAction.java
r1895 r2323 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 6 6 7 import java.awt.event.ActionEvent; … … 15 16 super(tr("Zoom In"), "dialogs/zoomin", tr("Zoom In"), 16 17 Shortcut.registerShortcut("view:zoomin", tr("View: {0}", tr("Zoom In")), KeyEvent.VK_PLUS, Shortcut.GROUP_DIRECT), true); 18 putValue("help", ht("/Action/ZoomIn")); 17 19 } 18 20 -
trunk/src/org/openstreetmap/josm/actions/ZoomOutAction.java
r1895 r2323 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 5 6 6 7 import java.awt.event.ActionEvent; … … 15 16 super(tr("Zoom Out"), "dialogs/zoomout", tr("Zoom Out"), 16 17 Shortcut.registerShortcut("view:zoomout", tr("View: {0}", tr("Zoom Out")), KeyEvent.VK_MINUS, Shortcut.GROUP_DIRECT), true); 18 putValue("help", ht("/Action/ZoomOut")); 17 19 } 18 20 -
trunk/src/org/openstreetmap/josm/command/DeleteCommand.java
r2308 r2323 28 28 import org.openstreetmap.josm.data.osm.OsmPrimitiveType; 29 29 import org.openstreetmap.josm.data.osm.Relation; 30 import org.openstreetmap.josm.data.osm.RelationMember;31 30 import org.openstreetmap.josm.data.osm.Way; 32 31 import org.openstreetmap.josm.data.osm.WaySegment; … … 35 34 import org.openstreetmap.josm.gui.ConditionalOptionPaneUtil; 36 35 import org.openstreetmap.josm.gui.DefaultNameFormatter; 37 import org.openstreetmap.josm.gui.ExtendedDialog;38 36 import org.openstreetmap.josm.gui.actionsupport.DeleteFromRelationConfirmationDialog; 39 37 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 40 38 import org.openstreetmap.josm.tools.ImageProvider; 41 39 42 import sun.swing.BakedArrayList;43 44 40 /** 45 41 * A command to delete a number of primitives from the dataset. 46 42 * 47 43 */ 48 44 public class DeleteCommand extends Command { … … 232 228 public static Command deleteWithReferences(OsmDataLayer layer, Collection<? extends OsmPrimitive> selection) { 233 229 return deleteWithReferences(layer, selection, false); 234 }235 236 private static int testRelation(Relation ref, OsmPrimitive osm, boolean simulate) {237 // If this delete action is simulated, do not bug the user with dialogs238 // and assume the relations should be deleted239 if(simulate)240 return 1;241 242 String role = "";243 for (RelationMember m : ref.getMembers()) {244 if (m.getMember() == osm) {245 role = m.getRole();246 break;247 }248 }249 ExtendedDialog dialog = new ExtendedDialog(250 Main.parent,251 tr("Conflicting relation"),252 new String[] { tr("Delete from relation"),tr("Cancel") }253 );254 dialog.setButtonIcons( new String[] { "dialogs/delete.png", "cancel.png" });255 if (role.length() > 0) {256 dialog.setContent(257 tr(258 "<html>Selection \"{0}\" is used by relation \"{1}\" with role {2}.<br>Delete from relation?</html>",259 osm.getDisplayName(DefaultNameFormatter.getInstance()),260 ref.getDisplayName(DefaultNameFormatter.getInstance()),261 role262 )263 );264 dialog.showDialog();265 return dialog.getValue();266 } else {267 dialog.setContent(268 tr(269 "<html>Selection \"{0}\" is used by relation \"{1}\".<br>Delete from relation?</html>",270 osm.getDisplayName(DefaultNameFormatter.getInstance()),271 ref.getDisplayName(DefaultNameFormatter.getInstance())272 )273 );274 dialog.showDialog();275 return dialog.getValue();276 }277 230 } 278 231 -
trunk/src/org/openstreetmap/josm/gui/MainMenu.java
r2268 r2323 81 81 import org.openstreetmap.josm.tools.PlatformHookUnixoid; 82 82 import org.openstreetmap.josm.tools.Shortcut; 83 83 import static org.openstreetmap.josm.gui.help.HelpUtil.ht; 84 84 /** 85 85 * This is the JOSM main menu bar. It is overwritten to initialize itself and provide all menu … … 159 159 public final JosmAction statusreport = new ShowStatusReportAction(); 160 160 161 public final JMenu fileMenu = addMenu(marktr("File"), KeyEvent.VK_F, 0 );162 public final JMenu editMenu = addMenu(marktr("Edit"), KeyEvent.VK_E, 1 );163 public final JMenu viewMenu = addMenu(marktr("View"), KeyEvent.VK_V, 2 );164 public final JMenu toolsMenu = addMenu(marktr("Tools"), KeyEvent.VK_T, 3 );165 public final JMenu presetsMenu = addMenu(marktr("Presets"), KeyEvent.VK_P, 4 );161 public final JMenu fileMenu = addMenu(marktr("File"), KeyEvent.VK_F, 0, ht("/Menu/File")); 162 public final JMenu editMenu = addMenu(marktr("Edit"), KeyEvent.VK_E, 1, ht("/Menu/Edit")); 163 public final JMenu viewMenu = addMenu(marktr("View"), KeyEvent.VK_V, 2, ht("/Menu/View")); 164 public final JMenu toolsMenu = addMenu(marktr("Tools"), KeyEvent.VK_T, 3, ht("/Menu/Tools")); 165 public final JMenu presetsMenu = addMenu(marktr("Presets"), KeyEvent.VK_P, 4, ht("/Menu/Presets")); 166 166 public JMenu audioMenu = null; 167 public final JMenu helpMenu = addMenu(marktr("Help"), KeyEvent.VK_H, 5 );167 public final JMenu helpMenu = addMenu(marktr("Help"), KeyEvent.VK_H, 5, ht("/Menu/Help")); 168 168 public final int defaultMenuPos = 5; 169 169 … … 185 185 return menuitem; 186 186 } 187 public JMenu addMenu(String name, int mnemonicKey, int position) 188 { 187 188 @Deprecated 189 public JMenu addMenu(String name, int mnemonicKey, int position) { 190 return addMenu(name, mnemonicKey, position, "/Menu/" + name); 191 } 192 193 public JMenu addMenu(String name, int mnemonicKey, int position, String relativeHelpTopic) { 189 194 JMenu menu = new JMenu(tr(name)); 190 195 Shortcut.registerShortcut("menu:" + name, tr("Menu: {0}", tr(name)), mnemonicKey, 191 196 Shortcut.GROUP_MNEMONIC).setMnemonic(menu); 192 197 add(menu, position); 193 menu.putClientProperty("help", "Menu/"+name);198 menu.putClientProperty("help", relativeHelpTopic); 194 199 return menu; 195 200 } … … 309 314 310 315 if (!Main.pref.getBoolean("audio.menuinvisible", false)) { 311 audioMenu = addMenu(marktr("Audio"), KeyEvent.VK_A, 5 );316 audioMenu = addMenu(marktr("Audio"), KeyEvent.VK_A, 5, ht("/Menu/Audio")); 312 317 add(audioMenu, audioPlayPause); 313 318 add(audioMenu, audioNext);
Note:
See TracChangeset
for help on using the changeset viewer.