Changeset 19122 in josm
- Timestamp:
- 2024-06-20T17:24:54+02:00 (4 months ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/JosmAction.java
r18801 r19122 537 537 if (!answer && JOptionPane.NO_OPTION == ConditionalOptionPaneUtil.getDialogReturnValue(preferenceKey)) { 538 538 String message = tr("Operation was not performed, as per {0} preference", preferenceKey); 539 new Notification(message).s how();539 new Notification(message).setIcon(JOptionPane.INFORMATION_MESSAGE).show(); 540 540 Logging.info(message); 541 541 } -
trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java
r19108 r19122 167 167 String message = tr("Unable to locate file ''{0}''.", file.getPath()); 168 168 Logging.warn(message); 169 new Notification(message).s how();169 new Notification(message).setIcon(JOptionPane.WARNING_MESSAGE).show(); 170 170 } 171 171 } -
trunk/src/org/openstreetmap/josm/actions/ToggleUploadDiscouragedLayerAction.java
r19116 r19122 12 12 import javax.swing.JCheckBoxMenuItem; 13 13 14 import javax.swing.JOptionPane; 14 15 import org.openstreetmap.josm.gui.Notification; 15 16 import org.openstreetmap.josm.gui.dialogs.LayerListDialog; … … 44 45 layer.setUploadDiscouraged(!layer.isUploadDiscouraged()); 45 46 String msg = layer.isUploadDiscouraged() ? tr("Upload is discouraged") : tr("Upload is encouraged"); 46 GuiHelper.runInEDT(() -> new Notification(msg).s how());47 GuiHelper.runInEDT(() -> new Notification(msg).setIcon(JOptionPane.INFORMATION_MESSAGE).show()); 47 48 LayerListDialog.getInstance().repaint(); 48 49 } -
trunk/src/org/openstreetmap/josm/actions/UploadAction.java
r18871 r19122 266 266 public void uploadData(final OsmDataLayer layer, APIDataSet apiData) { 267 267 if (apiData.isEmpty()) { 268 new Notification(tr("No changes to upload.")).s how();268 new Notification(tr("No changes to upload.")).setIcon(JOptionPane.INFORMATION_MESSAGE).show(); 269 269 return; 270 270 } … … 273 273 realUploadData(layer, apiData); 274 274 } else { 275 new Notification(tr("One of the upload verification processes failed")).show(); 275 new Notification(tr("One of the upload verification processes failed")) 276 .setIcon(JOptionPane.WARNING_MESSAGE) 277 .show(); 276 278 } 277 279 })); … … 342 344 return; 343 345 if (MainApplication.getMap() == null) { 344 new Notification(tr("Nothing to upload. Get some data first.")).s how();346 new Notification(tr("Nothing to upload. Get some data first.")).setIcon(JOptionPane.INFORMATION_MESSAGE).show(); 345 347 return; 346 348 } -
trunk/src/org/openstreetmap/josm/actions/UploadSelectionAction.java
r18801 r19122 14 14 import java.util.stream.Collectors; 15 15 16 import javax.swing.JOptionPane; 16 17 import javax.swing.SwingUtilities; 17 18 … … 97 98 Collection<OsmPrimitive> deletedCandidates = getDeletedPrimitives(editLayer.getDataSet()); 98 99 if (modifiedCandidates.isEmpty() && deletedCandidates.isEmpty()) { 99 new Notification(tr("No changes to upload.")).s how();100 new Notification(tr("No changes to upload.")).setIcon(JOptionPane.INFORMATION_MESSAGE).show(); 100 101 return; 101 102 } … … 110 111 Collection<OsmPrimitive> toUpload = new UploadHullBuilder().build(dialog.getSelectedPrimitives()); 111 112 if (toUpload.isEmpty()) { 112 new Notification(tr("No changes to upload.")).s how();113 new Notification(tr("No changes to upload.")).setIcon(JOptionPane.INFORMATION_MESSAGE).show(); 113 114 return; 114 115 } -
trunk/src/org/openstreetmap/josm/actions/ViewportFollowToggleAction.java
r17795 r19122 8 8 import java.awt.event.KeyEvent; 9 9 10 import javax.swing.JOptionPane; 10 11 import org.openstreetmap.josm.actions.mapmode.DrawAction; 11 12 import org.openstreetmap.josm.data.preferences.BooleanProperty; … … 53 54 ? tr("Viewport following is enabled, press {0} to disable it", getShortcut().getKeyText()) 54 55 : tr("Viewport following is disabled"); 55 GuiHelper.runInEDT(() -> new Notification(msg).s how());56 GuiHelper.runInEDT(() -> new Notification(msg).setIcon(JOptionPane.INFORMATION_MESSAGE).show()); 56 57 } 57 58 notifySelectedState(); -
trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java
r19108 r19122 316 316 } 317 317 if (!GraphicsEnvironment.isHeadless()) { 318 new Notification(msg).s how();318 new Notification(msg).setIcon(JOptionPane.INFORMATION_MESSAGE).show(); 319 319 } 320 320 } else { -
trunk/src/org/openstreetmap/josm/gui/MapStatus.java
r19108 r19122 50 50 import javax.swing.JLabel; 51 51 import javax.swing.JMenuItem; 52 import javax.swing.JOptionPane; 52 53 import javax.swing.JPanel; 53 54 import javax.swing.JPopupMenu; … … 1017 1018 if (Config.getPref().getBoolean("statusbar.notify.change-system-of-measurement", true)) { 1018 1019 new Notification(tr("System of measurement changed to {0}", som.toString())) 1020 .setIcon(JOptionPane.INFORMATION_MESSAGE) 1019 1021 .setDuration(Notification.TIME_SHORT) 1020 1022 .show(); -
trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java
r19112 r19122 516 516 try { 517 517 new Notification(HttpClient.create(new URL(tile.getUrl() + '/' + request)) 518 .connect().fetchContent()).s how();518 .connect().fetchContent()).setIcon(JOptionPane.INFORMATION_MESSAGE).show(); 519 519 } catch (IOException ex) { 520 520 Logging.error(ex); -
trunk/src/org/openstreetmap/josm/gui/layer/AutosaveTask.java
r18801 r19122 53 53 import org.openstreetmap.josm.gui.util.GuiHelper; 54 54 import org.openstreetmap.josm.spi.preferences.Config; 55 import org.openstreetmap.josm.tools.ImageProvider; 55 56 import org.openstreetmap.josm.tools.Logging; 56 57 import org.openstreetmap.josm.tools.Utils; … … 273 274 protected void displayNotification() { 274 275 new Notification(tr("Your work has been saved automatically.")) 275 .setDuration(Notification.TIME_SHORT) 276 .show(); 276 .setIcon(ImageProvider.get("save")) 277 .setDuration(Notification.TIME_SHORT) 278 .show(); 277 279 } 278 280
Note:
See TracChangeset
for help on using the changeset viewer.