Ticket #6355: core_menu.patch
File core_menu.patch, 3.7 KB (added by , 11 years ago) |
---|
-
src/org/openstreetmap/josm/gui/MainMenu.java
210 210 public final JMenu editMenu = addMenu(marktr("Edit"), KeyEvent.VK_E, 1, ht("/Menu/Edit")); 211 211 public final JMenu viewMenu = addMenu(marktr("View"), KeyEvent.VK_V, 2, ht("/Menu/View")); 212 212 public final JMenu toolsMenu = addMenu(marktr("Tools"), KeyEvent.VK_T, 3, ht("/Menu/Tools")); 213 public final JMenu presetsMenu = addMenu(marktr("Presets"), KeyEvent.VK_P, 4, ht("/Menu/Presets")); 213 public final JMenu moreToolsMenu = addMenu(marktr("More tools"), KeyEvent.VK_Q, 4, ht("/Menu/MoreTools")); 214 public final JMenu dataMenu = addMenu(marktr("Data"), KeyEvent.VK_Y, 5, ht("/Menu/Data")); 215 public final JMenu selectionMenu = addMenu(marktr("Selection"), KeyEvent.VK_N, 6, ht("/Menu/Selection")); 216 public final JMenu presetsMenu = addMenu(marktr("Presets"), KeyEvent.VK_P, 7, ht("/Menu/Presets")); 214 217 public final ImageryMenu imageryMenu = 215 (ImageryMenu)addMenu(new ImageryMenu(), marktr("Imagery"), KeyEvent.VK_I, 5, ht("/Menu/Imagery"));218 (ImageryMenu)addMenu(new ImageryMenu(), marktr("Imagery"), KeyEvent.VK_I, 8, ht("/Menu/Imagery")); 216 219 /** the window menu is split into several groups. The first is for windows that can be opened from 217 220 * this menu any time, e.g. the changeset editor. The second group is for toggle dialogs and the third 218 221 * group is for currently open windows that cannot be toggled, e.g. relation editors. It's recommended 219 222 * to use WINDOW_MENU_GROUP to determine the group integer. 220 223 */ 221 public final JMenu windowMenu = addMenu(marktr("Windows"), KeyEvent.VK_W, 6, ht("/Menu/Windows")); 224 public final JMenu gpsMenu = addMenu(marktr("GPS tracks"), KeyEvent.VK_G, 9, ht("/Plugin/LiveGPS")); 225 public final JMenu windowMenu = addMenu(marktr("Windows"), KeyEvent.VK_W, 10, ht("/Menu/Windows")); 222 226 public static enum WINDOW_MENU_GROUP { ALWAYS, TOGGLE_DIALOG, VOLATILE } 223 227 224 228 public JMenu audioMenu = null; 225 public final JMenu helpMenu = addMenu(marktr("Help"), KeyEvent.VK_H, 7, ht("/Menu/Help"));229 public final JMenu helpMenu = addMenu(marktr("Help"), KeyEvent.VK_H, 11, ht("/Menu/Help")); 226 230 227 public final int defaultMenuPos = 7;231 public final int defaultMenuPos = 11; 228 232 229 233 public final JosmAction moveUpAction = new MoveAction(MoveAction.Direction.UP); 230 234 public final JosmAction moveDownAction = new MoveAction(MoveAction.Direction.DOWN); … … 319 323 if (ks != null) { 320 324 menuitem.setAccelerator(ks); 321 325 } 326 if (!menu.isVisible()) menu.setVisible(true); 322 327 return menuitem; 323 328 } 324 329 … … 427 432 428 433 public MainMenu() { 429 434 JMenuItem current; 430 435 436 moreToolsMenu.setVisible(false); 437 dataMenu.setVisible(false); 438 gpsMenu.setVisible(false); 439 431 440 add(fileMenu, newAction); 432 441 add(fileMenu, openFile); 433 442 fileMenu.add(recentlyOpened); … … 479 488 add(editMenu,merge); 480 489 add(editMenu,mergeSelected); 481 490 editMenu.addSeparator(); 482 add(editMenu, selectAll);483 add(editMenu, unselectAll);484 editMenu.addSeparator();485 491 add(editMenu, search); 486 492 editMenu.addSeparator(); 487 493 add(editMenu, preferences); … … 543 549 544 550 add(presetsMenu, presetSearchAction); 545 551 presetsMenu.addSeparator(); 552 553 add(selectionMenu, selectAll); 554 add(selectionMenu, unselectAll); 546 555 547 556 add(toolsMenu, splitWay); 548 557 add(toolsMenu, combineWay);