Allow MapWithAI actions to be assigned to the toolbar

Signed-off-by: Taylor Smock <taylor.smock@kaart.com>
pull/1/head
Taylor Smock 2020-05-05 15:06:15 -06:00
rodzic a8d8c6b48d
commit 8637ca6f96
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 625F6A74A3E4311A
4 zmienionych plików z 6 dodań i 6 usunięć

Wyświetl plik

@ -34,7 +34,7 @@ public class MapWithAIAction extends JosmAction {
super(tr("{0}: Download data", MapWithAIPlugin.NAME), "mapwithai", super(tr("{0}: Download data", MapWithAIPlugin.NAME), "mapwithai",
tr("Get data from {0}", MapWithAIPlugin.NAME), Shortcut.registerShortcut("data:mapWithAI", tr("Get data from {0}", MapWithAIPlugin.NAME), Shortcut.registerShortcut("data:mapWithAI",
tr("Data: {0}", MapWithAIPlugin.NAME), KeyEvent.VK_R, Shortcut.CTRL), tr("Data: {0}", MapWithAIPlugin.NAME), KeyEvent.VK_R, Shortcut.CTRL),
true); true, "mapwithai:downloadData", true);
setHelpId(ht("Plugin/MapWithAI#BasicUsage")); setHelpId(ht("Plugin/MapWithAI#BasicUsage"));
} }

Wyświetl plik

@ -185,10 +185,10 @@ public final class MapWithAIDataUtils {
monitor.close(); monitor.close();
} }
} else { } else {
final Notification noUrls = MapWithAIPreferenceHelper.getMapWithAIUrl().isEmpty() final Notification noUrls = GuiHelper.runInEDTAndWaitAndReturn(
? new Notification(tr( () -> MapWithAIPreferenceHelper.getMapWithAIUrl().isEmpty() ? new Notification(tr(
"There are no defined URLs. Attempting to add the appropriate servers.\nPlease try again.")) "There are no defined URLs. Attempting to add the appropriate servers.\nPlease try again."))
: new Notification(tr("No URLS are enabled")); : new Notification(tr("No URLS are enabled")));
noUrls.setDuration(Notification.TIME_DEFAULT); noUrls.setDuration(Notification.TIME_DEFAULT);
noUrls.setIcon(JOptionPane.INFORMATION_MESSAGE); noUrls.setIcon(JOptionPane.INFORMATION_MESSAGE);
noUrls.setHelpTopic(ht("Plugin/MapWithAI#Preferences")); noUrls.setHelpTopic(ht("Plugin/MapWithAI#Preferences"));

Wyświetl plik

@ -37,7 +37,7 @@ public class MapWithAIMoveAction extends JosmAction {
public MapWithAIMoveAction() { public MapWithAIMoveAction() {
super(tr("{0}: Add selected data", MapWithAIPlugin.NAME), "mapwithai", super(tr("{0}: Add selected data", MapWithAIPlugin.NAME), "mapwithai",
tr("Add data from {0}", MapWithAIPlugin.NAME), obtainShortcut(), true); tr("Add data from {0}", MapWithAIPlugin.NAME), obtainShortcut(), true, "mapwithai:movedata", true);
setHelpId(ht("Plugin/MapWithAI#BasicUsage")); setHelpId(ht("Plugin/MapWithAI#BasicUsage"));
} }

Wyświetl plik

@ -29,7 +29,7 @@ public class MergeDuplicateWaysAction extends JosmAction {
super(tr("{0}: ".concat(DESCRIPTION), MapWithAIPlugin.NAME), "mapwithai", tr(DESCRIPTION), super(tr("{0}: ".concat(DESCRIPTION), MapWithAIPlugin.NAME), "mapwithai", tr(DESCRIPTION),
Shortcut.registerShortcut("data:attemptmergeway", tr(DESCRIPTION), KeyEvent.VK_EXCLAMATION_MARK, Shortcut.registerShortcut("data:attemptmergeway", tr(DESCRIPTION), KeyEvent.VK_EXCLAMATION_MARK,
Shortcut.ALT_CTRL_SHIFT), Shortcut.ALT_CTRL_SHIFT),
true); true, "mapwithai:attemptmergeway", true);
setHelpId(ht("Plugin/MapWithAI")); setHelpId(ht("Plugin/MapWithAI"));
} }