Bug 575993 - Sync Now and Disconnect buttons clickable before being connected [r=mbrubeck]
authorMark Finkle <mfinkle@mozilla.com>
Wed, 30 Jun 2010 17:22:19 -0400
changeset 66341 d7bf0b3b7b0be09d4dfa6aa71247e56ed09520ac
parent 66340 6f8ad1be8eae2a1c780390323ce6ee2448b41baf
child 66342 4e8b6499036abba7214ab784aedcfe426501c5c7
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmbrubeck
bugs575993
Bug 575993 - Sync Now and Disconnect buttons clickable before being connected [r=mbrubeck]
mobile/chrome/content/browser.xul
mobile/chrome/content/sync.js
--- a/mobile/chrome/content/browser.xul
+++ b/mobile/chrome/content/browser.xul
@@ -433,24 +433,24 @@
                 <setting title="&clearPrivateData2.title;" type="control">
                   <button id="prefs-clear-data" label="&clearPrivateData.button;" command="cmd_sanitize"/>
                 </setting>
               </settings>
               <settings id="prefs-sync" label="&sync.title;">
                 <setting id="sync-user" type="string" title="&sync.username;" />
                 <setting id="sync-pass" type="string" inputtype="password" title="&sync.password;" />
                 <setting id="sync-secret" type="string" inputtype="password" title="&sync.secretPhrase;" />
-                <setting id="sync-device" type="string" title="&sync.deviceName;" onchange="WeaveGlue.changeName(this)"/>
+                <setting id="sync-device" type="string" title="&sync.deviceName;" onchange="WeaveGlue.changeName(this)" collapsed="true"/>
                 <setting id="sync-connect" type="control">
                   <button label="&sync.connect;" oncommand="WeaveGlue.connect();" />
                 </setting>
-                <setting id="sync-disconnect" type="control">
+                <setting id="sync-disconnect" type="control" collapsed="true">
                   <button label="&sync.disconnect;" oncommand="WeaveGlue.disconnect();" />
                 </setting>
-                <setting id="sync-sync" type="control">
+                <setting id="sync-sync" type="control" collapsed="true">
                   <button id="sync-syncButton" label="&sync.syncNow;" oncommand="WeaveGlue.sync();" />
                 </setting>
               </settings>
             </richlistbox>
           </notificationbox>
         </vbox>
 
         <vbox id="console-container" flex="1">
--- a/mobile/chrome/content/sync.js
+++ b/mobile/chrome/content/sync.js
@@ -35,16 +35,19 @@
  * ***** END LICENSE BLOCK ***** */
 
 let WeaveGlue = {
   init: function init() {
     Components.utils.import("resource://services-sync/service.js");
 
     this._addListeners();
 
+    // Initialize the UI now
+    this._updateOptions();
+
     // Generating keypairs is expensive on mobile, so disable it
     Weave.Service.keyGenEnabled = false;
   },
 
   openRemoteTabs: function openRemoteTabs() {
     this._openTab("about:sync-tabs");
   },