Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix shortcut for JOSM scripts #243

Merged
merged 1 commit into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading