Ticket #24376: usernameLabel.patch

File usernameLabel.patch, 1.6 KB (added by reubot, 6 months ago)
  • src/org/openstreetmap/josm/gui/io/BasicUploadSettingsPanel.java

     
    3131import javax.swing.event.TableModelEvent;
    3232import javax.swing.event.TableModelListener;
    3333
     34import org.openstreetmap.josm.data.UserIdentityManager;
    3435import org.openstreetmap.josm.data.osm.Changeset;
    3536import org.openstreetmap.josm.data.osm.OsmPrimitive;
    3637import org.openstreetmap.josm.gui.MainApplication;
     
    6768    public static final String SOURCE_HISTORY_KEY = "upload.source.history";
    6869
    6970    /** the history combo box for the upload comment */
     71    private final String userName = UserIdentityManager.getInstance().getUserName();
     72
     73    private final JMultilineLabel usernameLabel = new JMultilineLabel(
     74            tr("Will be uploaded as <strong>{0}</strong>", userName));
    7075    private final HistoryComboBox hcbUploadComment = new HistoryComboBox();
    7176    private final HistoryComboBox hcbUploadSource = new HistoryComboBox();
    7277    private final transient JCheckBox obtainSourceAutomatically = new JCheckBox(
     
    106111        setLayout(new GridBagLayout());
    107112        setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3));
    108113        GBC gbc = GBC.eop().fill(GBC.HORIZONTAL);
     114        add(usernameLabel, gbc);
    109115        add(buildUploadCommentPanel(), gbc);
    110116        add(buildUploadSourcePanel(), gbc);
    111117        add(pnlUploadParameterSummary, gbc);