You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by pm...@apache.org on 2014/09/07 21:17:10 UTC
svn commit: r1623109 - in /jmeter/trunk:
src/core/org/apache/jmeter/gui/util/JMeterToolBar.java xdocs/changes.xml
Author: pmouawad
Date: Sun Sep 7 19:17:09 2014
New Revision: 1623109
URL: http://svn.apache.org/r1623109
Log:
Bug 54100 - Switching languages during test messes toolbar buttons state (enabled/disabled)
Bugzilla Id: 54100
Modified:
jmeter/trunk/src/core/org/apache/jmeter/gui/util/JMeterToolBar.java
jmeter/trunk/xdocs/changes.xml
Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/util/JMeterToolBar.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/util/JMeterToolBar.java?rev=1623109&r1=1623108&r2=1623109&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/util/JMeterToolBar.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/util/JMeterToolBar.java Sun Sep 7 19:17:09 2014
@@ -176,8 +176,28 @@ public class JMeterToolBar extends JTool
*/
@Override
public void localeChanged(LocaleChangeEvent event) {
+ Map<String, Boolean> currentButtonStates = getCurrentButtonsStates();
this.removeAll();
setupToolbarContent(this);
+ updateButtons(currentButtonStates);
+ }
+
+ /**
+ *
+ * @return Current state (enabled/disabled) of Toolbar button
+ */
+ private Map<String, Boolean> getCurrentButtonsStates() {
+ Component[] components = getComponents();
+ Map<String, Boolean> buttonStates =
+ new HashMap<String, Boolean>(components.length);
+ for (int i = 0; i < components.length; i++) {
+ if(components[i]instanceof JButton) {
+ JButton button = (JButton) components[i];
+ buttonStates.put(button.getActionCommand(),
+ Boolean.valueOf(button.isEnabled()));
+ }
+ }
+ return buttonStates;
}
/**
Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1623109&r1=1623108&r2=1623109&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Sun Sep 7 19:17:09 2014
@@ -195,6 +195,7 @@ jmeter.gui.action.LookAndFeelCommand: Us
<li><bugzilla>56367</bugzilla> - JMeter 2.11 on maven central triggers a not existing dependency rsyntaxtextarea 2.5.1, upgrade to 2.5.3</li>
<li><bugzilla>56743</bugzilla> - Wrong mailing list archives on mail2.xml. Contributed by Felix Schumacher (felix.schumacher at internetallee.de)</li>
<li><bugzilla>56763</bugzilla> - Removing the Oracle icons, not used by JMeter (and missing license)</li>
+<li><bugzilla>54100</bugzilla> - Switching languages during test messes toolbar buttons state (enabled/disabled)</li>
</ul>
<!-- =================== Improvements =================== -->