Ignore:
Timestamp:
2017-08-25T01:37:31+02:00 (7 years ago)
Author:
Don-vip
Message:

see #15182 - deprecate shortcut handling and mapframe listener methods in Main. Replacement: same methods in gui.MainApplication

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageViewerDialog.java

    r12636 r12639  
    2222import javax.swing.JToggleButton;
    2323
    24 import org.openstreetmap.josm.Main;
    2524import org.openstreetmap.josm.gui.MainApplication;
    2625import org.openstreetmap.josm.gui.dialogs.DialogsPanel.Action;
     
    101100                "geoimage:previous", tr("Geoimage: {0}", tr("Show previous Image")), KeyEvent.VK_PAGE_UP, Shortcut.DIRECT);
    102101        final String previousImage = "Previous Image";
    103         Main.registerActionShortcut(prevAction, scPrev);
     102        MainApplication.registerActionShortcut(prevAction, scPrev);
    104103        btnPrevious.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(scPrev.getKeyStroke(), previousImage);
    105104        btnPrevious.getActionMap().put(previousImage, prevAction);
     
    112111        Shortcut scDelete = Shortcut.registerShortcut(
    113112                "geoimage:deleteimagefromlayer", tr("Geoimage: {0}", tr("Remove photo from layer")), KeyEvent.VK_DELETE, Shortcut.SHIFT);
    114         Main.registerActionShortcut(delAction, scDelete);
     113        MainApplication.registerActionShortcut(delAction, scDelete);
    115114        btnDelete.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(scDelete.getKeyStroke(), removePhoto);
    116115        btnDelete.getActionMap().put(removePhoto, delAction);
     
    123122                "geoimage:deletefilefromdisk", tr("Geoimage: {0}", tr("Delete File from disk")), KeyEvent.VK_DELETE, Shortcut.CTRL_SHIFT);
    124123        final String deleteImage = "Delete image file from disk";
    125         Main.registerActionShortcut(delFromDiskAction, scDeleteFromDisk);
     124        MainApplication.registerActionShortcut(delFromDiskAction, scDeleteFromDisk);
    126125        btnDeleteFromDisk.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(scDeleteFromDisk.getKeyStroke(), deleteImage);
    127126        btnDeleteFromDisk.getActionMap().put(deleteImage, delFromDiskAction);
     
    133132                "geoimage:copypath", tr("Geoimage: {0}", tr("Copy image path")), KeyEvent.VK_C, Shortcut.ALT_CTRL_SHIFT);
    134133        final String copyImage = "Copy image path";
    135         Main.registerActionShortcut(copyPathAction, scCopyPath);
     134        MainApplication.registerActionShortcut(copyPathAction, scCopyPath);
    136135        btnCopyPath.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(scCopyPath.getKeyStroke(), copyImage);
    137136        btnCopyPath.getActionMap().put(copyImage, copyPathAction);
     
    143142                "geoimage:next", tr("Geoimage: {0}", tr("Show next Image")), KeyEvent.VK_PAGE_DOWN, Shortcut.DIRECT);
    144143        final String nextImage = "Next Image";
    145         Main.registerActionShortcut(nextAction, scNext);
     144        MainApplication.registerActionShortcut(nextAction, scNext);
    146145        btnNext.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(scNext.getKeyStroke(), nextImage);
    147146        btnNext.getActionMap().put(nextImage, nextAction);
    148147        btnNext.setEnabled(false);
    149148
    150         Main.registerActionShortcut(
     149        MainApplication.registerActionShortcut(
    151150                new ImageAction(COMMAND_FIRST, null, null),
    152151                Shortcut.registerShortcut(
    153152                        "geoimage:first", tr("Geoimage: {0}", tr("Show first Image")), KeyEvent.VK_HOME, Shortcut.DIRECT)
    154153        );
    155         Main.registerActionShortcut(
     154        MainApplication.registerActionShortcut(
    156155                new ImageAction(COMMAND_LAST, null, null),
    157156                Shortcut.registerShortcut(
Note: See TracChangeset for help on using the changeset viewer.