Add a pref to allow toggling the MapWithAI remote control (dependent upon #18283)

Signed-off-by: Taylor Smock <taylor.smock@kaart.com>
pull/1/head
Taylor Smock 2019-11-01 09:06:10 -06:00
rodzic 14f2cf3559
commit 43e3e21c67
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 625F6A74A3E4311A
2 zmienionych plików z 5 dodań i 1 usunięć

Wyświetl plik

@ -83,6 +83,7 @@ public final class MapWithAIPlugin extends Plugin implements Destroyable {
setVersionInfo(info.localversion);
RequestProcessor.addRequestHandlerClass("mapwithai", MapWithAIRemoteControl.class);
new MapWithAIRemoteControl(); // instantiate to get action into Remote Control Preferences
destroyables = new ArrayList<>();
destroyables.add(new MapWithAIUploadHook(info));
mapFrameInitialized(null, MainApplication.getMap());

Wyświetl plik

@ -16,6 +16,9 @@ import org.openstreetmap.josm.plugins.mapwithai.MapWithAIPlugin;
public class MapWithAIRemoteControl extends RequestHandler.RawURLParseRequestHandler {
private static final PermissionPrefWithDefault PERMISSION_PREF_WITH_DEFAULT = new PermissionPrefWithDefault(
MapWithAIPlugin.NAME.concat(".remote_control"), true, tr("MapWithAI"));
private BBox download = null;
private BBox crop = null;
private Integer maxObj = null;
@ -134,7 +137,7 @@ public class MapWithAIRemoteControl extends RequestHandler.RawURLParseRequestHan
@Override
public PermissionPrefWithDefault getPermissionPref() {
return null;
return PERMISSION_PREF_WITH_DEFAULT;
}
@Override