Skip to content

Commit

Permalink
Fix shortcut for JOSM scripts
Browse files Browse the repository at this point in the history
Signed-off-by: Taylor Smock <[email protected]>
  • Loading branch information
tsmock committed Dec 17, 2024
1 parent 3dbee78 commit 98a36ea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ private ImageInfoPanel() {

imgKeyValue = new HtmlPanel();

imgLinkAction = new WebLinkAction(marktr("View in browser"), null);
imgLinkAction = new WebLinkAction();

/* 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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,12 @@ public class WebLinkAction extends MapillaryAction {

/**
* Create a new action
*
* @param name The name to show users (use {@link I18n#marktr(String)})
* @param uri The original URI to open
*/
public WebLinkAction(final String name, final URI uri) {
super(tr(name), "link", tr("Open in browser"),
Shortcut.registerShortcut("mapillary:open_in_browser_" + name.replace(' ', '_'),
tr("Mapillary: Open {0} in browser", tr(name)), KeyEvent.CHAR_UNDEFINED, Shortcut.NONE),
false, "mapillary:open_in_browser_" + name.replace(' ', '_'), false);
setURI(uri);
public WebLinkAction() {
super(tr("View in browser"), "link", tr("Open in browser"),
Shortcut.registerShortcut("mapillary:open_in_browser_View_in_browser",
tr("Mapillary: Open {0} in browser", tr("View in browser")), KeyEvent.CHAR_UNDEFINED, Shortcut.NONE),
false, "mapillary:open_in_browser_View_in_browser", false);
}

/**
Expand Down

0 comments on commit 98a36ea

Please sign in to comment.