Ticket #6355: core_menu.patch

File core_menu.patch, 3.7 KB (added by akks, 11 years ago)
  • src/org/openstreetmap/josm/gui/MainMenu.java

     
    210210    public final JMenu editMenu = addMenu(marktr("Edit"), KeyEvent.VK_E, 1, ht("/Menu/Edit"));
    211211    public final JMenu viewMenu = addMenu(marktr("View"), KeyEvent.VK_V, 2, ht("/Menu/View"));
    212212    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"));
    214217    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"));
    216219    /** the window menu is split into several groups. The first is for windows that can be opened from
    217220     * this menu any time, e.g. the changeset editor. The second group is for toggle dialogs and the third
    218221     * group is for currently open windows that cannot be toggled, e.g. relation editors. It's recommended
    219222     * to use WINDOW_MENU_GROUP to determine the group integer.
    220223     */
    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"));
    222226    public static enum WINDOW_MENU_GROUP { ALWAYS, TOGGLE_DIALOG, VOLATILE }
    223227
    224228    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"));
    226230
    227     public final int defaultMenuPos = 7;
     231    public final int defaultMenuPos = 11;
    228232
    229233    public final JosmAction moveUpAction = new MoveAction(MoveAction.Direction.UP);
    230234    public final JosmAction moveDownAction = new MoveAction(MoveAction.Direction.DOWN);
     
    319323        if (ks != null) {
    320324            menuitem.setAccelerator(ks);
    321325        }
     326        if (!menu.isVisible()) menu.setVisible(true);
    322327        return menuitem;
    323328    }
    324329
     
    427432
    428433    public MainMenu() {
    429434        JMenuItem current;
    430 
     435       
     436        moreToolsMenu.setVisible(false);
     437        dataMenu.setVisible(false);
     438        gpsMenu.setVisible(false);
     439       
    431440        add(fileMenu, newAction);
    432441        add(fileMenu, openFile);
    433442        fileMenu.add(recentlyOpened);
     
    479488        add(editMenu,merge);
    480489        add(editMenu,mergeSelected);
    481490        editMenu.addSeparator();
    482         add(editMenu, selectAll);
    483         add(editMenu, unselectAll);
    484         editMenu.addSeparator();
    485491        add(editMenu, search);
    486492        editMenu.addSeparator();
    487493        add(editMenu, preferences);
     
    543549
    544550        add(presetsMenu, presetSearchAction);
    545551        presetsMenu.addSeparator();
     552       
     553        add(selectionMenu, selectAll);
     554        add(selectionMenu, unselectAll);
    546555
    547556        add(toolsMenu, splitWay);
    548557        add(toolsMenu, combineWay);