Skip to content
Open
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
2 changes: 0 additions & 2 deletions .github/workflows/ant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ on:
branches:
- master
- $default-branch
schedule:
- cron: "43 13 * * 1"
workflow_dispatch:

jobs:
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<dependency>
<groupId>org.commonmark</groupId>
<artifactId>commonmark</artifactId>
<version>0.22.0</version>
<version>0.24.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,26 @@ public class IgnoreAction extends JosmAction {
*/
private final IgnoreType type;

/**
* Generate shortcuts in a manner friendly for the ShortcutsList
* @param type The type
* @return The shortcut
*/
private static Shortcut generateShortcut(IgnoreType type) {
return switch (type) {
case IGNORE_TASK -> Shortcut.registerShortcut("maproulette:ignore.ignore_task", tr("MapRoulette: Ignore Task"), KeyEvent.CHAR_UNDEFINED, Shortcut.NONE);
case IGNORE_CHALLENGE -> Shortcut.registerShortcut("maproulette:ignore.ignore_challenge", tr("MapRoulette: Ignore Challenge"), KeyEvent.CHAR_UNDEFINED, Shortcut.NONE);
};
}

/**
* Create a new action object
*
* @param type The type of object we are ignoring
*/
public IgnoreAction(IgnoreType type) {
super(tr(type.getButtonText()), "dialogs/fix", tr(type.getButtonText()),
Shortcut.registerShortcut(
/* NO-SHORTCUT */ "maproulette:ignore." + type.name().toLowerCase(Locale.ROOT),
tr("MapRoulette: {0}", tr(type.getButtonText())), KeyEvent.CHAR_UNDEFINED, Shortcut.NONE),
false);
generateShortcut(type), false);
this.type = type;
}

Expand All @@ -68,9 +77,7 @@ public void actionPerformed(ActionEvent e) {
* The ignore type
*/
public enum IgnoreType {
/* SHORTCUT(MapRoulette: Ignore Task, maproulette:ignore.task, NONE, UNDEFINED) */
IGNORE_TASK(marktr("Ignore Task")),
/* SHORTCUT(MapRoulette: Ignore Challenge, maproulette:ignore.challenge, NONE, UNDEFINED) */
IGNORE_CHALLENGE(marktr("Ignore Challenge"));

private final String buttonText;
Expand Down
Loading