Changeset 19122 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2024-06-20T17:24:54+02:00 (5 months ago)
Author:
stoecker
Message:

fix #23745 - add more icons, patch by gaben

Location:
trunk/src/org/openstreetmap/josm
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/JosmAction.java

    r18801 r19122  
    537537        if (!answer && JOptionPane.NO_OPTION == ConditionalOptionPaneUtil.getDialogReturnValue(preferenceKey)) {
    538538            String message = tr("Operation was not performed, as per {0} preference", preferenceKey);
    539             new Notification(message).show();
     539            new Notification(message).setIcon(JOptionPane.INFORMATION_MESSAGE).show();
    540540            Logging.info(message);
    541541        }
  • trunk/src/org/openstreetmap/josm/actions/OpenFileAction.java

    r19108 r19122  
    167167                    String message = tr("Unable to locate file  ''{0}''.", file.getPath());
    168168                    Logging.warn(message);
    169                     new Notification(message).show();
     169                    new Notification(message).setIcon(JOptionPane.WARNING_MESSAGE).show();
    170170                }
    171171            }
  • trunk/src/org/openstreetmap/josm/actions/ToggleUploadDiscouragedLayerAction.java

    r19116 r19122  
    1212import javax.swing.JCheckBoxMenuItem;
    1313
     14import javax.swing.JOptionPane;
    1415import org.openstreetmap.josm.gui.Notification;
    1516import org.openstreetmap.josm.gui.dialogs.LayerListDialog;
     
    4445        layer.setUploadDiscouraged(!layer.isUploadDiscouraged());
    4546        String msg = layer.isUploadDiscouraged() ? tr("Upload is discouraged") : tr("Upload is encouraged");
    46         GuiHelper.runInEDT(() -> new Notification(msg).show());
     47        GuiHelper.runInEDT(() -> new Notification(msg).setIcon(JOptionPane.INFORMATION_MESSAGE).show());
    4748        LayerListDialog.getInstance().repaint();
    4849    }
  • trunk/src/org/openstreetmap/josm/actions/UploadAction.java

    r18871 r19122  
    266266    public void uploadData(final OsmDataLayer layer, APIDataSet apiData) {
    267267        if (apiData.isEmpty()) {
    268             new Notification(tr("No changes to upload.")).show();
     268            new Notification(tr("No changes to upload.")).setIcon(JOptionPane.INFORMATION_MESSAGE).show();
    269269            return;
    270270        }
     
    273273                realUploadData(layer, apiData);
    274274            } 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();
    276278            }
    277279        }));
     
    342344            return;
    343345        if (MainApplication.getMap() == null) {
    344             new Notification(tr("Nothing to upload. Get some data first.")).show();
     346            new Notification(tr("Nothing to upload. Get some data first.")).setIcon(JOptionPane.INFORMATION_MESSAGE).show();
    345347            return;
    346348        }
  • trunk/src/org/openstreetmap/josm/actions/UploadSelectionAction.java

    r18801 r19122  
    1414import java.util.stream.Collectors;
    1515
     16import javax.swing.JOptionPane;
    1617import javax.swing.SwingUtilities;
    1718
     
    9798        Collection<OsmPrimitive> deletedCandidates = getDeletedPrimitives(editLayer.getDataSet());
    9899        if (modifiedCandidates.isEmpty() && deletedCandidates.isEmpty()) {
    99             new Notification(tr("No changes to upload.")).show();
     100            new Notification(tr("No changes to upload.")).setIcon(JOptionPane.INFORMATION_MESSAGE).show();
    100101            return;
    101102        }
     
    110111        Collection<OsmPrimitive> toUpload = new UploadHullBuilder().build(dialog.getSelectedPrimitives());
    111112        if (toUpload.isEmpty()) {
    112             new Notification(tr("No changes to upload.")).show();
     113            new Notification(tr("No changes to upload.")).setIcon(JOptionPane.INFORMATION_MESSAGE).show();
    113114            return;
    114115        }
  • trunk/src/org/openstreetmap/josm/actions/ViewportFollowToggleAction.java

    r17795 r19122  
    88import java.awt.event.KeyEvent;
    99
     10import javax.swing.JOptionPane;
    1011import org.openstreetmap.josm.actions.mapmode.DrawAction;
    1112import org.openstreetmap.josm.data.preferences.BooleanProperty;
     
    5354                    ? tr("Viewport following is enabled, press {0} to disable it", getShortcut().getKeyText())
    5455                    : tr("Viewport following is disabled");
    55             GuiHelper.runInEDT(() -> new Notification(msg).show());
     56            GuiHelper.runInEDT(() -> new Notification(msg).setIcon(JOptionPane.INFORMATION_MESSAGE).show());
    5657        }
    5758        notifySelectedState();
  • trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java

    r19108 r19122  
    316316                }
    317317                if (!GraphicsEnvironment.isHeadless()) {
    318                     new Notification(msg).show();
     318                    new Notification(msg).setIcon(JOptionPane.INFORMATION_MESSAGE).show();
    319319                }
    320320            } else {
  • trunk/src/org/openstreetmap/josm/gui/MapStatus.java

    r19108 r19122  
    5050import javax.swing.JLabel;
    5151import javax.swing.JMenuItem;
     52import javax.swing.JOptionPane;
    5253import javax.swing.JPanel;
    5354import javax.swing.JPopupMenu;
     
    10171018        if (Config.getPref().getBoolean("statusbar.notify.change-system-of-measurement", true)) {
    10181019            new Notification(tr("System of measurement changed to {0}", som.toString()))
     1020                .setIcon(JOptionPane.INFORMATION_MESSAGE)
    10191021                .setDuration(Notification.TIME_SHORT)
    10201022                .show();
  • trunk/src/org/openstreetmap/josm/gui/layer/AbstractTileSourceLayer.java

    r19112 r19122  
    516516            try {
    517517                new Notification(HttpClient.create(new URL(tile.getUrl() + '/' + request))
    518                         .connect().fetchContent()).show();
     518                        .connect().fetchContent()).setIcon(JOptionPane.INFORMATION_MESSAGE).show();
    519519            } catch (IOException ex) {
    520520                Logging.error(ex);
  • trunk/src/org/openstreetmap/josm/gui/layer/AutosaveTask.java

    r18801 r19122  
    5353import org.openstreetmap.josm.gui.util.GuiHelper;
    5454import org.openstreetmap.josm.spi.preferences.Config;
     55import org.openstreetmap.josm.tools.ImageProvider;
    5556import org.openstreetmap.josm.tools.Logging;
    5657import org.openstreetmap.josm.tools.Utils;
     
    273274    protected void displayNotification() {
    274275        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();
    277279    }
    278280
Note: See TracChangeset for help on using the changeset viewer.