Changeset 1219 in josm
- Timestamp:
- 2009-01-09T01:06:38+01:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/MainMenu.java
r1180 r1219 89 89 public final UndoAction undo = new UndoAction(); 90 90 public final RedoAction redo = new RedoAction(); 91 public final AddNodeAction addnode = new AddNodeAction();92 91 public final JosmAction copy = new CopyAction(); 93 92 public final JosmAction paste = new PasteAction(); 94 public final JosmAction delete = new DeleteAction();95 93 public final JosmAction pasteTags = new PasteTagsAction(copy); 96 94 public final JosmAction duplicate = new DuplicateAction(); 95 public final JosmAction delete = new DeleteAction(); 97 96 public final JosmAction selectAll = new SelectAllAction(); 98 97 public final JosmAction unselectAll = new UnselectAllAction(); … … 111 110 public final JosmAction alignInLine = new AlignInLineAction(); 112 111 public final JosmAction ortho = new OrthogonalizeAction(); 112 public final AddNodeAction addnode = new AddNodeAction(); 113 113 public final JosmAction createCircle = new CreateCircleAction(); 114 114 public final JosmAction mergeNodes = new MergeNodesAction(); 115 115 public final JosmAction joinNodeWay = new JoinNodeWayAction(); 116 116 public final JosmAction unglueNodes = new UnGlueAction(); 117 public final HistoryInfoAction historyinfo = new HistoryInfoAction(); 117 118 118 119 /* Audio menu */ … … 128 129 public final HelpAction help = new HelpAction(); 129 130 public final JosmAction about = new AboutAction(); 130 public final HistoryInfoAction historyinfo = new HistoryInfoAction();131 131 132 132 public final JMenu fileMenu = new JMenu(tr("File")); … … 180 180 add(fileMenu, download); 181 181 add(fileMenu, upload); 182 fileMenu.addSeparator(); 182 183 add(fileMenu, exit); 183 184 add(fileMenu, KeyEvent.VK_F, "file"); … … 186 187 add(editMenu, redo); 187 188 editMenu.addSeparator(); 188 add(editMenu, addnode);189 189 add(editMenu, copy); 190 add(editMenu, delete);191 190 add(editMenu, paste); 192 191 add(editMenu, pasteTags); 193 192 add(editMenu, duplicate); 193 add(editMenu, delete); 194 194 editMenu.addSeparator(); 195 195 add(editMenu, selectAll); … … 201 201 add(editMenu, KeyEvent.VK_E, "edit"); 202 202 203 for (String mode : AutoScaleAction.modes) {204 JosmAction autoScaleAction = new AutoScaleAction(mode);205 add(viewMenu, autoScaleAction);206 }207 viewMenu.addSeparator();208 add(viewMenu, new ZoomOutAction());209 add(viewMenu, new ZoomInAction());210 viewMenu.addSeparator();211 203 // TODO move code to an "action" like the others? 212 final JCheckBoxMenuItem wireframe = new JCheckBoxMenuItem(tr("Wireframe view"));204 final JCheckBoxMenuItem wireframe = new JCheckBoxMenuItem(tr("Wireframe View")); 213 205 wireframe.setSelected(Main.pref.getBoolean("draw.wireframe", false)); 214 206 wireframe.setAccelerator(Shortcut.registerShortcut("menu:view:wireframe", tr("Toggle Wireframe view"), … … 223 215 }); 224 216 viewMenu.add(wireframe); 217 viewMenu.addSeparator(); 218 add(viewMenu, new ZoomInAction()); 219 add(viewMenu, new ZoomOutAction()); 220 viewMenu.addSeparator(); 221 for (String mode : AutoScaleAction.modes) { 222 JosmAction autoScaleAction = new AutoScaleAction(mode); 223 add(viewMenu, autoScaleAction); 224 } 225 225 add(viewMenu, KeyEvent.VK_V, "view"); 226 226 … … 234 234 add(toolsMenu, ortho); 235 235 toolsMenu.addSeparator(); 236 add(toolsMenu, addnode); 236 237 add(toolsMenu, createCircle); 237 238 toolsMenu.addSeparator(); … … 239 240 add(toolsMenu, joinNodeWay); 240 241 add(toolsMenu, unglueNodes); 242 toolsMenu.addSeparator(); 243 add(toolsMenu, historyinfo); 241 244 add(toolsMenu, KeyEvent.VK_T, "tools"); 245 246 add(presetsMenu, KeyEvent.VK_P, "presets"); 242 247 243 248 if (!Main.pref.getBoolean("audio.menuinvisible")) { … … 252 257 } 253 258 254 add(presetsMenu, KeyEvent.VK_P, "presets"); 255 256 JMenuItem check = new JMenuItem("DEBUG: Check Dataset"); 259 /* TODO: Anyone really using this feature? */ 260 /*JMenuItem check = new JMenuItem("DEBUG: Check Dataset"); 257 261 check.addActionListener(new ActionListener() { 258 262 public void actionPerformed(ActionEvent e) { … … 260 264 } 261 265 }); 262 helpMenu.add(check); 266 helpMenu.add(check);*/ 263 267 current = helpMenu.add(help); // why is help not a JosmAction? 264 268 current.setAccelerator(Shortcut.registerShortcut("system:help", tr("Help"), KeyEvent.VK_F1, 265 269 Shortcut.GROUP_DIRECT).getKeyStroke()); 266 270 add(helpMenu, about); 267 add(helpMenu, historyinfo);268 271 add(helpMenu, KeyEvent.VK_H, "help"); 269 272 }
Note:
See TracChangeset
for help on using the changeset viewer.