You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jakarta.apache.org by se...@apache.org on 2010/07/03 12:57:26 UTC

svn commit: r960196 - /jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/smtp/sampler/gui/SmtpPanel.java

Author: sebb
Date: Sat Jul  3 10:57:26 2010
New Revision: 960196

URL: http://svn.apache.org/viewvc?rev=960196&view=rev
Log:
Ensure truststore editable state is correctly set

Modified:
    jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/smtp/sampler/gui/SmtpPanel.java

Modified: jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/smtp/sampler/gui/SmtpPanel.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/smtp/sampler/gui/SmtpPanel.java?rev=960196&r1=960195&r2=960196&view=diff
==============================================================================
--- jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/smtp/sampler/gui/SmtpPanel.java (original)
+++ jakarta/jmeter/trunk/src/protocol/mail/org/apache/jmeter/protocol/smtp/sampler/gui/SmtpPanel.java Sat Jul  3 10:57:26 2010
@@ -289,8 +289,8 @@ public class SmtpPanel extends JPanel {
      */
     public void setUseAuth(boolean selected){
         cbUseAuth.setSelected(selected);
-        tfAuthPassword.setEditable(selected);
-        tfAuthUsername.setEditable(selected);
+        tfAuthPassword.setEditable(selected); // ensure correctly set on initial display
+        tfAuthUsername.setEditable(selected); // ensure correctly set on initial display
     }
 
     /**
@@ -394,6 +394,7 @@ public class SmtpPanel extends JPanel {
      */
     public void setUseLocalTrustStore(boolean useLocalTrustStore) {
         cbUseLocalTrustStore.setSelected(useLocalTrustStore);
+        tfTrustStoreToUse.setEditable(useLocalTrustStore); // ensure correctly set on initial display
     }
 
     /**
@@ -940,9 +941,10 @@ public class SmtpPanel extends JPanel {
      */
     private void cbUseLocalTrustStoreActionPerformed(
             ActionEvent evt) {
-        if (cbUseLocalTrustStore.isSelected()) {
-            tfTrustStoreToUse.setEditable(true);
-            cbTrustAllCerts.setSelected(false);
+        final boolean selected = cbUseLocalTrustStore.isSelected();
+        tfTrustStoreToUse.setEditable(selected); // must follow the checkbox setting
+        if (selected) {
+            cbTrustAllCerts.setSelected(false); // not compatible
         }
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@jakarta.apache.org
For additional commands, e-mail: notifications-help@jakarta.apache.org