Changeset 5979 in josm for trunk/src


Ignore:
Timestamp:
2013-06-01T12:08:15+02:00 (11 years ago)
Author:
akks
Message:

fix #8652 [based on patch by cmuelle8] enable dialog and panels hiding by TAB
disable TAB for angle snapping by default (please use A-A or assign different key)

Location:
trunk/src/org/openstreetmap/josm
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/DialogsToggleAction.java

    r5965 r5979  
    3030                (Icon) null, /* no icon */
    3131                tr("Toggle dialogs panel, maximize mapview"),
    32                 Shortcut.registerShortcut("menu:view:dialogspanel", tr("Toggle dialogs panel"),KeyEvent.CHAR_UNDEFINED, Shortcut.NONE),
     32                Shortcut.registerShortcut("menu:view:dialogspanel", tr("Toggle dialogs panel"),KeyEvent.VK_TAB, Shortcut.DIRECT),
    3333                true, "dialogspanel", /* register in toolbar */
    3434                false
  • trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java

    r5965 r5979  
    128128
    129129        snappingShortcut = Shortcut.registerShortcut("mapmode:drawanglesnapping",
    130                 tr("Mode: Draw Angle snapping"), KeyEvent.VK_TAB, Shortcut.DIRECT);
     130                tr("Mode: Draw Angle snapping"), KeyEvent.CHAR_UNDEFINED, Shortcut.NONE);
    131131        snapChangeAction = new SnapChangeAction();
    132132        snapCheckboxMenuItem = addMenuItem();
  • trunk/src/org/openstreetmap/josm/gui/MapView.java

    r5965 r5979  
    1212import java.awt.event.ComponentAdapter;
    1313import java.awt.event.ComponentEvent;
     14import java.awt.event.KeyEvent;
    1415import java.awt.event.MouseEvent;
    1516import java.awt.event.MouseMotionListener;
     
    5556import org.openstreetmap.josm.tools.AudioPlayer;
    5657import org.openstreetmap.josm.tools.BugReportExceptionHandler;
     58import org.openstreetmap.josm.tools.Shortcut;
    5759
    5860/**
     
    267269            }
    268270        });
     271
     272        if (Shortcut.findShortcut(KeyEvent.VK_TAB, 0)!=null)
     273        {
     274            setFocusTraversalKeysEnabled(false);
     275        }
    269276    }
    270277
  • trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java

    r5968 r5979  
    434434            });
    435435
    436         JCheckBoxMenuItem doNotHide = new JCheckBoxMenuItem(new AbstractAction(tr("Hide toolbar and menu")) {
     436        JCheckBoxMenuItem doNotHide = new JCheckBoxMenuItem(new AbstractAction(tr("Do not hide toolbar and menu")) {
    437437            @Override
    438438            public void actionPerformed(ActionEvent e) {
  • trunk/src/org/openstreetmap/josm/tools/Shortcut.java

    r5926 r5979  
    246246
    247247    // check if something collides with an existing shortcut
    248     private static Shortcut findShortcut(int requestedKey, int modifier) {
     248    public static Shortcut findShortcut(int requestedKey, int modifier) {
    249249        if (modifier == getGroupModifier(NONE))
    250250            return null;
Note: See TracChangeset for help on using the changeset viewer.