Backed out changeset 7b3549479ead (bug 1589005) for breaking the calendar tests. rs=bustage-fix
authorGeoff Lankow <geoff@darktrojan.net>
Tue, 17 Mar 2020 21:37:55 +1300
changeset 38502 6b7f4b4acf12c581adaa6588006cfd1d2b33c6bc
parent 38501 11bda1a97b1954792d272363c22fa97f153c6e07
child 38503 50e95bf7986d08be42c8bf51cc3e3587e7a53f90
push id400
push userclokep@gmail.com
push dateMon, 04 May 2020 18:56:09 +0000
reviewersbustage-fix
bugs1589005
backs out7b3549479ead955071d25aa89e17e0ae50b95082
Backed out changeset 7b3549479ead (bug 1589005) for breaking the calendar tests. rs=bustage-fix I guess this wasn't supposed to be checked in yet
calendar/base/content/calendar-management.js
calendar/base/modules/calCalendarDeactivator.jsm
mail/base/content/messenger.xhtml
--- a/calendar/base/content/calendar-management.js
+++ b/calendar/base/content/calendar-management.js
@@ -405,18 +405,16 @@ function loadCalendarManager() {
  * Creates the initial "Home" calendar if no calendar exists.
  */
 function initHomeCalendar() {
   let calMgr = cal.getCalendarManager();
   let composite = cal.view.getCompositeCalendar(window);
   let url = Services.io.newURI("moz-storage-calendar://");
   let homeCalendar = calMgr.createCalendar("storage", url);
   homeCalendar.name = cal.l10n.getCalString("homeCalendarName");
-  homeCalendar.setProperty("disabled", true);
-
   calMgr.registerCalendar(homeCalendar);
   Services.prefs.setStringPref("calendar.list.sortOrder", homeCalendar.id);
   composite.addCalendar(homeCalendar);
 
   // Wrapping this in a try/catch block, as if any of the migration code
   // fails, the app may not load.
   if (Services.prefs.getBoolPref("calendar.migrator.enabled", true)) {
     try {
--- a/calendar/base/modules/calCalendarDeactivator.jsm
+++ b/calendar/base/modules/calCalendarDeactivator.jsm
@@ -45,18 +45,18 @@ var calendarDeactivator = {
    */
   registerWindow(window) {
     if (this.calendars === null) {
       this.initializeDeactivator();
     }
     this.windows.add(window);
     window.addEventListener("unload", () => this.windows.delete(window));
 
-    if (this.isCalendarActivated) {
-      window.document.documentElement.removeAttribute("calendar-deactivated");
+    if (!this.isCalendarActivated) {
+      window.document.documentElement.setAttribute("calendar-deactivated", "");
     }
   },
 
   /**
    * Check the enabled state of all of the user's calendars.
    *
    * @return {boolean} True if any calendars are enabled, false if all are disabled.
    */
--- a/mail/base/content/messenger.xhtml
+++ b/mail/base/content/messenger.xhtml
@@ -117,18 +117,17 @@
         onunload="OnUnloadMessenger()"
         onresize="OnResizeExpandedHeaderView()"
         screenX="10" screenY="10"
         persist="width height screenX screenY sizemode"
         toggletoolbar="true"
         windowtype="mail:3pane"
         macanimationtype="document"
         lightweightthemes="true"
-        fullscreenbutton="true"
-        calendar-deactivated="">
+        fullscreenbutton="true">
 
 <stringbundle id="bundle_brand" src="chrome://branding/locale/brand.properties"/>
 <stringbundle id="bundle_messenger" src="chrome://messenger/locale/messenger.properties"/>
 <stringbundle id="bundle_search" src="chrome://messenger/locale/search.properties"/>
 <stringbundle id="chatBundle" src="chrome://messenger/locale/chat.properties"/>
 <stringbundle id="bundle_dateformat" src="chrome://chat/locale/dateFormat.properties"/>
 <stringbundle id="bundle_places" src="chrome://places/locale/places.properties"/>
 <stringbundle id="bundle_editContact" src="chrome://messenger/locale/editContactOverlay.properties"/>