Author: pmouawad Date: Sun Nov 19 10:21:59 2017 New Revision: 1815719 URL: http://svn.apache.org/viewvc?rev=1815719&view=rev Log: Add release notes link to About dialog
Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/action/AboutCommand.java jmeter/trunk/src/core/org/apache/jmeter/gui/action/ActionNames.java jmeter/trunk/src/core/org/apache/jmeter/gui/action/OpenLinkAction.java Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/action/AboutCommand.java URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/action/AboutCommand.java?rev=1815719&r1=1815718&r2=1815719&view=diff ============================================================================== --- jmeter/trunk/src/core/org/apache/jmeter/gui/action/AboutCommand.java (original) +++ jmeter/trunk/src/core/org/apache/jmeter/gui/action/AboutCommand.java Sun Nov 19 10:21:59 2017 @@ -113,6 +113,16 @@ public class AboutCommand extends Abstra JLabel copyright = new JLabel(JMeterUtils.getJMeterCopyright(), SwingConstants.CENTER); JLabel rights = new JLabel("All Rights Reserved.", SwingConstants.CENTER); JLabel version = new JLabel("Apache JMeter Version " + JMeterUtils.getJMeterVersion(), SwingConstants.CENTER); + JLabel releaseNotes = new JLabel("<html><a href=\"https://jmeter.apache.org/changes.html\">Release notes</a></html>", SwingConstants.CENTER); + releaseNotes.addMouseListener(new MouseAdapter() { + @Override + public void mouseClicked(MouseEvent e) { + if (e.getClickCount() > 0) { + ActionRouter.getInstance().doActionNow( + new ActionEvent(e.getSource(), e.getID(), ActionNames.LINK_RELEASE_NOTES)); + } + } + }); JPanel infos = new JPanel(); infos.setOpaque(false); infos.setLayout(new GridLayout(0, 1)); @@ -120,6 +130,7 @@ public class AboutCommand extends Abstra infos.add(copyright); infos.add(rights); infos.add(version); + infos.add(releaseNotes); Container panel = about.getContentPane(); panel.setLayout(new BorderLayout()); panel.setBackground(Color.white); Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/action/ActionNames.java URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/action/ActionNames.java?rev=1815719&r1=1815718&r2=1815719&view=diff ============================================================================== --- jmeter/trunk/src/core/org/apache/jmeter/gui/action/ActionNames.java (original) +++ jmeter/trunk/src/core/org/apache/jmeter/gui/action/ActionNames.java Sun Nov 19 10:21:59 2017 @@ -62,6 +62,7 @@ public final class ActionNames { public static final String LAF_PREFIX = "laf:"; // Look and Feel prefix public static final String LINK_BUG_TRACKER = "link_bug_tracker:"; // URI of bug tracker public static final String LINK_NIGHTLY_BUILD = "link_nightly_build:"; // URI of nightly build + public static final String LINK_RELEASE_NOTES = "link_release_notes"; // URI of nightly build public static final String LOGGER_PANEL_ENABLE_DISABLE = "logger_panel_enable_disable"; // $NON-NLS-1$ public static final String LOG_LEVEL_PREFIX = "loglevel:"; // Logger level prefix public static final String MERGE = "merge"; // $NON-NLS-1$ Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/action/OpenLinkAction.java URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/action/OpenLinkAction.java?rev=1815719&r1=1815718&r2=1815719&view=diff ============================================================================== --- jmeter/trunk/src/core/org/apache/jmeter/gui/action/OpenLinkAction.java (original) +++ jmeter/trunk/src/core/org/apache/jmeter/gui/action/OpenLinkAction.java Sun Nov 19 10:21:59 2017 @@ -35,6 +35,7 @@ public class OpenLinkAction extends Abst static { commands.add(ActionNames.LINK_BUG_TRACKER); commands.add(ActionNames.LINK_NIGHTLY_BUILD); + commands.add(ActionNames.LINK_RELEASE_NOTES); } /** @@ -47,6 +48,11 @@ public class OpenLinkAction extends Abst url = "https://jmeter.apache.org/issues.html"; } else if (e.getActionCommand().equals(ActionNames.LINK_NIGHTLY_BUILD)) { url = "https://jmeter.apache.org/nightly.html"; + } else if (e.getActionCommand().equals(ActionNames.LINK_RELEASE_NOTES)) { + url = "https://jmeter.apache.org/changes.html"; + } else { + log.warn("Action {} not handled by this class", e.getActionCommand()); + return; } try { java.awt.Desktop.getDesktop().browse(java.net.URI.create(url));