kopia lustrzana https://github.com/JOSM/MapWithAI
Allow MapWithAI actions to be assigned to the toolbar
Signed-off-by: Taylor Smock <taylor.smock@kaart.com>pull/1/head
rodzic
a8d8c6b48d
commit
8637ca6f96
|
@ -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"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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"));
|
||||||
|
|
|
@ -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"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue