Backed out changeset f1199b0e2cf3 (bug 883670) for mozmill failures.
authorRyan VanderMeulen <ryanvm@gmail.com>
Tue, 25 Mar 2014 15:57:04 -0400
changeset 15940 6574e5b750aa5d3c6e36cc32331189eda240a88e
parent 15939 d18a9d5c9a52f450660818ed1d25727438b1d784
child 15941 0434372166021c79db19ca4198456aaebf1a45ab
push id9989
push userryanvm@gmail.com
push dateTue, 25 Mar 2014 19:56:11 +0000
treeherdercomm-central@6574e5b750aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs883670
backs outf1199b0e2cf38a176bd7662cf67e298efb734f7f
Backed out changeset f1199b0e2cf3 (bug 883670) for mozmill failures. CLOSED TREE
mailnews/base/prefs/content/accountcreation/emailWizard.js
mailnews/base/prefs/content/accountcreation/emailWizard.xul
--- a/mailnews/base/prefs/content/accountcreation/emailWizard.js
+++ b/mailnews/base/prefs/content/accountcreation/emailWizard.js
@@ -908,17 +908,16 @@ EmailConfigWizard.prototype =
     } catch (e) {
       config.incoming.port = undefined; // incl. default "Auto"
     }
     config.incoming.type = sanitize.translate(e("incoming_protocol").value,
         { 1: "imap", 2 : "pop3", 0 : null });
     config.incoming.socketType = sanitize.integer(e("incoming_ssl").value);
     config.incoming.auth = sanitize.integer(e("incoming_authMethod").value);
     config.incoming.username = e("incoming_username").value;
-    config.outgoing.username = e("outgoing_username").value;
 
     // Outgoing server
 
     // Did the user select one of the already configured SMTP servers from the
     // drop-down list? If so, use it.
     var outHostnameCombo = e("outgoing_hostname");
     var outMenuitem = outHostnameCombo.selectedItem;
     if (outMenuitem && outMenuitem.serverKey) {
@@ -939,16 +938,17 @@ EmailConfigWizard.prototype =
       try {
         config.outgoing.port = sanitize.integerRange(e("outgoing_port").value,
               kMinPort, kMaxPort);
       } catch (e) {
         config.outgoing.port = undefined; // incl. default "Auto"
       }
       config.outgoing.socketType = sanitize.integer(e("outgoing_ssl").value);
       config.outgoing.auth = sanitize.integer(e("outgoing_authMethod").value);
+      config.outgoing.username = config.incoming.username;
     }
 
     return config;
   },
 
   /**
    * [Manual Config] button click handler. This turns the config details area
    * into an editable form and makes the (Go) button appear. The edit button
@@ -1014,20 +1014,16 @@ EmailConfigWizard.prototype =
       e("incoming_port").value = config.incoming.port;
     } else {
       this.adjustIncomingPortToSSLAndProtocol(config);
     }
     this.fillPortDropdown(config.incoming.type);
 
     // outgoing server
     e("outgoing_hostname").value = config.outgoing.hostname;
-    e("outgoing_username").value = config.outgoing.username;
-    // While sameInOutUsernames is true we synchronize values of incoming
-    // and outgoing username.
-    this.sameInOutUsernames = true;
     e("outgoing_ssl").value = sanitize.enum(config.outgoing.socketType,
                                             [ 0, 1, 2, 3 ], 0);
     e("outgoing_authMethod").value = sanitize.enum(config.outgoing.auth,
                                                    [ 0, 1, 3, 4, 5, 6 ], 0);
     if (config.outgoing.port) {
       e("outgoing_port").value = config.outgoing.port;
     } else {
       this.adjustOutgoingPortToSSLAndProtocol(config);
@@ -1218,37 +1214,22 @@ EmailConfigWizard.prototype =
     this.adjustIncomingPortToSSLAndProtocol(this.getUserConfig());
     this.onChangedManualEdit();
   },
   onChangedSSLOutgoing : function()
   {
     this.adjustOutgoingPortToSSLAndProtocol(this.getUserConfig());
     this.onChangedManualEdit();
   },
-  onChangedInAuth : function()
+  onChangedAuth : function()
   {
     this.onChangedManualEdit();
   },
-  onChangedOutAuth : function(aSelectedAuth)
+  onInputUsername : function()
   {
-    if (aSelectedAuth) {
-      e("outgoing_label").hidden = e("outgoing_username").hidden =
-                                   (aSelectedAuth.id == "out-authMethod-no");
-    }
-    this.onChangedManualEdit();
-  },
-  onInputInUsername : function()
-  {
-    if (this.sameInOutUsernames)
-      e("outgoing_username").value = e("incoming_username").value;
-    this.onChangedManualEdit();
-  },
-  onInputOutUsername : function()
-  {
-    this.sameInOutUsernames = false;
     this.onChangedManualEdit();
   },
   onInputHostname : function()
   {
     this.onChangedManualEdit();
   },
 
   /**
@@ -1295,17 +1276,17 @@ EmailConfigWizard.prototype =
     }
     this.validateManualEditComplete();
   },
 
   /**
    * This enables the buttons which allow the user to proceed
    * once he has entered enough information.
    *
-   * We can easily and fairly surely autodetect everything apart from the
+   * We can easily and faily surely autodetect everything apart from the
    * hostname (and username). So, once the user has entered
    * proper hostnames, change to "manual-edit-have-hostname" mode
    * which allows to press [Re-test], which starts the detection
    * of the other values.
    * Once the user has entered (or we detected) all values, he may
    * do [Create Account] (tests login and if successful creates the account)
    * or [Advanced Setup] (goes to Account Manager). Esp. in the latter case,
    * we will not second-guess his setup and just to as told, so here we make
--- a/mailnews/base/prefs/content/accountcreation/emailWizard.xul
+++ b/mailnews/base/prefs/content/accountcreation/emailWizard.xul
@@ -292,17 +292,17 @@
                 <menuitem label="&noEncryption.label;" value="1"/>
                 <menuitem label="&starttls.label;" value="3"/>
                 <menuitem label="&sslTls.label;" value="2"/>
               </menupopup>
             </menulist>
             <menulist id="incoming_authMethod"
                       class="auth"
                       sizetopopup="always">
-              <menupopup onpopuphidden="gEmailConfigWizard.onChangedInAuth();">
+              <menupopup onpopuphidden="gEmailConfigWizard.onChangedAuth();">
                 <menuitem label="&autodetect.label;" value="0"/>
                 <!-- values defined in nsMsgAuthMethod -->
                 <!-- labels set from messenger.properties
                      to avoid duplication -->
                 <menuitem id="in-authMethod-password-cleartext" value="3"/>
                 <menuitem id="in-authMethod-password-encrypted" value="4"/>
                 <menuitem id="in-authMethod-kerberos" value="5"/>
                 <menuitem id="in-authMethod-ntlm" value="6"/>
@@ -341,44 +341,38 @@
                 <menuitem label="&noEncryption.label;" value="1"/>
                 <menuitem label="&starttls.label;" value="3"/>
                 <menuitem label="&sslTls.label;" value="2"/>
               </menupopup>
             </menulist>
             <menulist id="outgoing_authMethod"
                       class="auth"
                       sizetopopup="always">
-              <menupopup onpopuphidden="gEmailConfigWizard.onChangedOutAuth(this.parentNode.selectedItem);">
+              <menupopup onpopuphidden="gEmailConfigWizard.onChangedAuth();">
                 <menuitem label="&autodetect.label;" value="0"/>
                 <!-- @see incoming -->
                 <menuitem id="out-authMethod-no" value="1"/>
                 <menuitem id="out-authMethod-password-cleartext" value="3"/>
                 <menuitem id="out-authMethod-password-encrypted" value="4"/>
                 <menuitem id="out-authMethod-kerberos" value="5"/>
                 <menuitem id="out-authMethod-ntlm" value="6"/>
               </menupopup>
             </menulist>
           </row>
           <row id="username_area" align="center">
             <label class="textbox-label"
-                   value="&username.label;"/>
-            <label class="columnHeader"
-                   value="&incoming.label;"
+                   value="&username.label;"
                    control="incoming_username"/>
+            <spacer/>
             <textbox id="incoming_username"
-                     oninput="gEmailConfigWizard.onInputInUsername();"
+                     oninput="gEmailConfigWizard.onInputUsername();"
                      class="username"/>
             <spacer/>
-            <label class="columnHeader"
-                   id="outgoing_label"
-                   value="&outgoing.label;"
-                   control="outgoing_username"/>
-            <textbox id="outgoing_username"
-                     oninput="gEmailConfigWizard.onInputOutUsername();"
-                     class="username"/>
+            <spacer/>
+            <spacer/>
           </row>
         </rows>
       </grid>
     </groupbox>
 
     <spacer flex="1" />
     <hbox id="buttons_area">
       <hbox id="left_buttons_area" align="center" pack="start">