Skip to content

Commit

Permalink
add help topics
Browse files Browse the repository at this point in the history
  • Loading branch information
stoecker committed Jan 16, 2025
1 parent 359abb1 commit 8d7f21b
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// License: GPL. For details, see LICENSE file.
package org.openstreetmap.josm.plugins.maproulette.actions;

import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
import static org.openstreetmap.josm.tools.I18n.tr;

import java.awt.event.ActionEvent;
Expand Down Expand Up @@ -31,6 +32,7 @@ public DownloadTasks() {
tr("MapRoulette: Download additional tasks from challenge"), KeyEvent.CHAR_UNDEFINED,
Shortcut.NONE),
false);
putValue("help", ht("/Dialog/MapRouletteDownloadTasks"));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// License: GPL. For details, see LICENSE file.
package org.openstreetmap.josm.plugins.maproulette.actions;

import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
import static org.openstreetmap.josm.tools.I18n.marktr;
import static org.openstreetmap.josm.tools.I18n.tr;

Expand Down Expand Up @@ -42,6 +43,7 @@ public IgnoreAction(IgnoreType type) {
"maproulette:ignore." + type.name().toLowerCase(Locale.ROOT),
tr("MapRoulette: {0}", tr(type.getButtonText())), KeyEvent.CHAR_UNDEFINED, Shortcut.NONE),
false);
putValue("help", ht("/Action/MapRouletteIgnore"));
this.type = type;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// License: GPL. For details, see LICENSE file.
package org.openstreetmap.josm.plugins.maproulette.actions.downloadtasks;

import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
import static org.openstreetmap.josm.tools.I18n.tr;

import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ public final class ChallengeAPI {
* The base path for challenge requests
*/
private static final String PATH = "/challenge";
/**
* The base path for challenges requests
*/
private static final String PATHS = PATH + "s";

/**
* Don't allow the API object to be instantiated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* @param parentId The id of the parent
* @param parentName The name of the parent
* @param location The location of the task
* @param bounding
* @param bounding The bounds
* @param blurb The first line of the task instructions
* @param modified When the task was last modified
* @param difficulty The difficulty (only if a challenge)
Expand All @@ -33,7 +33,7 @@
* @param mappedOn The time the task was mapped
* @param completedTimeSpent The amount of time from when the task was locked to when it was mapped
* @param completedBy Who completed the task
* @param pointReview
* @param pointReview Review information
* @param priority The priority of the task
* @param bundleId The bundle for this task
* @param isBundlePrimary If the bundle is the primary bundle
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// License: GPL. For details, see LICENSE file.
package org.openstreetmap.josm.plugins.maproulette.gui.task.current;

import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
import static org.openstreetmap.josm.tools.I18n.tr;

import java.awt.Component;
Expand Down Expand Up @@ -121,6 +122,11 @@ public CurrentTaskPanel() {
super.createLayout(this.panel.getVerticalScrollPane(), false, sideButtons);
}

@Override
public String helpTopic() {
return ht("/Dialog/CurrentMapRouletteTask");
}

private static void showPopupMenu(Component parent, Object... menuItems) {
final var menu = new JPopupMenu();
final var box = parent.getBounds();
Expand Down Expand Up @@ -345,6 +351,7 @@ abstract static class InnerAction extends JosmAction {
*/
protected InnerAction(String name, String iconName, String tooltip, Shortcut shortcut, boolean registerInToolbar) {
super(name, iconName, tooltip, shortcut, registerInToolbar, true);
putValue("help", ht("/Dialog/MapRouletteCurrentTask"));
}

@Override
Expand All @@ -371,6 +378,7 @@ private static class SelectOsmPrimitives extends InnerAction {
false);
Objects.requireNonNull(taskSupplier);
this.taskSuppler = taskSupplier;
putValue("help", ht("/Dialog/MapRouletteCurrentTask#SelectOsmPrimitives"));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// License: GPL. For details, see LICENSE file.
package org.openstreetmap.josm.plugins.maproulette.gui.task.list;

import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
import static org.openstreetmap.josm.tools.I18n.tr;

import java.awt.event.ActionEvent;
Expand Down Expand Up @@ -51,6 +52,7 @@ final class LockUnlockTaskAction extends JosmAction {
KeyEvent.CHAR_UNDEFINED, Shortcut.NONE),
false);
Objects.requireNonNull(table, "table");
putValue("help", ht("/Dialog/MapRouletteStartTask"));
this.table = table;
}

Expand Down

0 comments on commit 8d7f21b

Please sign in to comment.