Changeset 16505 in josm for trunk/src/org


Ignore:
Timestamp:
2020-05-27T08:31:01+02:00 (5 years ago)
Author:
GerdP
Message:

see #19296: Actions should avoid to install listeners which are not needed
tbc

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

Legend:

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

    r14866 r16505  
    6464        super(tr("About"), "logo", tr("Display the about screen."),
    6565            Shortcut.registerShortcut("system:about", tr("About"),
    66             KeyEvent.VK_F1, Shortcut.SHIFT), true);
     66            KeyEvent.VK_F1, Shortcut.SHIFT), true, false);
    6767    }
    6868
  • trunk/src/org/openstreetmap/josm/actions/ChangesetManagerToggleAction.java

    r14951 r16505  
    3939
    4040    @Override
     41    protected void installAdapters() {
     42        // do nothing
     43    }
     44
     45    @Override
    4146    public void actionPerformed(ActionEvent e) {
    4247        toggleSelectedState(e);
  • trunk/src/org/openstreetmap/josm/actions/CloseChangesetAction.java

    r15430 r16505  
    5252                tr("File: {0}", tr("Close open changesets")),
    5353                KeyEvent.VK_Q, Shortcut.ALT_CTRL),
    54             true
     54            true, false
    5555        );
    5656        setHelpId(ht("/Action/CloseChangeset"));
  • trunk/src/org/openstreetmap/josm/actions/DownloadPrimitiveAction.java

    r14397 r16505  
    3434    public DownloadPrimitiveAction() {
    3535        super(tr("Download object..."), "downloadprimitive", tr("Download OSM object by ID"),
    36                 SHORTCUT, true);
     36                SHORTCUT, true, false);
    3737        setHelpId(ht("/Action/DownloadObject"));
    3838    }
  • trunk/src/org/openstreetmap/josm/actions/ExitAction.java

    r14397 r16505  
    2222    public ExitAction() {
    2323        super(tr("Exit"), "exit", tr("Exit the application."),
    24                 Shortcut.registerShortcut("system:menuexit", tr("Exit"), KeyEvent.VK_Q, Shortcut.CTRL), true);
     24                Shortcut.registerShortcut("system:menuexit", tr("Exit"), KeyEvent.VK_Q, Shortcut.CTRL), true, false);
    2525        setHelpId(ht("/Action/Exit"));
    2626    }
  • trunk/src/org/openstreetmap/josm/actions/FullscreenToggleAction.java

    r16138 r16505  
    4949        setSelected(Config.getPref().getBoolean("draw.fullscreen", false));
    5050        notifySelectedState();
     51    }
     52
     53    @Override
     54    protected void installAdapters() {
     55        // not needed
    5156    }
    5257
  • trunk/src/org/openstreetmap/josm/actions/HistoryInfoAction.java

    r16502 r16505  
    3636        super(tr("History"), "dialogs/history",
    3737                tr("Display history information about OSM ways, nodes, or relations."),
    38                 SHORTCUT, false);
     38                SHORTCUT, true, "action/historyinfo", false);
    3939        setHelpId(ht("/Action/ObjectHistory"));
    40         setToolbarId("action/historyinfo");
    41         MainApplication.getToolbar().register(this);
    4240        setEnabled(true);
    4341    }
  • trunk/src/org/openstreetmap/josm/actions/NewAction.java

    r14397 r16505  
    2323    public NewAction() {
    2424        super(tr("New Layer"), "new", tr("Create a new map layer."),
    25                 Shortcut.registerShortcut("system:new", tr("File: {0}", tr("New Layer")), KeyEvent.VK_N, Shortcut.CTRL), true);
     25                Shortcut.registerShortcut("system:new", tr("File: {0}", tr("New Layer")), KeyEvent.VK_N, Shortcut.CTRL), true, false);
    2626        setHelpId(ht("/Action/NewLayer"));
    2727    }
  • trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java

    r15784 r16505  
    6767    public OpenFileAction() {
    6868        super(tr("Open..."), "open", tr("Open a file."),
    69                 Shortcut.registerShortcut("system:open", tr("File: {0}", tr("Open...")), KeyEvent.VK_O, Shortcut.CTRL));
     69                Shortcut.registerShortcut("system:open", tr("File: {0}", tr("Open...")), KeyEvent.VK_O, Shortcut.CTRL),
     70                true, null, false);
    7071        setHelpId(ht("/Action/Open"));
    7172    }
  • trunk/src/org/openstreetmap/josm/actions/OpenLocationAction.java

    r16124 r16505  
    8787        super(tr("Open Location..."), "openlocation", tr("Open an URL."),
    8888                Shortcut.registerShortcut("system:open_location", tr("File: {0}", tr("Open Location...")),
    89                         KeyEvent.VK_L, Shortcut.CTRL), true);
     89                        KeyEvent.VK_L, Shortcut.CTRL), true, false);
    9090        setHelpId(ht("/Action/OpenLocation"));
    9191        this.downloadTasks = new ArrayList<>();
  • trunk/src/org/openstreetmap/josm/actions/PreferencesAction.java

    r14397 r16505  
    8888    public PreferencesAction() {
    8989        super(tr("Preferences..."), "preference", tr("Open a preferences dialog for global settings."),
    90                 Shortcut.registerShortcut("system:preferences", tr("Preferences"), KeyEvent.VK_F12, Shortcut.DIRECT), true);
     90                Shortcut.registerShortcut("system:preferences", tr("Preferences"), KeyEvent.VK_F12, Shortcut.DIRECT), true, false);
    9191        setHelpId(ht("/Action/Preferences"));
    9292        this.tab = null;
  • trunk/src/org/openstreetmap/josm/actions/RestartAction.java

    r16138 r16505  
    4949    public RestartAction() {
    5050        super(tr("Restart"), "restart", tr("Restart the application."),
    51                 Shortcut.registerShortcut("file:restart", tr("File: {0}", tr("Restart")), KeyEvent.VK_J, Shortcut.ALT_CTRL_SHIFT), false);
     51                Shortcut.registerShortcut("file:restart", tr("File: {0}", tr("Restart")), KeyEvent.VK_J, Shortcut.ALT_CTRL_SHIFT), false, false);
    5252        setHelpId(ht("/Action/Restart"));
    5353        setToolbarId("action/restart");
Note: See TracChangeset for help on using the changeset viewer.