Ignore:
Timestamp:
2020-09-26T19:06:40+02:00 (4 years ago)
Author:
Klumbumbus
Message:

fix #19850 - Add possibility to add a shortcut for more actions and toggle dialogs, fix shortcut display name of some selection menu entries

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

Legend:

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

    r16704 r17062  
    66
    77import java.awt.event.ActionEvent;
     8import java.awt.event.KeyEvent;
    89
    910import org.openstreetmap.josm.data.osm.OsmData;
     11import org.openstreetmap.josm.tools.Shortcut;
    1012
    1113/**
     
    1820     */
    1921    public InvertSelectionAction() {
    20         super(tr("Invert Selection"), "invert_selection", tr("Invert Selection"), null, true);
    21         setHelpId(ht("/Action/InvertSelection"));
     22        super(tr("Invert Selection"), "invert_selection", tr("Invert Selection"),
     23                Shortcut.registerShortcut("selection:invertselection",
     24                tr("Selection: {0}", tr("Invert Selection")), KeyEvent.CHAR_UNDEFINED, Shortcut.NONE), true);
     25                setHelpId(ht("/Action/InvertSelection"));
    2226    }
    2327
  • trunk/src/org/openstreetmap/josm/actions/SearchNotesDownloadAction.java

    r16509 r17062  
    77import java.awt.GridBagLayout;
    88import java.awt.event.ActionEvent;
     9import java.awt.event.KeyEvent;
    910import java.util.Collections;
    1011import java.util.Optional;
     
    2425import org.openstreetmap.josm.tools.Logging;
    2526import org.openstreetmap.josm.tools.Utils;
     27import org.openstreetmap.josm.tools.Shortcut;
    2628
    2729/**
     
    3537    /** Constructs a new note search action */
    3638    public SearchNotesDownloadAction() {
    37         super(tr("Search Notes..."), "note_search", tr("Download notes from the note search API"), null, false, false);
     39        super(tr("Search Notes..."), "note_search", tr("Download notes from the note search API"),
     40                Shortcut.registerShortcut("file:notesearch",
     41                tr("File: {0}", tr("Search Notes...")), KeyEvent.CHAR_UNDEFINED, Shortcut.NONE), false, false);
    3842    }
    3943
  • trunk/src/org/openstreetmap/josm/actions/SelectAllAction.java

    r16509 r17062  
    2121    public SelectAllAction() {
    2222        super(tr("Select All"), "selectall", tr("Select all undeleted objects in the data layer. This selects incomplete objects too."),
    23                 Shortcut.registerShortcut("system:selectall", tr("Edit: {0}", tr("Select All")), KeyEvent.VK_A, Shortcut.CTRL), true);
     23                Shortcut.registerShortcut("system:selectall", tr("Selection: {0}", tr("Select All")), KeyEvent.VK_A, Shortcut.CTRL), true);
    2424        setHelpId(ht("/Action/SelectAll"));
    2525    }
  • trunk/src/org/openstreetmap/josm/actions/SelectNonBranchingWaySequencesAction.java

    r16509 r17062  
    2424                "way-select",
    2525                tr("Select non-branching sequences of ways"),
    26                 Shortcut.registerShortcut("wayselector:wayselect", tr("Non-branching way sequences"), KeyEvent.VK_W, Shortcut.SHIFT),
     26                Shortcut.registerShortcut("wayselector:wayselect", tr("Selection: {0}", tr("Non-branching way sequences")),
     27                    KeyEvent.VK_W, Shortcut.SHIFT),
    2728                true);
    2829    }
  • trunk/src/org/openstreetmap/josm/actions/UnselectAllAction.java

    r16509 r17062  
    2020    public UnselectAllAction() {
    2121        super(tr("Unselect All"), "unselectall", tr("Unselect all objects."),
    22             Shortcut.registerShortcut("edit:unselectall", tr("Edit: {0}",
     22            Shortcut.registerShortcut("edit:unselectall", tr("Selection: {0}",
    2323            tr("Unselect All")), KeyEvent.VK_ESCAPE, Shortcut.DIRECT), true);
    2424
Note: See TracChangeset for help on using the changeset viewer.