kopia lustrzana https://github.com/JOSM/MapWithAI
Change notification timeouts
Signed-off-by: Taylor Smock <taylor.smock@kaart.com>pull/1/head
rodzic
d62089662c
commit
14f2cf3559
|
@ -98,7 +98,7 @@ public class MapWithAIAction extends JosmAction {
|
||||||
}
|
}
|
||||||
|
|
||||||
notification.setContent(message.toString());
|
notification.setContent(message.toString());
|
||||||
notification.setDuration(Notification.TIME_LONG);
|
notification.setDuration(Notification.TIME_DEFAULT);
|
||||||
notification.setIcon(JOptionPane.INFORMATION_MESSAGE);
|
notification.setIcon(JOptionPane.INFORMATION_MESSAGE);
|
||||||
notification.show();
|
notification.show();
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,6 +26,7 @@ import org.openstreetmap.josm.tools.Shortcut;
|
||||||
public class MapWithAIMoveAction extends JosmAction {
|
public class MapWithAIMoveAction extends JosmAction {
|
||||||
/** UID for abstract action */
|
/** UID for abstract action */
|
||||||
private static final long serialVersionUID = 319374598;
|
private static final long serialVersionUID = 319374598;
|
||||||
|
private Notification lastNotification = null;
|
||||||
|
|
||||||
public MapWithAIMoveAction() {
|
public MapWithAIMoveAction() {
|
||||||
super(tr("{0}: Add selected data", MapWithAIPlugin.NAME), null, tr("Add data from {0}", MapWithAIPlugin.NAME),
|
super(tr("{0}: Add selected data", MapWithAIPlugin.NAME), null, tr("Add data from {0}", MapWithAIPlugin.NAME),
|
||||||
|
@ -78,10 +79,13 @@ public class MapWithAIMoveAction extends JosmAction {
|
||||||
message.append(tr("maximum additions per action are ")).append(maxAddition).append(", ");
|
message.append(tr("maximum additions per action are ")).append(maxAddition).append(", ");
|
||||||
message.append(tr("tried to add ")).append(triedToAdd).append(".");
|
message.append(tr("tried to add ")).append(triedToAdd).append(".");
|
||||||
notification.setContent(message.toString());
|
notification.setContent(message.toString());
|
||||||
notification.setDuration(Notification.TIME_LONG);
|
notification.setDuration(Notification.TIME_DEFAULT);
|
||||||
notification.setIcon(JOptionPane.INFORMATION_MESSAGE);
|
notification.setIcon(JOptionPane.INFORMATION_MESSAGE);
|
||||||
notification.show();
|
notification.show();
|
||||||
|
if (lastNotification != null) {
|
||||||
|
lastNotification.setDuration(0);
|
||||||
|
}
|
||||||
|
lastNotification = notification;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Ładowanie…
Reference in New Issue