Changeset 1051 in josm


Ignore:
Timestamp:
2008-10-23T14:02:38+02:00 (16 years ago)
Author:
stoecker
Message:

cleanup shortcut modification a bit

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

Legend:

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

    r1050 r1051  
    6868
    6969        public AboutAction() {
    70                 super(tr("About"), "about", tr("Display the about screen."), ShortCut.registerShortCut("system:about", tr("About..."), KeyEvent.VK_F1, ShortCut.GROUP_DIRECT, ShortCut.SHIFT), true);
     70                super(tr("About"), "about", tr("Display the about screen."), ShortCut.registerShortCut("system:about", tr("About..."), KeyEvent.VK_F1, ShortCut.GROUP_DIRECT, ShortCut.SHIFT_DEFAULT), true);
    7171        }
    7272
  • trunk/src/org/openstreetmap/josm/actions/CreateCircleAction.java

    r1050 r1051  
    3636        public CreateCircleAction() {
    3737                super(tr("Create Circle"), "createcircle", tr("Create a circle from three selected nodes."),
    38                 ShortCut.registerShortCut("tools:createcircle", tr("Tool: Create circle"), KeyEvent.VK_O, ShortCut.GROUP_EDIT, ShortCut.SHIFT), true);
     38                ShortCut.registerShortCut("tools:createcircle", tr("Tool: Create circle"), KeyEvent.VK_O, ShortCut.GROUP_EDIT, ShortCut.SHIFT_DEFAULT), true);
    3939        }
    4040
  • trunk/src/org/openstreetmap/josm/actions/PasteTagsAction.java

    r1050 r1051  
    2727                super(tr("Paste Tags"), "pastetags",
    2828                        tr("Apply tags of contents of paste buffer to all selected items."),
    29                         ShortCut.registerShortCut("system:pastestyle", tr("Edit: Paste tags"), KeyEvent.VK_V, ShortCut.GROUP_MENU, ShortCut.SHIFT_CTRL), true);
     29                        ShortCut.registerShortCut("system:pastestyle", tr("Edit: Paste tags"), KeyEvent.VK_V, ShortCut.GROUP_MENU, ShortCut.SHIFT_DEFAULT), true);
    3030                DataSet.selListeners.add(this);
    3131                copyAction.addListener(this);
  • trunk/src/org/openstreetmap/josm/actions/SaveAsAction.java

    r1050 r1051  
    2323        public SaveAsAction(Layer layer) {
    2424                super(tr("Save as ..."), "save_as", tr("Save the current data to a new file."),
    25                 ShortCut.registerShortCut("system:saveas", tr("File: Save as..."), KeyEvent.VK_S, ShortCut.GROUP_MENU, ShortCut.SHIFT_CTRL), layer);
     25                ShortCut.registerShortCut("system:saveas", tr("File: Save as..."), KeyEvent.VK_S, ShortCut.GROUP_MENU, ShortCut.SHIFT_DEFAULT), layer);
    2626        }
    2727
  • trunk/src/org/openstreetmap/josm/actions/UnselectAllAction.java

    r1050 r1051  
    2222                Main.contentPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(
    2323                ShortCut.registerShortCut("edit:unselectall2", tr("Edit: Unselect all (2)"),
    24                 KeyEvent.VK_A, ShortCut.GROUP_MENU, ShortCut.SHIFT_CTRL).getKeyStroke(),
     24                KeyEvent.VK_A, ShortCut.GROUP_MENU, ShortCut.SHIFT_DEFAULT).getKeyStroke(),
    2525                tr("Unselect All"));
    2626
  • trunk/src/org/openstreetmap/josm/tools/ShortCut.java

    r1050 r1051  
    2929 */
    3030public class ShortCut {
    31         public static final int SHIFT = KeyEvent.SHIFT_DOWN_MASK;
    32         public static final int CTRL = KeyEvent.CTRL_DOWN_MASK;
    33         public static final int SHIFT_CTRL = KeyEvent.SHIFT_DOWN_MASK|KeyEvent.CTRL_DOWN_MASK;
     31//      public static final int SHIFT = KeyEvent.SHIFT_DOWN_MASK;
     32//      public static final int CTRL = KeyEvent.CTRL_DOWN_MASK;
     33//      public static final int SHIFT_CTRL = KeyEvent.SHIFT_DOWN_MASK|KeyEvent.CTRL_DOWN_MASK;
     34        public static final int SHIFT_DEFAULT = 1;
    3435        private String shortText;        // the unique ID of the shortcut
    3536        private String longText;         // a human readable description that will be shown in the preferences
     
    309310                int i = 0;
    310311                for (ShortCut sc : ShortCuts.values()) {
     312// TODO: Remove sc.getAssignedUser() when we fixed all internal conflicts
    311313                        if (!sc.getAutomatic() && !sc.getReset() && sc.getAssignedUser()) {
    312314                                Main.pref.put("shortcut.shortcut."+i, sc.asPrefString());
     
    386388                Integer defaultModifier = Groups.get(requestedGroup + GROUPS_DEFAULT);
    387389                if(modifier != null) {
    388                         defaultModifier = modifier;
     390                        if(modifier == SHIFT_DEFAULT)
     391                                defaultModifier |= KeyEvent.SHIFT_MASK;
     392                        else
     393                                defaultModifier = modifier;
    389394                }
    390395                else if (defaultModifier == null) { // garbage in, no shortcurt out
Note: See TracChangeset for help on using the changeset viewer.