Ignore:
Timestamp:
2009-10-05T21:39:15+02:00 (10 years ago)
Author:
Gubaer
Message:

fixed #3653: History for anonymous users should not be clickable
fixed #3518: Provide a new feature for uploading the currently selected primitives

Location:
trunk/src/org/openstreetmap/josm/gui/history
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowser.java

    r2243 r2250  
    9696
    9797        pane.setOneTouchExpandable(true);
    98         pane.setDividerLocation(150);
     98        pane.setDividerLocation(200);
    9999
    100100        Dimension minimumSize = new Dimension(100, 50);
  • trunk/src/org/openstreetmap/josm/gui/history/VersionInfoPanel.java

    r2243 r2250  
    77import java.awt.GridBagConstraints;
    88import java.awt.GridBagLayout;
     9import java.io.UnsupportedEncodingException;
     10import java.net.URLEncoder;
    911import java.text.SimpleDateFormat;
    1012import java.util.Observable;
     
    108110        String url = AbstractInfoAction.getBaseBrowseUrl() + "/changeset/" + getPrimitive().getChangesetId();
    109111        lblChangeset.setUrl(url);
    110         lblChangeset.setDescription(tr("{0}", getPrimitive().getChangesetId()));
     112        lblChangeset.setDescription(Long.toString(getPrimitive().getChangesetId()));
    111113
    112         url = AbstractInfoAction.getBaseUserUrl() + "/" + getPrimitive().getUser();
    113         lblUser.setUrl(url);
    114         lblUser.setDescription(tr("{0}", getPrimitive().getUser()));
     114        try {
     115            if (getPrimitive().getUid() != -1) {
     116                url = AbstractInfoAction.getBaseUserUrl() + "/" +  URLEncoder.encode(getPrimitive().getUser(), "UTF-8").replaceAll("\\+", "%20");
     117                lblUser.setUrl(url);
     118            } else {
     119                lblUser.setUrl(null);
     120            }
     121        } catch(UnsupportedEncodingException e) {
     122            e.printStackTrace();
     123            lblUser.setUrl(null);
     124        }
     125        lblUser.setDescription(getPrimitive().getUser());
    115126    }
    116127}
  • trunk/src/org/openstreetmap/josm/gui/history/VersionTableCellRenderer.java

    r1709 r2250  
    5959            sb.append("");
    6060        } else {
    61             sb.append(tr("Version {0}", Long.toString(primitive.getVersion())));
     61            String msg = tr(
     62                    "Version {0}, {1} (by {2})",
     63                    Long.toString(primitive.getVersion()),
     64                    new SimpleDateFormat().format(primitive.getTimestamp()),
     65                    primitive.getUser()
     66            );
     67            sb.append(msg);
    6268        }
    6369        setText(sb.toString());
Note: See TracChangeset for help on using the changeset viewer.