Ignore:
Timestamp:
2012-02-15T19:01:41+01:00 (13 years ago)
Author:
akks
Message:

'Utilsplugin2: fixing shortcut deprecation'

Location:
applications/editors/josm/plugins/utilsplugin2
Files:
26 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/utilsplugin2/build.xml

    r27751 r27761  
    3030<project name="utilsplugin2" default="dist" basedir=".">
    3131    <!-- enter the SVN commit message -->
    32     <property name="commit.message" value="Utilsplugin2: moved SplitObject to ctrl-P"/>
     32    <property name="commit.message" value="Utilsplugin2: fixing shortcut deprecation"/>
    3333    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    34     <property name="plugin.main.version" value="4847"/>
     34    <property name="plugin.main.version" value="4937"/>
    3535    <!--
    3636      ************************************************
  • applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/AddIntersectionsAction.java

    r25898 r27761  
    2929    public AddIntersectionsAction() {
    3030        super(tr("Add nodes at intersections"), "addintersect", tr("Add missing nodes at intersections of selected ways."),
    31                 Shortcut.registerShortcut("tools:addintersect", tr("Tool: {0}", tr("Add nodes at intersections")), KeyEvent.VK_I, Shortcut.GROUP_EDIT, Shortcut.SHIFT_DEFAULT), true);
     31                Shortcut.registerShortcut("tools:addintersect", tr("Tool: {0}", tr("Add nodes at intersections")), KeyEvent.VK_I,  Shortcut.GROUPS_ALT1+Shortcut.GROUP_EDIT), true);
    3232        putValue("help", ht("/Action/AddIntersections"));
    3333    }
  • applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/ExtractPointAction.java

    r27410 r27761  
    3434                tr("Extracts node from a way"),
    3535                Shortcut.registerShortcut("tools:extnode", tr("Tool: {0}","Extract node"),
    36                 KeyEvent.VK_J, Shortcut.GROUP_EDIT, KeyEvent.ALT_DOWN_MASK  ), true);
     36                KeyEvent.VK_J, Shortcut.GROUP_DIRECT2  ), true);
    3737        putValue("help", ht("/Action/ExtractNode"));
    3838    }
  • applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/LatLonAction.java

    r27443 r27761  
    3131    public LatLonAction() {
    3232        super(tr("Lat Lon tool"), "latlon", tr("Create geometry by entering lat lon coordinates for it."),
    33                 Shortcut.registerShortcut("latlon", tr("Edit: {0}", tr("Lat Lon tool")), KeyEvent.VK_L, Shortcut.GROUP_HOTKEY,
    34                         Shortcut.SHIFT_DEFAULT), true);
     33                Shortcut.registerShortcut("latlon", tr("Edit: {0}", tr("Lat Lon tool")), KeyEvent.VK_L, Shortcut.GROUP_DIRECT3), true);
    3534        putValue("help", ht("/Action/AddNode"));
    3635    }
  • applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/SymmetryAction.java

    r26603 r27761  
    3636        super(tr("Symmetry"), "symmetry", tr("Mirror selected nodes and ways."),
    3737                Shortcut.registerShortcut("tools:symmetry", tr("Tool: {0}", tr("Symmetry")),
    38                         KeyEvent.VK_S, Shortcut.GROUP_EDIT,  KeyEvent.SHIFT_DOWN_MASK|KeyEvent.ALT_DOWN_MASK ), true);
     38                        KeyEvent.VK_S, Shortcut.GROUPS_ALT1+Shortcut.GROUP_DIRECT2), true);
    3939        putValue("help", ht("/Action/Symmetry"));
    4040    }
  • applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/UnGlueRelationAction.java

    r24236 r27761  
    4343    public UnGlueRelationAction() {
    4444        super(tr("UnGlue Relation"), "ungluerelations", tr("Duplicate nodes, ways and relations that are used by multiple relations."),
    45               Shortcut.registerShortcut("tools:ungluerelation", tr("Tool: {0}", tr("UnGlue Relations")), KeyEvent.VK_G, Shortcut.GROUP_EDIT, Shortcut.SHIFT_DEFAULT ), true);
     45              Shortcut.registerShortcut("tools:ungluerelation", tr("Tool: {0}", tr("UnGlue Relations")), KeyEvent.VK_G, Shortcut.GROUPS_ALT1+Shortcut.GROUP_DIRECT2 ), true);
    4646        putValue("help", ht("/Action/UnGlueRelation"));
    4747    }
  • applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/curves/CurveAction.java

    r27618 r27761  
    3131        super(tr("Circle arc"), "circlearc", tr("Create a circle arc"),
    3232                Shortcut.registerShortcut("tools:createcurve", tr("Tool: {0}", tr("Create a circle arc")), KeyEvent.VK_C,
    33                         Shortcut.GROUP_EDIT, Shortcut.SHIFT_DEFAULT), true);
     33                        Shortcut.GROUPS_ALT1+Shortcut.GROUP_EDIT), true);
    3434        putValue("help", ht("/Action/CreateCircleArc"));
    3535        updatePreferences();
  • applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/customurl/ChooseURLAction.java

    r27426 r27761  
    2929    public ChooseURLAction() {
    3030         super(tr("Select custom URL"), "selecturl", tr("Select custom URL"),null,true,true);
    31          putValue("toolbar", "action/selectURL");
    3231    }
    3332
     
    6261        }
    6362        final JLabel label1=new JLabel(tr("Please select one of custom URLs (configured in Preferences)"));
    64         final JList list1=new JList(names);
     63        final JList<String> list1=new JList<String>(names);
    6564        final JTextField editField=new JTextField();
    6665        final JCheckBox check1=new JCheckBox(tr("Ask every time"));
  • applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/customurl/OpenPageAction.java

    r27426 r27761  
    3636                tr("Opens specified URL browser"),
    3737                Shortcut.registerShortcut("tools:openurl", tr("Tool: {0}", tr("Open custom URL")),
    38                 KeyEvent.VK_H, Shortcut.GROUP_EDIT, Shortcut.SHIFT_DEFAULT), true);
     38                KeyEvent.VK_H, Shortcut.GROUPS_ALT1+Shortcut.GROUP_EDIT), true);
    3939        putValue("help", ht("/Action/OpenPage"));
    4040    }
  • applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/dumbutils/AlignWayNodesAction.java

    r27564 r27761  
    2323    public AlignWayNodesAction() {
    2424        super(TITLE, "dumbutils/alignwaynodes", tr("Align nodes in a way"),
    25                 Shortcut.registerShortcut("tools:alignwaynodes", tr("Tool: {0}", tr("Align Way Nodes")), KeyEvent.VK_L, Shortcut.GROUP_EDIT, Shortcut.SHIFT_DEFAULT)
     25                Shortcut.registerShortcut("tools:alignwaynodes", tr("Tool: {0}", tr("Align Way Nodes")), KeyEvent.VK_L, Shortcut.GROUPS_ALT1+Shortcut.GROUP_EDIT)
    2626                , true);
    2727    }
  • applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/dumbutils/PasteRelationsAction.java

    r27564 r27761  
    2121    public PasteRelationsAction() {
    2222        super(TITLE, "dumbutils/pasterelations", tr("Paste relation membership from objects in the buffer onto selected object(s)"),
    23                 Shortcut.registerShortcut("tools:pasterelations", tr("Tool: {0}",  tr("Paste Relations")), KeyEvent.VK_V, Shortcut.GROUP_MENU, KeyEvent.ALT_DOWN_MASK | KeyEvent.CTRL_DOWN_MASK), true);
     23                Shortcut.registerShortcut("tools:pasterelations", tr("Tool: {0}",  tr("Paste Relations")), KeyEvent.VK_V, Shortcut.GROUPS_ALT2+Shortcut.GROUP_MENU), true);
    2424    }
    2525
  • applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/dumbutils/ReplaceGeometryAction.java

    r27750 r27761  
    3333    public ReplaceGeometryAction() {
    3434        super(TITLE, "dumbutils/replacegeometry", tr("Replace geometry of selected object with a new one"),
    35                 Shortcut.registerShortcut("tools:replacegeometry", tr("Tool: {0}", tr("Replace Geometry")), KeyEvent.VK_G, Shortcut.GROUP_HOTKEY, Shortcut.SHIFT_DEFAULT)
     35                Shortcut.registerShortcut("tools:replacegeometry", tr("Tool: {0}", tr("Replace Geometry")), KeyEvent.VK_G, Shortcut.GROUPS_ALT1+Shortcut.GROUP_MENU)
    3636                , true);
    3737    }
  • applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/dumbutils/TagBufferAction.java

    r27564 r27761  
    2424    public TagBufferAction() {
    2525        super(TITLE, "dumbutils/tagbuffer", tr("Pastes tags of previously selected object(s)"),
    26                 Shortcut.registerShortcut("tools:tagbuffer", tr("Tool: {0}", tr("Copy tags from previous selection")), KeyEvent.VK_R, Shortcut.GROUP_EDIT, Shortcut.SHIFT_DEFAULT)
     26                Shortcut.registerShortcut("tools:tagbuffer", tr("Tool: {0}", tr("Copy tags from previous selection")), KeyEvent.VK_R, Shortcut.GROUPS_ALT1+Shortcut.GROUP_EDIT)
    2727                , true);
    2828    }
  • applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/dumbutils/TagSourceAction.java

    r27564 r27761  
    2424    public TagSourceAction() {
    2525        super(TITLE, "dumbutils/sourcetag", tr("Add remembered source tag"),
    26                 Shortcut.registerShortcut("tools:sourcetag", tr("Tool: {0}", tr("Add Source Tag")), KeyEvent.VK_S, Shortcut.GROUP_MENU, KeyEvent.CTRL_DOWN_MASK | KeyEvent.ALT_DOWN_MASK)
     26                Shortcut.registerShortcut("tools:sourcetag", tr("Tool: {0}", tr("Add Source Tag")), KeyEvent.VK_S, Shortcut.GROUPS_ALT2+Shortcut.GROUP_MENU)
    2727                , true);
    2828        source = Main.pref.get("sourcetag.value");
  • applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/selection/AdjacentWaysAction.java

    r26509 r27761  
    2626                tr("Adjacent ways will be selected. Nodes will be deselected."),
    2727                Shortcut.registerShortcut("tools:adjways", tr("Tool: {0}","Adjacent ways"),
    28                 KeyEvent.VK_E, Shortcut.GROUP_EDIT, Shortcut.SHIFT_DEFAULT), true);
     28                KeyEvent.VK_E, Shortcut.GROUPS_ALT1+Shortcut.GROUP_EDIT), true);
    2929        putValue("help", ht("/Action/AdjacentWays"));
    3030    }
  • applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/selection/ConnectedWaysAction.java

    r25876 r27761  
    2323        super(tr("All connected ways"), "adjwaysall", tr("Select all connected ways"),
    2424                Shortcut.registerShortcut("tools:adjwaysall", tr("Tool: {0}","All connected ways"),
    25                 KeyEvent.VK_E, Shortcut.GROUP_MENU, Shortcut.SHIFT_DEFAULT), true);
     25                KeyEvent.VK_E, Shortcut.GROUPS_ALT1+Shortcut.GROUP_MENU), true);
    2626        putValue("help", ht("/Action/SelectConnectedWays"));
    2727    }
  • applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/selection/IntersectedWaysRecursiveAction.java

    r26644 r27761  
    2525        super(tr("All intersecting ways"), "intwayall", tr("Select all intersecting ways"),
    2626                Shortcut.registerShortcut("tools:intwayall", tr("Tool: {0}","All intersecting ways"),
    27                 KeyEvent.VK_I, Shortcut.GROUP_MENU, KeyEvent.CTRL_DOWN_MASK|KeyEvent.ALT_DOWN_MASK), true);
     27                KeyEvent.VK_I, Shortcut.GROUPS_ALT2+Shortcut.GROUP_MENU), true);
    2828        putValue("help", ht("/Action/SelectAllIntersectingWays"));
    2929
  • applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/selection/MiddleNodesAction.java

    r26049 r27761  
    2727        super(tr("Middle nodes"), "midnodes", tr("Select middle nodes"),
    2828                Shortcut.registerShortcut("tools:midnodes", tr("Tool: {0}","Middle nodes"),
    29                 KeyEvent.VK_E,  Shortcut.GROUP_EDIT, KeyEvent.SHIFT_DOWN_MASK|KeyEvent.ALT_DOWN_MASK ), true);
     29                KeyEvent.VK_E,  Shortcut.GROUPS_ALT1+Shortcut.GROUP_DIRECT2), true);
    3030        putValue("help", ht("/Action/MiddleNodes"));
    3131    }
  • applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/selection/SelectAllInsideAction.java

    r27318 r27761  
    2929        super(tr("All inside [testing]"), "selinside", tr("Select all inside selected polygons"),
    3030                Shortcut.registerShortcut("tools:selinside", tr("Tool: {0}","All inside"),
    31                 KeyEvent.VK_I, Shortcut.GROUP_EDIT ,KeyEvent.ALT_DOWN_MASK|KeyEvent.SHIFT_DOWN_MASK), true);
     31                KeyEvent.VK_I, Shortcut.GROUPS_ALT1+Shortcut.GROUP_DIRECT2), true);
    3232        putValue("help", ht("/Action/SelectAllInside"));
    3333    }
  • applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/selection/SelectBoundaryAction.java

    r27318 r27761  
    3636        super(tr("Area boundary [testing]"), "selboundary", tr("Select relation or all ways that forms area boundary"),
    3737                Shortcut.registerShortcut("tools:selboundary", tr("Tool: {0}","Area boundary [testing]"),
    38                 KeyEvent.VK_SLASH, Shortcut.GROUP_EDIT ,Shortcut.SHIFT_DEFAULT), true);
     38                KeyEvent.VK_SLASH, Shortcut.GROUPS_ALT1+Shortcut.GROUP_EDIT), true);
    3939        putValue("help", ht("/Action/SelectAreaBoundary"));
    4040    }
     
    9191        if (selectedRelation!=null) {
    9292            int idx = rels.indexOf(selectedRelation);
    93             System.out.println("idx="+idx);
    9493            // selectedRelation has number idx in active relation list
    9594            if (idx>=0) {
  • applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/selection/SelectHighwayAction.java

    r26801 r27761  
    2424        super(tr("Select Highway"), "selecthighway", tr("Select highway for the name/ref given"),
    2525                Shortcut.registerShortcut("tools:selecthighway", tr("Tool: {0}","Select Highway"),
    26                 KeyEvent.VK_W, Shortcut.GROUP_MENU, Shortcut.SHIFT_DEFAULT), true);
     26                KeyEvent.VK_W, Shortcut.GROUPS_ALT2+Shortcut.GROUP_MENU), true);
    2727    }
    2828
  • applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/selection/SelectModNodesAction.java

    r26494 r27761  
    2828                tr("Select last modified nodes"),
    2929                Shortcut.registerShortcut("tools:selmodnodes", tr("Tool: {0}","Select last modified nodes"),
    30                 KeyEvent.VK_Z,  Shortcut.GROUP_EDIT, Shortcut.SHIFT_DEFAULT ), true);
     30                KeyEvent.VK_Z, Shortcut.GROUPS_ALT1+Shortcut.GROUP_EDIT), true);
    3131        putValue("help", ht("/Action/SelectLastModifiedNodes"));
    3232    }
  • applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/selection/SelectModWaysAction.java

    r26494 r27761  
    11// License: GPL. Copyright 2011 by Alexei Kasatkin and Martin Ždila
    22package utilsplugin2.selection;
    3 
    4 import org.openstreetmap.josm.command.Command;
    5 import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    6 import static org.openstreetmap.josm.tools.I18n.tr;
    73
    84import java.awt.event.ActionEvent;
     
    139import org.openstreetmap.josm.Main;
    1410import org.openstreetmap.josm.actions.JosmAction;
    15 import org.openstreetmap.josm.data.osm.*;
    16 
     11import org.openstreetmap.josm.command.Command;
     12import org.openstreetmap.josm.data.osm.Node;
     13import org.openstreetmap.josm.data.osm.OsmPrimitive;
     14import org.openstreetmap.josm.data.osm.Way;
     15import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
     16import static org.openstreetmap.josm.tools.I18n.tr;
    1717import org.openstreetmap.josm.tools.Shortcut;
    1818
     
    2828                tr("Select last modified ways"),
    2929                Shortcut.registerShortcut("tools:selmodways", tr("Tool: {0}","Select last modified ways"),
    30                 KeyEvent.VK_Z,  Shortcut.GROUP_EDIT, KeyEvent.ALT_MASK ), true);
     30                KeyEvent.VK_Z,  Shortcut.GROUP_DIRECT2), true);
    3131        putValue("help", ht("/Action/SelectLastModifiedWays"));
    3232    }
  • applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/selection/SelectWayNodesAction.java

    r25876 r27761  
    3131    public SelectWayNodesAction() {
    3232        super(tr("Select Way Nodes"),"selectwaynodes" , tr("Select all nodes of a selected way."),
    33                 Shortcut.registerShortcut("tools:selectwaynodes", tr("Tool: {0}", tr("Select Way Nodes")), KeyEvent.VK_N, Shortcut.GROUP_MENU, Shortcut.SHIFT_DEFAULT), true);
     33                Shortcut.registerShortcut("tools:selectwaynodes", tr("Tool: {0}", tr("Select Way Nodes")), KeyEvent.VK_N, Shortcut.GROUPS_ALT1+Shortcut.GROUP_MENU), true);
    3434        putValue("help", ht("/Action/SelectWayNodes"));
    3535    }
  • applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/selection/UndoSelectionAction.java

    r25913 r27761  
    2727                tr("Reselect last added object or selection form history"),
    2828                Shortcut.registerShortcut("tools:undoselection", tr("Tool: {0}","Undo selection"),
    29                 KeyEvent.VK_Z, Shortcut.GROUP_MENU,Shortcut.SHIFT_DEFAULT ), true);
     29                KeyEvent.VK_Z, Shortcut.GROUPS_ALT1+Shortcut.GROUP_MENU), true);
    3030        putValue("help", ht("/Action/UndoSelection"));
    3131    }
  • applications/editors/josm/plugins/utilsplugin2/src/utilsplugin2/selection/UnselectNodesAction.java

    r27417 r27761  
    2424                tr("Removes all nodes from selection"),
    2525                Shortcut.registerShortcut("tools:unsnodes", tr("Tool: {0}","Unselect nodes"),
    26                 KeyEvent.VK_U, Shortcut.GROUP_EDIT, Shortcut.SHIFT_DEFAULT), true);
     26                KeyEvent.VK_U, Shortcut.GROUPS_ALT1+Shortcut.GROUP_EDIT), true);
    2727        putValue("help", ht("/Action/UnselectNodes"));
    2828    }
Note: See TracChangeset for help on using the changeset viewer.