jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1820379 - in /jmeter/trunk: src/core/org/apache/jmeter/gui/action/LookAndFeelCommand.java xdocs/changes.xml
Date Sat, 06 Jan 2018 09:41:17 GMT
Author: pmouawad
Date: Sat Jan  6 09:41:17 2018
New Revision: 1820379

URL: http://svn.apache.org/viewvc?rev=1820379&view=rev
Log:
Bug 61969 - When changing LAF through GUI, user should be informed that it is better to restart
Bugzilla Id: 61969

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/gui/action/LookAndFeelCommand.java
    jmeter/trunk/xdocs/changes.xml

Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/action/LookAndFeelCommand.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/action/LookAndFeelCommand.java?rev=1820379&r1=1820378&r2=1820379&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/action/LookAndFeelCommand.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/action/LookAndFeelCommand.java Sat Jan  6
09:41:17 2018
@@ -26,9 +26,11 @@ import java.util.Set;
 import java.util.prefs.Preferences;
 import java.util.stream.Collectors;
 
+import javax.swing.JOptionPane;
 import javax.swing.UIManager;
 import javax.swing.UnsupportedLookAndFeelException;
 
+import org.apache.jmeter.gui.GuiPackage;
 import org.apache.jmeter.gui.util.JMeterMenuBar;
 import org.apache.jmeter.util.JMeterUtils;
 import org.slf4j.Logger;
@@ -126,6 +128,13 @@ public class LookAndFeelCommand extends
             UIManager.setLookAndFeel(className);
             JMeterUtils.refreshUI();
             PREFS.put(USER_PREFS_KEY, className);
+            int chosenOption = JOptionPane.showConfirmDialog(GuiPackage.getInstance().getMainFrame(),
JMeterUtils
+                    .getResString("laf_quit_after_change"), // $NON-NLS-1$
+                    JMeterUtils.getResString("exit"), // $NON-NLS-1$
+                    JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);
+            if (chosenOption == JOptionPane.YES_OPTION) {
+                ActionRouter.getInstance().doActionNow(new ActionEvent(ev.getSource(), ev.getID(),
ActionNames.EXIT));
+            }
         } catch (UnsupportedLookAndFeelException
                 | InstantiationException
                 | ClassNotFoundException

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1820379&r1=1820378&r2=1820379&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml [utf-8] (original)
+++ jmeter/trunk/xdocs/changes.xml [utf-8] Sat Jan  6 09:41:17 2018
@@ -193,6 +193,7 @@ Summary
     <li><bug>61919</bug>UX : Reorder Menus. Contributed by Graham Russell
(graham at ham1.co.uk)</li>
     <li><bug>61920</bug>Plugins : Add ability to listen to Test Plan loading/closing.
Contributed by Peter Doornbosch (https://bitbucket.org/pjtr/)</li>
     <li><bug>61935</bug>Plugins : Let GUI component (dynamically) decide
whether it can be added via the menu or not. Contributed by Peter Doornbosch (https://bitbucket.org/pjtr/)</li>
+    <li><bug>61969</bug>When changing LAF through GUI, user should be informed
that it is better to restart</li>
 </ul>
 
 <ch_section>Non-functional changes</ch_section>



Mime
View raw message