diff --git a/src/main/java/org/openstreetmap/josm/plugins/mapillary/gui/ImageColorPicker.java b/src/main/java/org/openstreetmap/josm/plugins/mapillary/gui/ImageColorPicker.java index b75306af3..0b020cad5 100644 --- a/src/main/java/org/openstreetmap/josm/plugins/mapillary/gui/ImageColorPicker.java +++ b/src/main/java/org/openstreetmap/josm/plugins/mapillary/gui/ImageColorPicker.java @@ -68,6 +68,7 @@ public ImageColorPicker() { colorPanel.setPreferredSize(new Dimension(COLOR_AREA, COLOR_AREA)); tempColorPanel.setPreferredSize(new Dimension(COLOR_AREA, COLOR_AREA)); + /* SHORTCUT(Mapillary: Copy color, mapillary:copy_to_clipboard_Copy_color, CHAR_UNDEFINED, NONE) */ copyAction = new ClipboardAction(tr("Copy color"), tr("Copied color to clipboard"), null); final MapillaryButton copyButton = new MapillaryButton(copyAction, true); copyAction.setPopupParent(copyButton); diff --git a/src/main/java/org/openstreetmap/josm/plugins/mapillary/gui/imageinfo/ClipboardAction.java b/src/main/java/org/openstreetmap/josm/plugins/mapillary/gui/imageinfo/ClipboardAction.java index cb05cb898..d0d49b8fc 100644 --- a/src/main/java/org/openstreetmap/josm/plugins/mapillary/gui/imageinfo/ClipboardAction.java +++ b/src/main/java/org/openstreetmap/josm/plugins/mapillary/gui/imageinfo/ClipboardAction.java @@ -64,6 +64,7 @@ public class ClipboardAction extends MapillaryAction { public ClipboardAction(final String name, final String successMessage, final Transferable contents) { super(tr(name), "copy", tr("Copy {0} to clipboard", tr(name)), Shortcut.registerShortcut("mapillary:copy_to_clipboard_" + name.replace(' ', '_'), + /* NO-SHORTCUT - add definition in classes using ClipboardAction */ tr("Mapillary: {0}", tr(name)), KeyEvent.CHAR_UNDEFINED, Shortcut.NONE), false, "mapillary:copy_to_clipboard_" + name.replace(' ', '_'), false); this.contents = contents; diff --git a/src/main/java/org/openstreetmap/josm/plugins/mapillary/gui/imageinfo/ImageInfoPanel.java b/src/main/java/org/openstreetmap/josm/plugins/mapillary/gui/imageinfo/ImageInfoPanel.java index 0302ec6de..9f95ea72e 100644 --- a/src/main/java/org/openstreetmap/josm/plugins/mapillary/gui/imageinfo/ImageInfoPanel.java +++ b/src/main/java/org/openstreetmap/josm/plugins/mapillary/gui/imageinfo/ImageInfoPanel.java @@ -122,10 +122,12 @@ private ImageInfoPanel() { imgLinkAction = new WebLinkAction(marktr("View in browser"), null); + /* SHORTCUT(Mapillary: Copy URL, mapillary:copy_to_clipboard_Copy_URL, CHAR_UNDEFINED, NONE) */ copyImgUrlAction = new ClipboardAction(marktr("Copy URL"), tr("Copied URL to clipboard …"), null); final var copyUrlButton = new MapillaryButton(copyImgUrlAction, true); copyImgUrlAction.setPopupParent(copyUrlButton); + /* SHORTCUT(Mapillary: Copy key, mapillary:copy_to_clipboard_Copy_key, CHAR_UNDEFINED, NONE) */ copyImgKeyAction = new ClipboardAction(marktr("Copy key"), tr("Copied key to clipboard …"), null); final var copyKeyButton = new MapillaryButton(copyImgKeyAction, true); copyImgKeyAction.setPopupParent(copyKeyButton);