Changeset 2318 in josm


Ignore:
Timestamp:
2009-10-25T15:51:51+01:00 (15 years ago)
Author:
Gubaer
Message:

fixed #3739: History dialog displays anonymous users as "User: ". Should be "User: <anonymous>" or similar
Added context-sensitive help to the HistoryBrowser

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

Legend:

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

    r2019 r2318  
    2121import org.openstreetmap.josm.data.osm.history.HistoryDataSetListener;
    2222import org.openstreetmap.josm.gui.SideButton;
    23 import org.openstreetmap.josm.gui.dialogs.HistoryDialog;
     23import org.openstreetmap.josm.gui.help.ContextSensitiveHelpAction;
     24import org.openstreetmap.josm.gui.help.HelpUtil;
    2425import org.openstreetmap.josm.tools.ImageProvider;
     26import static org.openstreetmap.josm.gui.help.HelpUtil.ht;
    2527
    2628/**
     
    7173        btn.setName("btn.close");
    7274        pnl.add(btn);
     75
     76        btn = new SideButton(new ContextSensitiveHelpAction(ht("/Dialog/History")));
     77        btn.setName("btn.help");
     78        pnl.add(btn);
    7379        add(pnl, BorderLayout.SOUTH);
     80
     81        HelpUtil.setHelpContext(getRootPane(), ht("/Dialog/History"));
    7482
    7583        setSize(800, 500);
  • trunk/src/org/openstreetmap/josm/gui/history/VersionInfoPanel.java

    r2254 r2318  
    1212import java.util.Observable;
    1313import java.util.Observer;
     14import java.util.logging.Logger;
    1415
    1516import javax.swing.JLabel;
     
    2627 */
    2728public class VersionInfoPanel extends JPanel implements Observer{
     29    static private final Logger logger = Logger.getLogger(VersionInfoPanel.class.getName());
    2830
    2931    private PointInTimeType pointInTimeType;
     
    123125            lblUser.setUrl(null);
    124126        }
    125         lblUser.setDescription(getPrimitive().getUser());
     127        String username = getPrimitive().getUser();
     128        lblUser.setDescription(username);
    126129    }
    127130}
  • trunk/src/org/openstreetmap/josm/tools/UrlLabel.java

    r2250 r2318  
    4848    }
    4949
     50    /**
     51     * Sets the URL to be visited if the user clicks on this URL label. If null, the
     52     * label turns into a normal label without hyperlink.
     53     *
     54     * @param url the url. Can be null.
     55     */
    5056    public void setUrl(String url) {
    51         this.url = url == null ? "" : url;
     57        this.url = url;
    5258        refresh();
    5359    }
    5460
     61    /**
     62     * Sets the text part of the URL label. Defaults to the empty string if description is null.
     63     *
     64     * @param description the description
     65     */
    5566    public void setDescription(String description) {
    5667        this.description = description == null? "" : description;
     68        this.description = this.description.replace("&", "&amp;").replace(">", "&gt;").replace("<", "&lt;");
    5769        refresh();
    5870    }
Note: See TracChangeset for help on using the changeset viewer.