Changeset 17335 in josm


Ignore:
Timestamp:
2020-11-23T16:47:41+01:00 (3 years ago)
Author:
Don-vip
Message:

see #20139 - avoid shortcut conflict between "open location" actions

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

Legend:

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

    r16628 r17335  
    8484     */
    8585    public OpenLocationAction() {
     86        this(Shortcut.registerShortcut("system:open_location", tr("File: {0}", tr("Open Location...")), KeyEvent.VK_L, Shortcut.CTRL));
     87    }
     88
     89    /**
     90     * Create an open action. The name is "Open a file".
     91     * @param shortcut action shortcut, can be null for subclasses
     92     */
     93    protected OpenLocationAction(Shortcut shortcut) {
    8694        /* I18N: Command to download a specific location/URL */
    87         super(tr("Open Location..."), "openlocation", tr("Open an URL."),
    88                 Shortcut.registerShortcut("system:open_location", tr("File: {0}", tr("Open Location...")),
    89                         KeyEvent.VK_L, Shortcut.CTRL), true, false);
     95        super(tr("Open Location..."), "openlocation", tr("Open an URL."), shortcut, shortcut != null, false);
    9096        setHelpId(ht("/Action/OpenLocation"));
    9197        this.downloadTasks = new ArrayList<>();
  • trunk/src/org/openstreetmap/josm/gui/datatransfer/importers/OsmLinkPaster.java

    r11986 r17335  
    2828
    2929    static final class NoWarnOpenLocationAction extends OpenLocationAction {
     30
     31        NoWarnOpenLocationAction() {
     32            super(null);
     33        }
     34
    3035        @Override
    3136        protected void warnNoSuitableTasks(String url) {
Note: See TracChangeset for help on using the changeset viewer.