Changeset 1219 in josm


Ignore:
Timestamp:
2009-01-09T01:06:38+01:00 (16 years ago)
Author:
ulfl
Message:

redesign of main menu, to better conform with common standards ...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/MainMenu.java

    r1180 r1219  
    8989    public final UndoAction undo = new UndoAction();
    9090    public final RedoAction redo = new RedoAction();
    91     public final AddNodeAction addnode = new AddNodeAction();
    9291    public final JosmAction copy = new CopyAction();
    9392    public final JosmAction paste = new PasteAction();
    94     public final JosmAction delete = new DeleteAction();
    9593    public final JosmAction pasteTags = new PasteTagsAction(copy);
    9694    public final JosmAction duplicate = new DuplicateAction();
     95    public final JosmAction delete = new DeleteAction();
    9796    public final JosmAction selectAll = new SelectAllAction();
    9897    public final JosmAction unselectAll = new UnselectAllAction();
     
    111110    public final JosmAction alignInLine = new AlignInLineAction();
    112111    public final JosmAction ortho = new OrthogonalizeAction();
     112    public final AddNodeAction addnode = new AddNodeAction();
    113113    public final JosmAction createCircle = new CreateCircleAction();
    114114    public final JosmAction mergeNodes = new MergeNodesAction();
    115115    public final JosmAction joinNodeWay = new JoinNodeWayAction();
    116116    public final JosmAction unglueNodes = new UnGlueAction();
     117    public final HistoryInfoAction historyinfo = new HistoryInfoAction();
    117118
    118119    /* Audio menu */
     
    128129    public final HelpAction help = new HelpAction();
    129130    public final JosmAction about = new AboutAction();
    130     public final HistoryInfoAction historyinfo = new HistoryInfoAction();
    131131
    132132    public final JMenu fileMenu = new JMenu(tr("File"));
     
    180180        add(fileMenu, download);
    181181        add(fileMenu, upload);
     182        fileMenu.addSeparator();
    182183        add(fileMenu, exit);
    183184        add(fileMenu, KeyEvent.VK_F, "file");
     
    186187        add(editMenu, redo);
    187188        editMenu.addSeparator();
    188         add(editMenu, addnode);
    189189        add(editMenu, copy);
    190         add(editMenu, delete);
    191190        add(editMenu, paste);
    192191        add(editMenu, pasteTags);
    193192        add(editMenu, duplicate);
     193        add(editMenu, delete);
    194194        editMenu.addSeparator();
    195195        add(editMenu, selectAll);
     
    201201        add(editMenu, KeyEvent.VK_E, "edit");
    202202
    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();
    211203        // 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"));
    213205        wireframe.setSelected(Main.pref.getBoolean("draw.wireframe", false));
    214206        wireframe.setAccelerator(Shortcut.registerShortcut("menu:view:wireframe", tr("Toggle Wireframe view"),
     
    223215        });
    224216        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        }
    225225        add(viewMenu, KeyEvent.VK_V, "view");
    226226
     
    234234        add(toolsMenu, ortho);
    235235        toolsMenu.addSeparator();
     236        add(toolsMenu, addnode);
    236237        add(toolsMenu, createCircle);
    237238        toolsMenu.addSeparator();
     
    239240        add(toolsMenu, joinNodeWay);
    240241        add(toolsMenu, unglueNodes);
     242        toolsMenu.addSeparator();
     243        add(toolsMenu, historyinfo);
    241244        add(toolsMenu, KeyEvent.VK_T, "tools");
     245
     246        add(presetsMenu, KeyEvent.VK_P, "presets");
    242247
    243248        if (!Main.pref.getBoolean("audio.menuinvisible")) {
     
    252257        }
    253258
    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");
    257261        check.addActionListener(new ActionListener() {
    258262            public void actionPerformed(ActionEvent e) {
     
    260264            }
    261265        });
    262         helpMenu.add(check);
     266        helpMenu.add(check);*/
    263267        current = helpMenu.add(help); // why is help not a JosmAction?
    264268        current.setAccelerator(Shortcut.registerShortcut("system:help", tr("Help"), KeyEvent.VK_F1,
    265269                Shortcut.GROUP_DIRECT).getKeyStroke());
    266270        add(helpMenu, about);
    267         add(helpMenu, historyinfo);
    268271        add(helpMenu, KeyEvent.VK_H, "help");
    269272    }
Note: See TracChangeset for help on using the changeset viewer.