Ticket #11914: 11914-v2.patch

File 11914-v2.patch, 1.3 KB (added by GerdP, 3 months ago)

use @

  • src/org/openstreetmap/josm/gui/MainFrame.java

     
    2020import javax.swing.JFrame;
    2121import javax.swing.JPanel;
    2222
     23import org.openstreetmap.josm.data.UserIdentityManager;
    2324import org.openstreetmap.josm.gui.layer.LayerManager.LayerAddEvent;
    2425import org.openstreetmap.josm.gui.layer.LayerManager.LayerChangeListener;
    2526import org.openstreetmap.josm.gui.layer.LayerManager.LayerOrderChangeEvent;
     
    165166        OsmDataLayer editLayer = MainApplication.getLayerManager().getEditLayer();
    166167        boolean dirty = editLayer != null && (editLayer.requiresSaveToFile()
    167168                || (editLayer.requiresUploadToServer() && !editLayer.isUploadDiscouraged()));
    168         setTitle((dirty ? "* " : "") + tr("Java OpenStreetMap Editor"));
     169        String user = UserIdentityManager.getInstance().getUserName();
     170        if (user != null)
     171            user = " (@"  + user + ")";
     172        else
     173            user = "";
     174        setTitle((dirty ? "* " : "") + tr("Java OpenStreetMap Editor") + user);
    169175        getRootPane().putClientProperty("Window.documentModified", dirty);
    170176    }
    171177