Fix bug 768207 - Make the cache checkbox default-on in the new calendar dialog. r=redDragon,a=philipp THUNDERBIRD_38_VERBRANCH
authorPhilipp Kewisch <mozilla@kewis.ch>
Sat, 02 May 2015 18:06:49 +0200
branchTHUNDERBIRD_38_VERBRANCH
changeset 26043 8d40ecd6bb9f8fa971dd7caa910ccdd62ee2bb57
parent 26042 05001d19f2006ab747be617d129ea402194e5637
child 26044 e5f0f6bc1a360816eca0c33c849d4caa6e35b6ce
push id1850
push userclokep@gmail.com
push dateWed, 08 Mar 2017 19:29:12 +0000
treeherdercomm-esr52@028df196b2d9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersredDragon, philipp
bugs768207
Fix bug 768207 - Make the cache checkbox default-on in the new calendar dialog. r=redDragon,a=philipp
calendar/resources/content/calendarCreation.js
calendar/resources/content/calendarCreation.xul
--- a/calendar/resources/content/calendarCreation.js
+++ b/calendar/resources/content/calendarCreation.js
@@ -77,18 +77,20 @@ function onSelectProvider(type) {
                             .createInstance(Components.interfaces.calICalendar);
     } catch (e) {}
 
     if (tempCal && tempCal.getProperty("cache.always")) {
         cache.oldValue = cache.checked;
         cache.checked = true;
         cache.disabled = true;
     } else {
-        cache.checked = cache.oldValue || false;
-        cache.oldValue = null;
+        if (cache.oldValue !== undefined) {
+            cache.checked = cache.oldValue;
+            cache.oldValue = undefined;
+        }
         cache.disabled = false;
     }
 }
 
 /**
  * Checks if the required information is set so that the wizard can advance. On
  * an error, notifications are shown and the wizard can not be advanced.
  */
--- a/calendar/resources/content/calendarCreation.xul
+++ b/calendar/resources/content/calendarCreation.xul
@@ -66,16 +66,17 @@
                              required="true"
                              type="search"
                              oncommand="checkRequired();"
                              ondragexit="checkRequired();"/>
                 </row>
                 <row>
                      <label/>
                      <checkbox id="cache"
+                               checked="true"
                                label="&calendarproperties.cache3.label;"/>
                 </row>
                 <notificationbox id="location-notifications" flex="1"/>
                 <!--
                 <description>&locationpage.login.description;</description>
                 <row align="center">
                     <label value="&locationpage.username.label;" control="calendar-username"/>
                     <textbox id="calendar-username"/>