Fix bug 455869 - Remove MOZILLA_1_8_BRANCH ifdefs from calendar trunk code. r=philipp
authorMartin Schroeder <mschroeder@mozilla.x-home.org>
Sun, 05 Oct 2008 13:50:31 +0200
changeset 515 289b6533a62db219e5c30e3edab5b3ea4704eaa5
parent 514 5551cf1ba1043d4ec37dbe81e2859dbecfe3ab8d
child 516 49fff21693a1c6f180d400831409e0c7cfbef785
push id454
push usermschroeder@mozilla.x-home.org
push dateSun, 05 Oct 2008 11:51:34 +0000
treeherdercomm-central@289b6533a62d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersphilipp
bugs455869
Fix bug 455869 - Remove MOZILLA_1_8_BRANCH ifdefs from calendar trunk code. r=philipp
calendar/base/build/Makefile.in
calendar/base/build/calBaseModule.cpp
calendar/base/content/calendar-alarm-dialog.js
calendar/base/content/preferences/connection.js
calendar/base/content/preferences/connection.xul
calendar/base/jar.mn
calendar/base/src/Makefile.in
calendar/base/src/calDateTime.cpp
calendar/base/src/calDuration.cpp
calendar/base/src/calICSService.cpp
calendar/base/src/calPeriod.cpp
calendar/base/src/calProviderUtils.js
calendar/base/src/calRecurrenceDate.cpp
calendar/base/src/calRecurrenceDateSet.cpp
calendar/base/src/calRecurrenceRule.cpp
calendar/base/src/calUtils.js
calendar/installer/Makefile.in
calendar/installer/removed-files.in
calendar/installer/windows/packages-static
calendar/itip/Makefile.in
calendar/itip/calItipEmailTransport.js
calendar/libical/src/libical/Makefile.in
calendar/lightning/Makefile.in
calendar/lightning/content/messenger-overlay-sidebar.xul
calendar/lightning/install.rdf
calendar/lightning/jar.mn
calendar/prototypes/wcap/sun-calendar-event-dialog.css
calendar/prototypes/wcap/sun-calendar-event-dialog.js
calendar/providers/wcap/calWcapRequest.js
calendar/resources/Makefile.in
calendar/resources/content/calendar.js
calendar/resources/jar.mn
calendar/sunbird/app/Makefile.in
calendar/sunbird/app/splash.rc
calendar/sunbird/base/content/customizeToolbar.xul
calendar/sunbird/base/jar.mn
calendar/test/unit/head_consts.js
calendar/timezones/Makefile.in
calendar/timezones/install.rdf
--- a/calendar/base/build/Makefile.in
+++ b/calendar/base/build/Makefile.in
@@ -46,22 +46,17 @@ include $(DEPTH)/config/autoconf.mk
 MODULE = calbasecomps
 LIBRARY_NAME = calbasecomps
 SHORT_LIBNAME = calbscmp
 IS_COMPONENT = 1
 MODULE_NAME = calBaseModule
 # We don't want an EXPORT_LIBRARY
 FORCE_SHARED_LIB = 1
 FORCE_USE_PIC   = 1 # Force use of PIC
-ifdef MOZILLA_1_8_BRANCH
-MOZ_STATIC_COMPONENT_LIBS =
-MOZILLA_INTERNAL_API = 1
-else
 USE_STATIC_LIBS = 1 # This links against the static CRT on Windows
-endif
 
 REQUIRES = \
 	xpcom \
 	js \
 	xpconnect \
 	string \
 	ical \
 	calbase
--- a/calendar/base/build/calBaseModule.cpp
+++ b/calendar/base/build/calBaseModule.cpp
@@ -33,19 +33,17 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsIGenericFactory.h"
 
-#ifndef MOZILLA_1_8_BRANCH
 #include "nsIClassInfoImpl.h"
-#endif
 
 #include "calDateTime.h"
 #include "calDuration.h"
 #include "calPeriod.h"
 #include "calICSService.h"
 #include "calRecurrenceRule.h"
 #include "calRecurrenceDate.h"
 #include "calRecurrenceDateSet.h"
--- a/calendar/base/content/calendar-alarm-dialog.js
+++ b/calendar/base/content/calendar-alarm-dialog.js
@@ -176,25 +176,16 @@ function updateRelativeDates() {
  *
  * @param event           The event used to determine the position of the popup
  * @param aContainerItem  The container item as described above
  */
 function openSnoozeWindow(event, aContainerItem) {
     const uri = "chrome://calendar/content/calendar-alarm-snooze-popup.xul";
     var pos = ",left=" + (event.target.boxObject.screenX - 3) +
              ",top=" + (event.target.boxObject.screenY + event.target.boxObject.height - 3);
-#ifdef MOZILLA_1_8_BRANCH
-#ifdef XP_MACOSX
-    // On branch on the mac, the titlebar seems to be part of the
-    // window, even though titlebar is set to no. It is 22px and I was
-    // told that its not possible to change its size.
-    pos = ",left=" + event.target.boxObject.screenX +
-         ",top=" + (event.target.boxObject.screenY + event.target.boxObject.height - 22);
-#endif
-#endif
     window.openDialog(uri,
                       uri,
                       "chrome,dependent=yes,titlebar=no" + pos,
                       aContainerItem);
 }
 
 /**
  * Function to snooze all alarms the given number of minutes.
--- a/calendar/base/content/preferences/connection.js
+++ b/calendar/base/content/preferences/connection.js
@@ -88,21 +88,16 @@ var gConnectionsDialog = {
     shareProxiesPref.disabled = proxyTypePref.value != 1;
     
     var noProxiesPref = document.getElementById("network.proxy.no_proxies_on");
     noProxiesPref.disabled = proxyTypePref.value != 1;
     
     var autoconfigURLPref = document.getElementById("network.proxy.autoconfig_url");
     autoconfigURLPref.disabled = proxyTypePref.value != 2;
 
-#ifdef MOZILLA_1_8_BRANCH
-    var disableReloadPref = document.getElementById("pref.advanced.proxies.disable_button.reload");
-    disableReloadPref.disabled = proxyTypePref.value != 2;
-  },
-#else
     this.updateReloadButton();
   },
 
   updateReloadButton: function ()
   {
     // Disable the "Reload PAC" button if the selected proxy type is not PAC or
     // if the current value of the PAC textbox does not match the value stored
     // in prefs.  Likewise, disable the reload button if PAC is not configured
@@ -117,17 +112,16 @@ var gConnectionsDialog = {
     var pacURL = prefs.getCharPref("network.proxy.autoconfig_url");
     var proxyType = prefs.getIntPref("network.proxy.type");
 
     var disableReloadPref =
         document.getElementById("pref.advanced.proxies.disable_button.reload");
     disableReloadPref.disabled =
         (proxyTypeCur != 2 || proxyType != 2 || typedURL != pacURL);
   },
-#endif
 
   readProxyType: function ()
   {
     this.proxyTypeChanged();
     return undefined;
   },
   
   updateProtocolPrefs: function ()
@@ -173,25 +167,18 @@ var gConnectionsDialog = {
     }
     
     var backupPref = document.getElementById("network.proxy.backup." + aProtocol + (aIsPort ? "_port" : ""));
     return backupPref.hasUserValue ? backupPref.value : undefined;
   },
 
   reloadPAC: function ()
   {
-#ifdef MOZILLA_1_8_BRANCH
-    var autoURL = document.getElementById("networkProxyAutoconfigURL");
-    var pps = Components.classes["@mozilla.org/network/protocol-proxy-service;1"]
-                        .getService(Components.interfaces.nsPIProtocolProxyService);
-    pps.configureFromPAC(autoURL.value);
-#else
-    Components.classes["@mozilla.org/network/protocol-proxy-service;1"].
-        getService().reloadPAC();
-#endif
+    Components.classes["@mozilla.org/network/protocol-proxy-service;1"]
+              .getService().reloadPAC();
   },
   
   doAutoconfigURLFixup: function ()
   {
     var autoURL = document.getElementById("networkProxyAutoconfigURL");
     var autoURLPref = document.getElementById("network.proxy.autoconfig_url");
     var URIFixup = Components.classes["@mozilla.org/docshell/urifixup;1"]
                              .getService(Components.interfaces.nsIURIFixup);
--- a/calendar/base/content/preferences/connection.xul
+++ b/calendar/base/content/preferences/connection.xul
@@ -190,26 +190,20 @@
             <row>
               <spacer/>
               <label value="&noproxyExplain.label;" control="networkProxyNone"/>
             </row>
           </rows>
         </grid>
         <radio value="2" label="&autoTypeRadio.label;" accesskey="&autoTypeRadio.accesskey;"/>
         <hbox class="indent" flex="1" align="center">
-#ifdef MOZILLA_1_8_BRANCH
-          <textbox id="networkProxyAutoconfigURL"
-                   flex="1"
-                   preference="network.proxy.autoconfig_url"/>
-#else
           <textbox id="networkProxyAutoconfigURL"
                    flex="1"
                    preference="network.proxy.autoconfig_url"
                    oninput="gConnectionsDialog.updateReloadButton();"/>
-#endif
           <button id="autoReload" icon="refresh"
                   label="&reload.label;" accesskey="&reload.accesskey;"
                   oncommand="gConnectionsDialog.reloadPAC();" 
                   preference="pref.advanced.proxies.disable_button.reload"/>
         </hbox>
       </radiogroup>
     </groupbox>
   </prefpane>
--- a/calendar/base/jar.mn
+++ b/calendar/base/jar.mn
@@ -1,38 +1,38 @@
 #filter substitution
 
 calendar.jar:
 % content calendar %content/calendar/
     content/calendar/agenda-listbox.js           (content/agenda-listbox.js)
     content/calendar/agenda-listbox.xml          (content/agenda-listbox.xml)
-*   content/calendar/calendar-alarm-dialog.js    (content/calendar-alarm-dialog.js)
+    content/calendar/calendar-alarm-dialog.js    (content/calendar-alarm-dialog.js)
     content/calendar/calendar-alarm-dialog.xul   (content/calendar-alarm-dialog.xul)
     content/calendar/calendar-alarm-snooze-popup.xul   (content/calendar-alarm-snooze-popup.xul)
     content/calendar/calendar-alarm-snooze-popup.js   (content/calendar-alarm-snooze-popup.js)
     content/calendar/calendar-alarm-widget.xml   (content/calendar-alarm-widget.xml)
     content/calendar/calendar-bindings.css       (content/calendar-bindings.css)
     content/calendar/calendar-calendars-list.xul (content/calendar-calendars-list.xul)
     content/calendar/calendar-chrome-startup.js  (content/calendar-chrome-startup.js)
     content/calendar/calendar-common-sets.xul    (content/calendar-common-sets.xul)
     content/calendar/calendar-common-sets.js     (content/calendar-common-sets.js)
     content/calendar/calendar-creation.js        (content/calendar-creation.js)
     content/calendar/calendar-daypicker.xml      (content/calendar-daypicker.xml)
     content/calendar/calendar-decorated-base.xml  (content/calendar-decorated-base.xml)
     content/calendar/calendar-decorated-multiday-base-view.xml  (content/calendar-decorated-multiday-base-view.xml)
     content/calendar/calendar-decorated-day-view.xml  (content/calendar-decorated-day-view.xml)
     content/calendar/calendar-decorated-week-view.xml  (content/calendar-decorated-week-view.xml)
     content/calendar/calendar-decorated-multiweek-view.xml  (content/calendar-decorated-multiweek-view.xml)
-   content/calendar/calendar-decorated-month-view.xml  (content/calendar-decorated-month-view.xml)
+    content/calendar/calendar-decorated-month-view.xml  (content/calendar-decorated-month-view.xml)
     content/calendar/calendar-dialog-utils.js    (content/calendar-dialog-utils.js)
 *   content/calendar/calendar-dnd-listener.js    (content/calendar-dnd-listener.js)
     content/calendar/calendar-item-editing.js    (content/calendar-item-editing.js)
     content/calendar/calendar-item-bindings.xml  (content/calendar-item-bindings.xml)
     content/calendar/calendar-menus.xml          (content/calendar-menus.xml)
-*    content/calendar/calendar-month-view.xml     (content/calendar-month-view.xml)
+*   content/calendar/calendar-month-view.xml     (content/calendar-month-view.xml)
     content/calendar/calendar-multiday-view.xml  (content/calendar-multiday-view.xml)
     content/calendar/calendar-occurrence-prompt.xul (content/calendar-occurrence-prompt.xul)
     content/calendar/calendar-properties-dialog.xul (content/calendar-properties-dialog.xul)
     content/calendar/calendar-properties-dialog.js (content/calendar-properties-dialog.js)
     content/calendar/calendar-task-editing.js (content/calendar-task-editing.js)
     content/calendar/calendar-task-tree.xml      (content/calendar-task-tree.xml)
     content/calendar/calendar-task-tree.js       (content/calendar-task-tree.js)
     content/calendar/calendar-task-view.xul      (content/calendar-task-view.xul)
@@ -40,17 +40,17 @@ calendar.jar:
     content/calendar/calendar-ui-utils.js        (content/calendar-ui-utils.js)
     content/calendar/calendar-unifinder.xul      (content/calendar-unifinder.xul)
     content/calendar/calendar-unifinder.js       (content/calendar-unifinder.js)
     content/calendar/calendar-unifinder-todo.xul (content/calendar-unifinder-todo.xul)
     content/calendar/calendar-unifinder-todo.js  (content/calendar-unifinder-todo.js)
     content/calendar/calendar-statusbar.js       (content/calendar-statusbar.js)
     content/calendar/calendar-summary-dialog.js  (content/calendar-summary-dialog.js)
     content/calendar/calendar-summary-dialog.xul (content/calendar-summary-dialog.xul)
-*   content/calendar/today-pane.xul              (content/today-pane.xul)
+    content/calendar/today-pane.xul              (content/today-pane.xul)
     content/calendar/today-pane.js               (content/today-pane.js)
     content/calendar/calendar-management.js      (content/calendar-management.js)
     content/calendar/calendar-subscriptions-dialog.css  (content/calendar-subscriptions-dialog.css)
     content/calendar/calendar-subscriptions-dialog.js   (content/calendar-subscriptions-dialog.js)
     content/calendar/calendar-subscriptions-dialog.xul  (content/calendar-subscriptions-dialog.xul)
     content/calendar/calendar-subscriptions-list.xml    (content/calendar-subscriptions-list.xml)
     content/calendar/widgets/minimonth.xml     (content/widgets/minimonth.xml)
     content/calendar/widgets/calendar-widget-bindings.css    (content/widgets/calendar-widget-bindings.css)
@@ -76,17 +76,17 @@ calendar.jar:
     content/calendar/preferences/editCategory.xul  (content/preferences/editCategory.xul)
     content/calendar/preferences/general.js      (content/preferences/general.js)
     content/calendar/preferences/general.xul     (content/preferences/general.xul)
     content/calendar/preferences/timezones.js    (content/preferences/timezones.js)
     content/calendar/preferences/timezones.xul   (content/preferences/timezones.xul)
     content/calendar/preferences/views.js        (content/preferences/views.js)
     content/calendar/preferences/views.xul       (content/preferences/views.xul)
     content/calendar/sun-calendar-event-dialog.css  (/calendar/prototypes/wcap/sun-calendar-event-dialog.css)
-*   content/calendar/sun-calendar-event-dialog.js  (/calendar/prototypes/wcap/sun-calendar-event-dialog.js)
+    content/calendar/sun-calendar-event-dialog.js  (/calendar/prototypes/wcap/sun-calendar-event-dialog.js)
     content/calendar/sun-calendar-event-dialog.xul  (/calendar/prototypes/wcap/sun-calendar-event-dialog.xul)
     content/calendar/sun-calendar-event-dialog-attendees.xml  (/calendar/prototypes/wcap/sun-calendar-event-dialog-attendees.xml)
     content/calendar/sun-calendar-event-dialog-freebusy.xml  (/calendar/prototypes/wcap/sun-calendar-event-dialog-freebusy.xml)
     content/calendar/sun-calendar-event-dialog-recurrence.xul  (/calendar/prototypes/wcap/sun-calendar-event-dialog-recurrence.xul)
     content/calendar/sun-calendar-event-dialog-recurrence.js  (/calendar/prototypes/wcap/sun-calendar-event-dialog-recurrence.js)
     content/calendar/sun-calendar-event-dialog-recurrence-preview.xml  (/calendar/prototypes/wcap/sun-calendar-event-dialog-recurrence-preview.xml)
     content/calendar/sun-calendar-event-dialog-reminder.js  (/calendar/prototypes/wcap/sun-calendar-event-dialog-reminder.js)
     content/calendar/sun-calendar-event-dialog-reminder.xul  (/calendar/prototypes/wcap/sun-calendar-event-dialog-reminder.xul)
--- a/calendar/base/src/Makefile.in
+++ b/calendar/base/src/Makefile.in
@@ -45,21 +45,17 @@ VPATH   = @srcdir@
 include $(DEPTH)/config/autoconf.mk
 
 MODULE           = calbase
 LIBRARY_NAME     = calbase_s
 MODULE_NAME      = calBaseModule
 FORCE_STATIC_LIB = 1
 GRE_MODULE       = 1
 FORCE_USE_PIC   = 1 # Force use of PIC
-ifdef MOZILLA_1_8_BRANCH
-MOZILLA_INTERNAL_API = 1
-else
 USE_STATIC_LIBS = 1 # This links against the static CRT on Windows
-endif
 
 # for changes that should only be triggered on the comm-central trunk
 ifdef COMM_BUILD
 DEFINES += -DCOMM_BUILD
 endif
 
 REQUIRES = xpcom \
 	   js \
--- a/calendar/base/src/calDateTime.cpp
+++ b/calendar/base/src/calDateTime.cpp
@@ -38,19 +38,17 @@
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "calDateTime.h"
 #include "calBaseCID.h"
 
 #include "nsServiceManagerUtils.h"
-#ifndef MOZILLA_1_8_BRANCH
 #include "nsIClassInfoImpl.h"
-#endif
 
 #include "calIErrors.h"
 #include "calDuration.h"
 
 #include "jsdate.h"
 #include "prprf.h"
 
 extern "C" {
@@ -836,26 +834,19 @@ calDateTime::Construct(nsIXPConnectWrapp
 /* PRBool hasInstance (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in JSVal val, out PRBool bp); */
 NS_IMETHODIMP
 calDateTime::HasInstance(nsIXPConnectWrappedNative *wrapper, JSContext * cx,
                          JSObject * obj, jsval val, PRBool *bp, PRBool *_retval)
 {
     return NS_ERROR_NOT_IMPLEMENTED;
 }
 
-#if defined MOZILLA_1_8_BRANCH
-/* PRUint32 mark (in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in voidPtr arg); */
-NS_IMETHODIMP
-calDateTime::Mark(nsIXPConnectWrappedNative *wrapper, JSContext * cx,
-                  JSObject * obj, void * arg, PRUint32 *_retval)
-#else
 /* void trace (in nsIXPConnectWrappedNative wrapper, in JSTracePtr trc, in JSObjectPtr obj); */
 NS_IMETHODIMP
 calDateTime::Trace(nsIXPConnectWrappedNative *wrapper, JSTracer *trc, JSObject *obj)
-#endif
 {
     return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 /* PRBool equality(in nsIXPConnectWrappedNative wrapper, in JSContextPtr cx, in JSObjectPtr obj, in JSVal val); */
 NS_IMETHODIMP
 calDateTime::Equality(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
                       JSObject *obj, jsval val, PRBool *_retval)
--- a/calendar/base/src/calDuration.cpp
+++ b/calendar/base/src/calDuration.cpp
@@ -37,19 +37,17 @@
  * ***** END LICENSE BLOCK ***** */
 
 #include "calDuration.h"
 #include "calBaseCID.h"
 
 #include "nsComponentManagerUtils.h"
 #include "nsServiceManagerUtils.h"
 
-#ifndef MOZILLA_1_8_BRANCH
 #include "nsIClassInfoImpl.h"
-#endif
 
 #include "calUtils.h"
 
 #define SECONDS_PER_WEEK   604800
 #define SECONDS_PER_DAY     86400
 #define SECONDS_PER_HOUR     3600
 #define SECONDS_PER_MINUTE     60
 
--- a/calendar/base/src/calICSService.cpp
+++ b/calendar/base/src/calICSService.cpp
@@ -33,19 +33,18 @@
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 #include "nsStringStream.h"
 #include "nsComponentManagerUtils.h"
-#ifndef MOZILLA_1_8_BRANCH
 #include "nsIClassInfoImpl.h"
-#endif
+
 #include "calICSService.h"
 #include "calTimezone.h"
 #include "calDateTime.h"
 #include "calDuration.h"
 #include "calIErrors.h"
 
 extern "C" {
 #include "ical.h"
--- a/calendar/base/src/calPeriod.cpp
+++ b/calendar/base/src/calPeriod.cpp
@@ -33,19 +33,17 @@
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "calPeriod.h"
 #include "calBaseCID.h"
 
-#ifndef MOZILLA_1_8_BRANCH
 #include "nsIClassInfoImpl.h"
-#endif
 
 #include "calUtils.h"
 
 NS_IMPL_ISUPPORTS1_CI(calPeriod, calIPeriod)
 
 calPeriod::calPeriod()
     : mImmutable(PR_FALSE)
 {
--- a/calendar/base/src/calProviderUtils.js
+++ b/calendar/base/src/calProviderUtils.js
@@ -77,22 +77,18 @@ function calPrepHttpChannel(aUri, aUploa
 /**
  * calSendHttpRequest; send prepared HTTP request
  *
  * @param aStreamLoader     streamLoader for request
  * @param aChannel          channel for request
  * @param aListener         listener for method completion
  */
 function calSendHttpRequest(aStreamLoader, aChannel, aListener) {
-    if (isBranch()) {
-        aStreamLoader.init(aChannel, aListener, aChannel);
-    } else {
-        aStreamLoader.init(aListener);
-        aChannel.asyncOpen(aStreamLoader, aChannel);
-    }
+    aStreamLoader.init(aListener);
+    aChannel.asyncOpen(aStreamLoader, aChannel);
 }
 
 function createStreamLoader() {
     return Components.classes["@mozilla.org/network/stream-loader;1"]
                      .createInstance(Components.interfaces.nsIStreamLoader);
 }
 
 function convertByteArray(aResult, aResultLength, aCharset, aThrow) {
--- a/calendar/base/src/calRecurrenceDate.cpp
+++ b/calendar/base/src/calRecurrenceDate.cpp
@@ -42,19 +42,17 @@
 #include "calDateTime.h"
 #include "calIItemBase.h"
 #include "calIEvent.h"
 #include "calIErrors.h"
 #include "nsServiceManagerUtils.h"
 
 #include "calICSService.h"
 
-#ifndef MOZILLA_1_8_BRANCH
 #include "nsIClassInfoImpl.h"
-#endif
 
 #include "calBaseCID.h"
 
 static NS_DEFINE_CID(kCalICSService, CAL_ICSSERVICE_CID);
 
 extern "C" {
     #include "ical.h"
 }
--- a/calendar/base/src/calRecurrenceDateSet.cpp
+++ b/calendar/base/src/calRecurrenceDateSet.cpp
@@ -40,19 +40,17 @@
 #include "calRecurrenceDateSet.h"
 
 #include "calDateTime.h"
 #include "calIItemBase.h"
 #include "calIEvent.h"
 
 #include "calICSService.h"
 
-#ifndef MOZILLA_1_8_BRANCH
 #include "nsIClassInfoImpl.h"
-#endif
 
 extern "C" {
     #include "ical.h"
 }
 
 NS_IMPL_ISUPPORTS2_CI(calRecurrenceDateSet, calIRecurrenceItem, calIRecurrenceDateSet)
 
 calRecurrenceDateSet::calRecurrenceDateSet()
--- a/calendar/base/src/calRecurrenceRule.cpp
+++ b/calendar/base/src/calRecurrenceRule.cpp
@@ -41,19 +41,17 @@
 #include "calRecurrenceRule.h"
 
 #include "calDateTime.h"
 #include "calIItemBase.h"
 #include "calIEvent.h"
 
 #include "calICSService.h"
 
-#ifndef MOZILLA_1_8_BRANCH
 #include "nsIClassInfoImpl.h"
-#endif
 
 #include <climits>
 
 NS_IMPL_ISUPPORTS2_CI(calRecurrenceRule, calIRecurrenceItem, calIRecurrenceRule)
 
 calRecurrenceRule::calRecurrenceRule()
     : mImmutable(PR_FALSE),
       mIsNegative(PR_FALSE),
--- a/calendar/base/src/calUtils.js
+++ b/calendar/base/src/calUtils.js
@@ -346,26 +346,16 @@ function calPrint() {
  */
 function makeURL(aUriString) {
     var ioSvc = Components.classes["@mozilla.org/network/io-service;1"].
                 getService(Components.interfaces.nsIIOService);
     return ioSvc.newURI(aUriString, null, null);
 }
 
 /**
- * Returns true if this is MOZILLA_1_8_BRANCH, else false.
- */
-function isBranch() {
-    if (isBranch.mIsBranch === undefined) {
-        isBranch.mIsBranch = (Components.interfaces.nsIStreamLoader.number == "{31d37360-8e5a-11d3-93ad-00104ba0fd40}");
-    }
-    return isBranch.mIsBranch;
-}
-
-/**
  * Returns a calIDateTime that corresponds to the current time in the user's
  * default timezone.
  */
 function now() {
     var d = createDateTime();
     d.jsDate = new Date();
     return d.getInTimezone(calendarDefaultTimezone());
 }
--- a/calendar/installer/Makefile.in
+++ b/calendar/installer/Makefile.in
@@ -72,22 +72,16 @@ endif
 
 MOZ_NONLOCALIZED_PKG_LIST = \
     xpcom \
     calendar \
     $(NULL)
 
 MOZ_LOCALIZED_PKG_LIST = $(AB_CD)
 
-ifdef MOZILLA_1_8_BRANCH
-MOZ_OPTIONAL_PKG_LIST = \
-    talkback \
-    $(NULL)
-endif
-
 DEFINES += -DAB_CD=$(AB_CD)
 
 ifdef MOZ_PKG_MANIFEST_P
 MOZ_PKG_MANIFEST = packages-static
 
 $(MOZ_PKG_MANIFEST): $(MOZ_PKG_MANIFEST_P)
 	$(PERL) $(MOZILLA_SRCDIR)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) $< > $@
 endif
--- a/calendar/installer/removed-files.in
+++ b/calendar/installer/removed-files.in
@@ -253,26 +253,18 @@ res/table-remove-row.gif
 res/viewer.properties
 dependentlibs.list
 mozctl.dll
 mozctlx.dll
 regxpcom.exe
 sunbird.url
 unins000.dat
 unins000.exe
-#ifndef MOZILLA_1_8_BRANCH
 xpcom_compat.dll
-#else
 components/nsInterfaceInfoToIDL.js
-components/pluginGlue.js
-Microsoft.VC80.CRT.manifest
-msvcm80.dll
-msvcp80.dll
-msvcr80.dll
-#endif
 xpcshell.exe
 xpidl.exe
 xpt_dump.exe
 xpt_link.exe
 #
 # Clean out obsolete files from Sunbird 0.5 installer
 #
 components/calAlarmService.js
@@ -283,17 +275,16 @@ js/calWcapCachedCalendar.js
 #ifndef XP_MACOSX
 components/autocomplete.xpt
 #endif
 @DLL_PREFIX@zlib@DLL_SUFFIX@
 extensions/inspector@mozilla.org/components/inspector.xpt
 extensions/inspector@mozilla.org/components/@DLL_PREFIX@inspector@DLL_SUFFIX@
 uninstall/UninstallSunbird.exe
 #
-#ifndef MOZILLA_1_8_BRANCH
 #
 # Clean out obsolete Talkback files
 #
 extensions/talkback@mozilla.org/
 extensions/talkback@mozilla.org/install.rdf
 extensions/talkback@mozilla.org/chrome.manifest
 extensions/talkback@mozilla.org/components/qfaservices.xpt
 extensions/talkback@mozilla.org/components/@DLL_PREFIX@qfaservices@DLL_SUFFIX@
@@ -343,17 +334,16 @@ extensions/talkback@mozilla.org/componen
 #else
 extensions/talkback@mozilla.org/components/talkback/talkback
 extensions/talkback@mozilla.org/components/talkback/XTalkback.ad
 extensions/talkback@mozilla.org/components/master.ini
 extensions/talkback@mozilla.org/components/talkback.so
 #endif
 #endif
 #
-#endif
 
 # bug 404085 (Consolidate provider methods into a default calendar
 # implementation)
 components/calDavCalendar.js
 components/calICSCalendar.js
 components/calMemoryCalendar.js
 components/calStorageCalendar.js
 # bug 381049 (Moved crashreporter interface)
--- a/calendar/installer/windows/packages-static
+++ b/calendar/installer/windows/packages-static
@@ -28,33 +28,27 @@ bin\updater.ini
 bin\js3250.dll
 bin\plc4.dll
 bin\plds4.dll
 bin\xpcom.dll
 bin\xpcom_core.dll
 bin\nspr4.dll
 bin\components\xpinstal.dll
 bin\components\jar50.dll
-#ifdef MOZILLA_1_8_BRANCH
-bin\xpcom_compat.dll
-#else
 bin\Microsoft.VC80.CRT.manifest
 bin\msvcm80.dll
 bin\msvcp80.dll
 bin\msvcr80.dll
-#endif
 
 [calendar]
 ; [Base Calendar Files]
 bin\sunbird.exe
-#ifndef MOZILLA_1_8_BRANCH
 bin\application.ini
 bin\platform.ini
 bin\sqlite3.dll
-#endif
 bin\LICENSE
 
 ; [Components]
 bin\AccessibleMarshal.dll
 bin\components\accessibility-msaa.xpt
 bin\components\accessibility.xpt
 bin\components\alerts.xpt
 bin\components\appshell.xpt
@@ -82,20 +76,18 @@ bin\components\docshell_base.xpt
 bin\components\dom.xpt
 bin\components\dom_base.xpt
 bin\components\dom_canvas.xpt
 bin\components\dom_core.xpt
 bin\components\dom_css.xpt
 bin\components\dom_events.xpt
 bin\components\dom_html.xpt
 bin\components\dom_loadsave.xpt
-#ifndef MOZILLA_1_8_BRANCH
 bin\components\dom_json.xpt
 bin\components\dom_offline.xpt
-#endif
 bin\components\dom_range.xpt
 bin\components\dom_sidebar.xpt
 bin\components\dom_storage.xpt
 bin\components\dom_stylesheets.xpt
 bin\components\dom_svg.xpt
 bin\components\dom_traversal.xpt
 bin\components\dom_views.xpt
 bin\components\dom_xbl.xpt
@@ -137,27 +129,21 @@ bin\components\necko_cookie.xpt
 bin\components\necko_dns.xpt
 bin\components\necko_file.xpt
 bin\components\necko_ftp.xpt
 bin\components\necko_http.xpt
 bin\components\necko_res.xpt
 bin\components\necko_socket.xpt
 bin\components\necko_strconv.xpt
 bin\components\necko_viewsource.xpt
-#ifdef MOZILLA_1_8_BRANCH
-bin\components\passwordmgr.xpt
-#else
 bin\components\loginmgr.xpt
-#endif
 bin\components\pipboot.xpt
 bin\components\pipnss.xpt
 bin\components\pippki.xpt
-#ifndef MOZILLA_1_8_BRANCH
 bin\components\plugin.xpt
-#endif
 bin\components\pref.xpt
 bin\components\prefetch.xpt
 bin\components\profile.xpt
 bin\components\progressDlg.xpt
 bin\components\proxyObject.xpt
 bin\components\rdf.xpt
 bin\components\satchel.xpt
 bin\components\saxparser.xpt
@@ -177,59 +163,47 @@ bin\components\webbrowserpersist.xpt
 bin\components\webshell_idls.xpt
 bin\components\websrvcs.xpt
 bin\components\widget.xpt
 bin\components\windowds.xpt
 bin\components\windowwatcher.xpt
 bin\components\winhooks.xpt
 bin\components\xpautocomplete.xpt
 bin\components\xpcom_base.xpt
-#ifndef MOZILLA_1_8_BRANCH
 bin\components\xpcom_system.xpt
-#endif
 bin\components\xpcom_components.xpt
 bin\components\xpcom_ds.xpt
 bin\components\xpcom_io.xpt
-#ifdef MOZILLA_1_8_BRANCH
-bin\components\xpcom_obsolete.xpt
-#endif
 bin\components\xpcom_thread.xpt
 bin\components\xpcom_xpti.xpt
 bin\components\xpconnect.xpt
 bin\components\xpinstal.dll
 bin\components\xpinstall.xpt
 bin\components\xulapp.xpt
 bin\components\xuldoc.xpt
 bin\components\xultmpl.xpt
 bin\components\wcap.xpt
 bin\components\zipwriter.xpt
 ; JavaScript components
 bin\components\nsDefaultCLH.js
-#ifdef MOZILLA_1_8_BRANCH
-bin\components\nsCloseAllWindows.js
-#else
 bin\components\nsTryToClose.js
-#endif
-bin\components\nsInterfaceInfoToIDL.js
 bin\components\nsPostUpdateWin.js
 bin\components\nsProgressDialog.js
 bin\components\nsUpdateService.js
 bin\components\nsURLFormatter.js
 bin\components\nsHelperAppDlg.js
 bin\components\nsDownloadManagerUI.js
 bin\components\nsProxyAutoConfig.js
 bin\components\nsExtensionManager.js
 bin\components\nsBadCertHandler.js
-#ifndef MOZILLA_1_8_BRANCH
 bin\components\nsBlocklistService.js
 bin\components\nsLoginInfo.js
 bin\components\nsLoginManager.js
 bin\components\nsLoginManagerPrompter.js
 bin\components\storage-Legacy.js
-#endif
 bin\components\calendarService.js
 bin\components\calCompositeCalendar.js
 bin\components\calDavCalendarModule.js
 bin\components\calICSCalendarModule.js
 bin\components\calImportExportModule.js
 bin\components\calItemModule.js
 bin\components\calMemoryCalendarModule.js
 bin\components\calStorageCalendarModule.js
@@ -276,20 +250,18 @@ bin\js\calWeekInfoService.js
 bin\js\calWeekPrinter.js
 bin\js\calWcapCalendar.js
 bin\js\calWcapCalendarItems.js
 bin\js\calWcapErrors.js
 bin\js\calWcapRequest.js
 bin\js\calWcapSession.js
 bin\js\calWcapUtils.js
 
-#ifndef MOZILLA_1_8_BRANCH
 ; [Modules]
 bin\modules\*
-#endif
 
 ; [Calendar Chrome Files]
 bin\chrome\calendar.jar
 bin\chrome\calendar.manifest
 bin\chrome\classic.jar
 bin\chrome\classic.manifest
 bin\extensions\{972ce4c6-7e08-4474-a285-3208198ce6fd}\install.rdf
 bin\extensions\{e2fda1a4-762b-4020-b5ad-a41df1933103}\install.rdf
@@ -340,19 +312,17 @@ bin\res\charsetalias.properties
 bin\res\charsetData.properties
 bin\res\langGroups.properties
 bin\res\language.properties
 bin\res\entityTables\*
 
 ; [Personal Security Manager]
 ;
 bin\nssckbi.dll
-#ifndef MOZILLA_1_8_BRANCH
 bin\nssdbm3.dll
-#endif
 bin\components\pipboot.xpt
 bin\components\pipnss.xpt
 bin\components\pippki.xpt
 bin\nss3.dll
 bin\nssutil3.dll
 bin\smime3.dll
 bin\softokn3.chk
 bin\softokn3.dll
@@ -362,28 +332,11 @@ bin\ssl3.dll
 bin\chrome\pipnss.jar
 bin\chrome\pippki.jar
 bin\chrome\pippki.manifest
 
 ; [Updater]
 ;
 bin\updater.exe
 
-#ifndef MOZILLA_1_8_BRANCH
 ; [Crash Reporter]
 bin\crashreporter.exe
 bin\crashreporter.ini
-#endif
-
-#ifdef MOZILLA_1_8_BRANCH
-[talkback]
-bin\extensions\talkback@mozilla.org\install.rdf
-bin\extensions\talkback@mozilla.org\chrome.manifest
-bin\extensions\talkback@mozilla.org\components\qfaservices.dll
-bin\extensions\talkback@mozilla.org\components\qfaservices.xpt
-bin\extensions\talkback@mozilla.org\components\BrandRes.dll
-bin\extensions\talkback@mozilla.org\components\fullsoft.dll
-bin\extensions\talkback@mozilla.org\components\master.ini
-bin\extensions\talkback@mozilla.org\components\talkback-l10n.ini
-bin\extensions\talkback@mozilla.org\components\talkback.cnt
-bin\extensions\talkback@mozilla.org\components\talkback.exe
-bin\extensions\talkback@mozilla.org\components\talkback.hlp
-#endif
--- a/calendar/itip/Makefile.in
+++ b/calendar/itip/Makefile.in
@@ -39,11 +39,11 @@ DEPTH		= ../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 MODULE = calItipEmailTransport
 
-EXTRA_PP_COMPONENTS = calItipEmailTransport.js
+EXTRA_COMPONENTS = calItipEmailTransport.js
 
 include $(topsrcdir)/config/rules.mk
--- a/calendar/itip/calItipEmailTransport.js
+++ b/calendar/itip/calItipEmailTransport.js
@@ -267,22 +267,16 @@ calItipEmailTransport.prototype = {
                     if (toList.length > 0) {
                         toList += ", ";
                     }
                     // Add this recipient id to the list.
                     toList += rId;
                 }
                 var mailFile = this._createTempImipFile(compatMode, toList, aSubject, aBody, aItem, identity);
                 if (mailFile) {
-#ifdef MOZILLA_1_8_BRANCH
-                    var mailFileURL = getIOService().newFileURI(mailFile).spec;
-                    mailFile = Components.classes["@mozilla.org/filespec;1"]
-                                         .createInstance(Components.interfaces.nsIFileSpec);
-                    mailFile.URLString = mailFileURL;
-#endif
                     // compose fields for message: from/to etc need to be specified both here and in the file
                     var composeFields = Components.classes["@mozilla.org/messengercompose/composefields;1"]
                                                   .createInstance(Components.interfaces.nsIMsgCompFields);
                     composeFields.characterSet = "UTF-8";
                     composeFields.to = toList;
                     composeFields.from = identity.email;
                     composeFields.replyTo = identity.replyTo;
 
--- a/calendar/libical/src/libical/Makefile.in
+++ b/calendar/libical/src/libical/Makefile.in
@@ -44,19 +44,17 @@ VPATH		= @srcdir@
 include $(DEPTH)/config/autoconf.mk
 
 MODULE           = ical
 LIBRARY_NAME     = mozical
 MODULE_NAME      = mozIcalModule
 FORCE_STATIC_LIB = 1
 GRE_MODULE       = 1
 FORCE_USE_PIC    = 1 # Force use of PIC
-ifndef MOZILLA_1_8_BRANCH
 USE_STATIC_LIBS  = 1 # This links against the static CRT on Windows
-endif
 
 EXPORTS = ical.h
 
 CSRCS =				\
 	icalderivedparameter.c	\
 	icalderivedproperty.c	\
 	icalrestriction.c	\
 	icalderivedvalue.c	\
--- a/calendar/lightning/Makefile.in
+++ b/calendar/lightning/Makefile.in
@@ -102,26 +102,22 @@ DEFINES += -DTHUNDERBIRD_VERSION=$(THUND
            -DFIREFOX_VERSION=$(FIREFOX_VERSION) \
            -DSEAMONKEY_VERSION=$(SEAMONKEY_VERSION) \
            -DLIGHTNING_VERSION=$(LIGHTNING_VERSION) \
            -DLIGHTNING_FIREFOX=$(LIGHTNING_FIREFOX) \
            -DTARGET_PLATFORM=$(OS_TARGET)_$(TARGET_XPCOM_ABI) \
            -DTHEME=$(THEME) \
            $(NULL)
 
-ifdef MOZILLA_1_8_BRANCH
-DEFINES += -DBUILD_ID=$(BUILD_ID)
-else
 ifdef COMM_BUILD
 GRE_BUILDID = $(shell $(PYTHON) $(MOZILLA_SRCDIR)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build BuildID)
 else
 GRE_BUILDID = $(shell $(PYTHON) $(topsrcdir)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build BuildID)
 endif
 DEFINES += -DGRE_BUILDID=$(GRE_BUILDID)
-endif
 
 # Get all directories in /l10n/*, that contain a calendar subdir.
 calendar_locales := $(subst /calendar,,$(subst $(topsrcdir)/../l10n/,,$(wildcard $(topsrcdir)/../l10n/*/calendar)))
 # Now make sure those dirs are in shipped-locales
 shipped_locales :=$(shell cat $(topsrcdir)/calendar/locales/shipped-locales)
 locales_to_build :=$(foreach locale,$(calendar_locales),$(if $(filter $(locale),$(shipped_locales)),$(locale)))
 
 ifneq ($(strip $(locales_to_build)),)
--- a/calendar/lightning/content/messenger-overlay-sidebar.xul
+++ b/calendar/lightning/content/messenger-overlay-sidebar.xul
@@ -468,21 +468,17 @@
                  accesskey="&calendar.properties.accesskey;"
                  command="calendar_edit_calendar_command"
                  observes="calendar_edit_calendar_command"/>
     </menupopup>
   </popupset>
 
 </window>
 
-#ifdef MOZILLA_1_8_BRANCH
-<hbox id="mailContent" flex="1">
-#else
 <hbox id="messengerBox" flex="1">
-#endif
 
   <!-- this will replace 'folderPaneBox' -->
   <vbox id="ltnModeBox" insertbefore="folderPaneBox" persist="collapsed width">
 
     <deck id="contentPanel" flex="1" minwidth="100" width="200" persist="collapsed width">
 
       <vbox id="ltnSidebar"
             height="350"
--- a/calendar/lightning/install.rdf
+++ b/calendar/lightning/install.rdf
@@ -6,63 +6,47 @@
 
   <Description about="urn:mozilla:install-manifest">
     <!-- Target Application this extension can install into, 
         with minimum and maximum supported versions. --> 
     <em:targetApplication>
       <Description>
         <!-- thunderbird -->
         <em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>
-#ifdef MOZILLA_1_8_BRANCH
-        <em:minVersion>2.0</em:minVersion>
-        <em:maxVersion>2.0.0.*</em:maxVersion>
-#else
         <em:minVersion>@THUNDERBIRD_VERSION@</em:minVersion>
         <em:maxVersion>@THUNDERBIRD_VERSION@</em:maxVersion>
-#endif
       </Description>
     </em:targetApplication>
 
 #if LIGHTNING_FIREFOX
     <!-- We only allow installation of Lightning into Firefox for ease of
        - development. You can edit the JS and then click reload in Firefox as
        - opposed to having to restart Thunderbird after each edit. -->
     <em:targetApplication>
       <Description>
         <!-- firefox -->
         <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
-#ifdef MOZILLA_1_8_BRANCH
-        <em:minVersion>2.0</em:minVersion>
-        <em:maxVersion>2.0.0.*</em:maxVersion>
-#else
         <em:minVersion>@FIREFOX_VERSION@</em:minVersion>
         <em:maxVersion>@FIREFOX_VERSION@</em:maxVersion>
-#endif
       </Description>
     </em:targetApplication>
 #endif
 
-#ifndef MOZILLA_1_8_BRANCH
     <em:targetApplication>
       <Description>
         <!-- seamonkey -->
         <em:id>{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}</em:id>
         <em:minVersion>@SEAMONKEY_VERSION@</em:minVersion>
         <em:maxVersion>@SEAMONKEY_VERSION@</em:maxVersion>
       </Description>
     </em:targetApplication>
-#endif
 
     <em:id>{e2fda1a4-762b-4020-b5ad-a41df1933103}</em:id>
     <em:name>Lightning</em:name>
     <em:version>@LIGHTNING_VERSION@</em:version>
-#ifdef MOZILLA_1_8_BRANCH
-    <em:description>An integrated calendar for Thunderbird (build @BUILD_ID@)</em:description>
-#else
     <em:description>An integrated calendar for Thunderbird (build @GRE_BUILDID@)</em:description>
-#endif
     <em:creator>Mozilla Calendar Project</em:creator>
     <em:homepageURL>http://www.mozilla.org/projects/calendar/releases/lightning@LIGHTNING_VERSION@.html</em:homepageURL>
     <em:iconURL>chrome://calendar/skin/cal-icon32.png</em:iconURL>
     <em:optionsURL>chrome://messenger/content/preferences/preferences.xul</em:optionsURL>
     <em:targetPlatform>@TARGET_PLATFORM@</em:targetPlatform>
   </Description>
 </RDF>
--- a/calendar/lightning/jar.mn
+++ b/calendar/lightning/jar.mn
@@ -1,15 +1,11 @@
 lightning.jar:
 % content lightning %content/lightning/
-#ifdef MOZILLA_1_8_BRANCH
-% content messagebody %content/messagebody/
-#else
 % content messagebody %content/messagebody/ contentaccessible=yes
-#endif
 % override chrome://messagebody/skin/imip.css chrome://lightning/skin/imip.css
 % overlay chrome://messenger/content/messenger.xul chrome://lightning/content/lightning-migration.xul
 % overlay chrome://messenger/content/msgAccountCentral.xul chrome://lightning/content/messenger-overlay-accountCentral.xul
 % overlay chrome://messenger/content/messenger.xul chrome://lightning/content/messenger-overlay-sidebar.xul
 % overlay chrome://messenger/content/messageWindow.xul chrome://lightning/content/imip-bar-overlay.xul
 % overlay chrome://messenger/content/messageWindow.xul chrome://lightning/content/messenger-overlay-messageWindow.xul
 % overlay chrome://lightning/content/messenger-overlay-sidebar.xul chrome://lightning/content/imip-bar-overlay.xul
 % overlay chrome://messenger/content/preferences/preferences.xul chrome://lightning/content/messenger-overlay-preferences.xul
--- a/calendar/prototypes/wcap/sun-calendar-event-dialog.css
+++ b/calendar/prototypes/wcap/sun-calendar-event-dialog.css
@@ -183,20 +183,16 @@ timezone-page {
     -moz-padding-start: 8px;
     -moz-padding-end: 10px;
 }
 
 #addressingWidget {
     -moz-user-focus: none;
 }
 
-/* This definition is only required for MOZILLA_1_8_BRANCH */
-.textbox-addressingWidget[noMatchesFound="true"] {
-    color: red;
-}
 
 #typecol-addressingWidget {
     min-width: 9em;
     border-right: 1px solid #CACAFF;
 }
 
 /* This applies to rows of the attendee-list and the freebusy-grid */
 .addressingWidgetItem,
--- a/calendar/prototypes/wcap/sun-calendar-event-dialog.js
+++ b/calendar/prototypes/wcap/sun-calendar-event-dialog.js
@@ -1999,27 +1999,20 @@ function onCommandCustomize() {
         menubar.childNodes[i].setAttribute("disabled", true);
     }
       
     // Disable the toolbar context menu items
     document.getElementById("cmd_customize").setAttribute("disabled", "true");
 
     var id = "event-toolbox";
     if (isSunbird()) {
-#ifdef MOZILLA_1_8_BRANCH
-        var newwindow = window.openDialog("chrome://calendar/content/customizeToolbar.xul",
-                                          "CustomizeToolbar",
-                                          "chrome,all,dependent",
-                                          document.getElementById(id));
-#else
         window.openDialog("chrome://global/content/customizeToolbar.xul",
                           "CustomizeToolbar",
                           "chrome,all,dependent",
                           document.getElementById(id));
-#endif
     } else {
         var wintype = document.documentElement.getAttribute("windowtype");
         wintype = wintype.replace(/:/g, "");
 
         window.openDialog("chrome://global/content/customizeToolbar.xul",
                           "CustomizeToolbar" + wintype,
                           "chrome,all,dependent",
                           document.getElementById(id), // toolbar dom node
--- a/calendar/providers/wcap/calWcapRequest.js
+++ b/calendar/providers/wcap/calWcapRequest.js
@@ -441,27 +441,19 @@ function issueNetworkRequest(parentReque
         channel = channel.QueryInterface(Components.interfaces.nsIHttpChannel);
         channel.redirectionLimit = 3;
         channel.notificationCallbacks = netRequest;
         var loader = Components.classes["@mozilla.org/network/unichar-stream-loader;1"]
                                .createInstance(Components.interfaces.nsIUnicharStreamLoader);
         netRequest.m_loader = loader;
 
         log("opening channel.", netRequest);
-        // Required to be trunk and branch compatible:
-        if (isBranch()) {
-            loader.init(channel,
-                        netRequest,
-                        null /* context */,
-                        Components.interfaces.nsIUnicharStreamLoader.DEFAULT_SEGMENT_SIZE);
-        } else {
-            loader.init(netRequest,
-                        Components.interfaces.nsIUnicharStreamLoader.DEFAULT_SEGMENT_SIZE);
-            channel.asyncOpen(loader, null);
-        }
+        loader.init(netRequest,
+                    Components.interfaces.nsIUnicharStreamLoader.DEFAULT_SEGMENT_SIZE);
+        channel.asyncOpen(loader, null);
     } catch (exc) {
         netRequest.execRespFunc(exc);
     }
 }
 
 function getWcapRequestStatusString(xml) {
     var str = "request status: ";
     var items = xml.getElementsByTagName("RSTATUS");
--- a/calendar/resources/Makefile.in
+++ b/calendar/resources/Makefile.in
@@ -40,10 +40,21 @@ srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 EXTRA_COMPONENTS = \
 	content/calendarService.js \
 	$(NULL)
 
 include $(DEPTH)/config/autoconf.mk
 
+# Select a theme from which to pull our skin goodness
+# OS X: pinstripe
+# Others: winstripe
+
+ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
+THEME = pinstripe
+else
+THEME = winstripe
+endif
+
+DEFINES += -DTHEME=$(THEME)
+
 include $(topsrcdir)/config/rules.mk
-
--- a/calendar/resources/content/calendar.js
+++ b/calendar/resources/content/calendar.js
@@ -223,23 +223,18 @@ function CalendarCustomizeToolbar()
   // Disable the toolbar context menu items
   var menubar = document.getElementById("main-menubar");
   for (var i = 0; i < menubar.childNodes.length; ++i)
     menubar.childNodes[i].setAttribute("disabled", true);
     
   var cmd = document.getElementById("cmd_CustomizeToolbars");
   cmd.setAttribute("disabled", "true");
 
-#ifdef MOZILLA_1_8_BRANCH
-  window.openDialog("chrome://calendar/content/customizeToolbar.xul", "CustomizeToolbar",
-                    "chrome,all,dependent", document.getElementById("calendar-toolbox"));
-#else
   window.openDialog("chrome://global/content/customizeToolbar.xul", "CustomizeToolbar",
                     "chrome,all,dependent", document.getElementById("calendar-toolbox"));
-#endif
 }
 
 function CalendarToolboxCustomizeDone(aToolboxChanged)
 {
   // Re-enable parts of the UI we disabled during the dialog
   var menubar = document.getElementById("main-menubar");
   for (var i = 0; i < menubar.childNodes.length; ++i)
     menubar.childNodes[i].setAttribute("disabled", false);
--- a/calendar/resources/jar.mn
+++ b/calendar/resources/jar.mn
@@ -1,33 +1,26 @@
-#filter substitution
-
 calendar.jar:
 % content calendar %content/calendar/
-*   content/calendar/calendar.js (content/calendar.js)
+    content/calendar/calendar.js (content/calendar.js)
     content/calendar/calendarWindow.js (content/calendarWindow.js)
     content/calendar/calendarCreation.xul (content/calendarCreation.xul)
     content/calendar/calendarCreation.js (content/calendarCreation.js)
     content/calendar/clipboard.js (content/clipboard.js)
 *   content/calendar/printDialog.js  (content/printDialog.js)    
     content/calendar/printDialog.xul  (content/printDialog.xul)
     content/calendar/publish.js  (content/publish.js)
     content/calendar/publishDialog.js  (content/publishDialog.js)    
     content/calendar/publishDialog.xul  (content/publishDialog.xul)
     content/calendar/mouseoverPreviews.js (content/mouseoverPreviews.js)
     content/calendar/sound.wav  (content/sound.wav)
     content/calendar/datetimepickers/datetimepickers.css (content/datetimepickers/datetimepickers.css)
 *   content/calendar/datetimepickers/datetimepickers.xml (content/datetimepickers/datetimepickers.xml)
     content/calendar/preferences/advanced.js      (/calendar/base/content/preferences/advanced.js)
-*    content/calendar/preferences/advanced.xul     (/calendar/base/content/preferences/advanced.xul)
+*   content/calendar/preferences/advanced.xul     (/calendar/base/content/preferences/advanced.xul)
 *   content/calendar/preferences/connection.xul   (/calendar/base/content/preferences/connection.xul)
-*   content/calendar/preferences/connection.js    (/calendar/base/content/preferences/connection.js)
+    content/calendar/preferences/connection.js    (/calendar/base/content/preferences/connection.js)
 *   content/calendar/preferences/preferences.xul  (/calendar/base/content/preferences/preferences.xul)
 % skin calendar classic/1.0 %skin/classic/calendar/
-#ifdef XP_MACOSX
-    skin/classic/calendar/preferences/Options.png  (/calendar/base/themes/pinstripe/preferences/Options.png)
-    skin/classic/calendar/preferences/preferences.css  (/calendar/base/themes/pinstripe/preferences/preferences.css)
-#else
-    skin/classic/calendar/preferences/Options.png  (/calendar/base/themes/winstripe/preferences/Options.png)
-    skin/classic/calendar/preferences/preferences.css  (/calendar/base/themes/winstripe/preferences/preferences.css)
-#endif
     skin/classic/calendar/dialogOverlay.css (skin/classic/dialogOverlay.css)
     skin/classic/calendar/datetimepickers/datetimepickers.css (skin/classic/datetimepickers/datetimepickers.css)
+#expand    skin/classic/calendar/preferences/Options.png  (/calendar/base/themes/__THEME__/preferences/Options.png)
+#expand    skin/classic/calendar/preferences/preferences.css  (/calendar/base/themes/__THEME__/preferences/preferences.css)
--- a/calendar/sunbird/app/Makefile.in
+++ b/calendar/sunbird/app/Makefile.in
@@ -86,34 +86,30 @@ REQUIRES = \
 	xpcom \
 	xulapp \
 	$(NULL)
 
 CPPSRCS = nsCalendarApp.cpp
 
 LOCAL_INCLUDES += -I$(MOZILLA_SRCDIR)/toolkit/xre
 
-ifdef MOZILLA_1_8_BRANCH
-LIBS += $(DIST)/lib/$(LIB_PREFIX)xulapp_s.$(LIB_SUFFIX)
-else
 ifdef BUILD_STATIC_LIBS
 ifdef _MSC_VER
 STATIC_COMPONENTS_LINKER_PATH = -LIBPATH:$(DEPTH)/staticlib
 else
 STATIC_COMPONENTS_LINKER_PATH = -L$(DEPTH)/staticlib
 endif
 LIBS += $(MOZDEPTH)/toolkit/xre/$(LIB_PREFIX)xulapp_s.$(LIB_SUFFIX)
 else
 ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
 LIBS += $(DIST)/bin/XUL
 else
 EXTRA_DSO_LIBS += xul
 endif
 endif
-endif
 
 ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
 TK_LIBS := -framework Cocoa $(TK_LIBS)
 ifdef BUILD_STATIC_LIBS
 TK_LIBS := -framework SystemConfiguration -framework CoreAudio -framework AudioToolbox -framework AudioUnit $(TK_LIBS)
 endif
 endif
 
@@ -176,19 +172,16 @@ DEFINES		+= $(STATIC_DEFINES)
 CPPSRCS		+= $(STATIC_CPPSRCS)
 EXTRA_DSO_LIBS	+= $(STATIC_EXTRA_DSO_LIBS)
 REQUIRES	+= $(STATIC_REQUIRES)
 EXTRA_LIBS	+= $(STATIC_EXTRA_LIBS)
 endif
 
 ifeq ($(OS_ARCH),WINNT)
 OS_LIBS += $(call EXPAND_LIBNAME,comctl32 comdlg32 uuid shell32 ole32 oleaut32 version winspool)
-ifdef MOZILLA_1_8_BRANCH
-OS_LIBS += $(call EXPAND_LIBNAME,gdi32)
-endif
 OS_LIBS += $(call EXPAND_LIBNAME,usp10 msimg32)
 RCINCLUDE = splash.rc
 ifndef GNU_CC
 RCFLAGS += -DMOZ_SUNBIRD -I$(srcdir)
 else
 RCFLAGS += -DMOZ_SUNBIRD --include-dir $(srcdir)
 endif
 ifdef BUILD_STATIC_LIBS
--- a/calendar/sunbird/app/splash.rc
+++ b/calendar/sunbird/app/splash.rc
@@ -57,23 +57,16 @@ END
 #ifdef MOZ_STATIC_BUILD
 
 // XXX This code is copied from resource.h and widget.rc.  It's a work-around
 // for the limitation that only one resource file can be used in an .exe.  We
 // should develop a method, for static builds only, to combine multiple .rc
 // files into a single .rc file, and then use that to build the single .res
 // file for the .exe.
 
-#ifdef MOZILLA_1_8_BRANCH
-// We need this cursor for versions of Windows that don't support IDC_HAND,
-// namely Win95 and NT4.
-#define IDC_SELECTANCHOR                4100
-IDC_SELECTANCHOR        CURSOR  DISCARDABLE     "../../widget/src/build/res/select.cur"
-#endif
-
 #define IDC_GRAB                        4101
 #define IDC_GRABBING                    4102
 #define IDC_CELL                        4103
 #define IDC_COPY                        4104
 #define IDC_ALIAS                       4105
 #define IDC_ZOOMIN                      4106
 #define IDC_ZOOMOUT                     4107
 #define IDC_COLRESIZE                   4108
deleted file mode 100644
--- a/calendar/sunbird/base/content/customizeToolbar.xul
+++ /dev/null
@@ -1,122 +0,0 @@
-<?xml version="1.0"?> 
-
-# ***** BEGIN LICENSE BLOCK *****
-# Version: MPL 1.1/GPL 2.0/LGPL 2.1
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-# http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Original Code is Mozilla Communicator client code, released
-# March 31, 1998.
-#
-# The Initial Developer of the Original Code is
-# Netscape Communications Corporation.
-# Portions created by the Initial Developer are Copyright (C) 1998-1999
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s):
-#   David Hyatt (hyatt@apple.com)
-#   Blake Ross (blaker@netscape.com)
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 2 or later (the "GPL"), or
-# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-# in which case the provisions of the GPL or the LGPL are applicable instead
-# of those above. If you wish to allow use of your version of this file only
-# under the terms of either the GPL or the LGPL, and not to allow others to
-# use your version of this file under the terms of the MPL, indicate your
-# decision by deleting the provisions above and replace them with the notice
-# and other provisions required by the GPL or the LGPL. If you do not delete
-# the provisions above, a recipient may use your version of this file under
-# the terms of any one of the MPL, the GPL or the LGPL.
-#
-# ***** END LICENSE BLOCK *****
-
-<!DOCTYPE dialog [
-<!ENTITY % customizeToolbarDTD SYSTEM "chrome://global/locale/customizeToolbar.dtd">
-  %customizeToolbarDTD;
-]>
-
-<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
-<?xml-stylesheet href="chrome://global/content/customizeToolbar.css" type="text/css"?>
-<?xml-stylesheet href="chrome://global/skin/customizeToolbar.css" type="text/css"?>
-
-<window id="CustomizeToolbarWindow"
-        title="&dialog.title;"
-        onload="onLoad();"
-#ifdef MOZILLA_1_8_BRANCH
-        onunload="onUnload();"
-        onclose="onAccept(); return false;"
-#else
-        onunload="finishToolbarCustomization();"
-#endif
-        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
-<script type="application/x-javascript">
-  <![CDATA[
-    var toolbox = window.arguments[0];
-    var toolboxDocument = toolbox.ownerDocument;
-
-    var sheetList = toolboxDocument.styleSheets;
-    for (var i=0; i < sheetList.length; ++i) {
-      var newPI = document.createProcessingInstruction("xml-stylesheet", 'href="'+sheetList[i].href+'" type="text/css"');
-      document.insertBefore(newPI, document.firstChild);    
-    }
-  ]]>
-</script>
-
-<script type="application/x-javascript" src="chrome://global/content/customizeToolbar.js"/>
-<script type="application/x-javascript" src="chrome://global/content/nsDragAndDrop.js"/>
-
-<stringbundle id="stringBundle" src="chrome://global/locale/customizeToolbar.properties"/>
-
-#ifdef MOZILLA_1_8_BRANCH
-<vbox id="main-box" flex="1" collapsed="true">
-#else
-<vbox id="main-box" flex="1">
-#endif
-  <description id="instructions">
-  &instructions.description;
-  </description>
-
-  <vbox flex="1" id="palette-box"
-        ondraggesture="nsDragAndDrop.startDrag(event, dragStartObserver);"
-        ondragover="nsDragAndDrop.dragOver(event, paletteDNDObserver);"
-        ondragdrop="nsDragAndDrop.drop(event, paletteDNDObserver);"/>
-
-  <box align="center">
-    <label value="&show.label;" control="modelist"/>
-    <menulist id="modelist" value="full" oncommand="updateToolbarMode(this.value);">
-      <menupopup>
-        <menuitem value="full" label="&iconsAndText.label;"/>
-        <menuitem value="icons" label="&icons.label;"/>
-        <menuitem value="text" label="&text.label;"/>
-      </menupopup>
-    </menulist>
-    
-    <checkbox id="smallicons" oncommand="updateIconSize(this.checked);" label="&useSmallIcons.label;"/>
-    
-    <button label="&addNewToolbar.label;" oncommand="addNewToolbar();"/>
-    <button label="&restoreDefaultSet.label;" oncommand="restoreDefaultSet();"/>
-  </box>
-
-  <separator class="groove"/>
-
-  <hbox align="center" pack="end">
-#ifdef MOZILLA_1_8_BRANCH
-    <button label="&saveChanges.label;" oncommand="onAccept();" default="true"/>
-#else
-    <button label="&saveChanges.label;" oncommand="window.close();"
-            default="true"/>
-#endif
-  </hbox>
-</vbox>
-
-</window>
--- a/calendar/sunbird/base/jar.mn
+++ b/calendar/sunbird/base/jar.mn
@@ -3,22 +3,18 @@ calendar.jar:
 *  content/calendar/aboutDialog.css              (content/aboutDialog.css)
 *  content/calendar/aboutDialog.js               (content/aboutDialog.js)
 *  content/calendar/aboutDialog.xul              (content/aboutDialog.xul)
 *  content/calendar/calendar.xul                 (content/calendar.xul)
    content/calendar/calendar-gotodate-dialog.xul (content/calendar-gotodate-dialog.xul)
    content/calendar/calendar-offline.js          (content/calendar-offline.js)
 *  content/calendar/credits.xhtml                (content/credits.xhtml)
    content/calendar/applicationUtil.js           (content/applicationUtil.js)
-#ifdef MOZILLA_1_8_BRANCH
-*  content/calendar/customizeToolbar.xul         (content/customizeToolbar.xul)
-#else
 % style chrome://global/content/customizeToolbar.xul chrome://calendar/skin/calendar.css
 % style chrome://global/content/customizeToolbar.xul chrome://calendar/skin/calendar-toolbar.css
-#endif
 *  content/calendar/hiddenWindow.xul             (content/hiddenWindow.xul)
 *  content/calendar/hiddenWindow.js              (content/hiddenWindow.js)
 #ifdef MOZ_USE_GENERIC_BRANDING
 #   NOTE: xpcnativewrappers=yes became the default in Gecko 1.8.1
 % content branding %content/branding/ xpcnativewrappers=yes
     content/branding/about.png                   (branding/about.png)
     content/branding/aboutCredits.png            (branding/aboutCredits.png)
     content/branding/aboutFooter.png             (branding/aboutFooter.png)
--- a/calendar/test/unit/head_consts.js
+++ b/calendar/test/unit/head_consts.js
@@ -211,20 +211,8 @@ function compareItemsSpecific(aLeftItem,
                       "recurrenceStartDate"];
     }
     for (var i = 0; i < aPropArray.length; i++) {
         do_check_eq(getProps(aLeftItem, aPropArray[i]),
                     getProps(aRightItem,
                     aPropArray[i]));
     }
 }
-
-// Support do_check_true and  do_check_false on MOZILLA_1_8_BRANCH
-if (typeof do_check_true != "function") {
-    do_check_true = function do_check_true(condition) {
-        do_check_eq(condition, true);
-    }
-}
-if (typeof do_check_false != "function") {
-    do_check_false = function do_check_false(condition) {
-        do_check_eq(condition, false);
-    }
-}
--- a/calendar/timezones/Makefile.in
+++ b/calendar/timezones/Makefile.in
@@ -82,27 +82,22 @@ TIMEZONES_VERSION := $(shell cat $(srcdi
 DEFINES += -DAB_CD=$(AB_CD) \
            -DCALENDAR_VERSION=$(CALENDAR_VERSION) \
            -DTIMEZONES_VERSION=$(TIMEZONES_VERSION) \
            $(NULL)
 
 TIMEZONES_SQLITE =  $(srcdir)/timezones.sqlite
 
 ifneq ($(strip $(update)),)
-ifdef MOZILLA_1_8_BRANCH
-	# xxx todo: update script depends on bug 435474
-	echo 'update script does only run on trunk (and with bug 435474) fixed...'
-	exit
-else
+# xxx todo: update script depends on bug 435474
 libs::
 	echo 'SELECT * FROM tz_data ORDER BY tzid;' | sqlite3 $(TIMEZONES_SQLITE) > $(srcdir)/timezones_before_update.dump
 	$(DIST)/bin/xpcshell -s -w $(srcdir)/update.js $(update) $(srcdir)/$(DEPTH) $(TIMEZONES_VERSION)
 	echo 'SELECT * FROM tz_data ORDER BY tzid;' | sqlite3 $(TIMEZONES_SQLITE) > $(srcdir)/timezones.dump
 endif
-endif
 
 libs::
 	$(NSINSTALL) $(TIMEZONES_SQLITE) $(FINAL_TARGET)
 
 # Get all directories in /l10n/*, that contain a calendar subdir.
 calendar_locales := $(subst /calendar,,$(subst $(topsrcdir)/../l10n/,,$(wildcard $(topsrcdir)/../l10n/*/calendar)))
 # Now make sure those dirs are in shipped-locales
 shipped_locales :=$(shell cat $(topsrcdir)/calendar/locales/shipped-locales)
--- a/calendar/timezones/install.rdf
+++ b/calendar/timezones/install.rdf
@@ -45,21 +45,17 @@
 
     <!-- Target Application this extension can install into,
          with minimum and maximum supported versions. -->
     <em:targetApplication>
       <Description>
         <!-- Sunbird; we define an upper limit, because we come
              with a top-notch timezones.xpi on every release -->
         <em:id>{718e30fb-e89b-41dd-9da7-e25a45638b28}</em:id>
-#ifdef MOZILLA_1_8_BRANCH
         <em:minVersion>0.9pre</em:minVersion>
-#else
-        <em:minVersion>@CALENDAR_VERSION@</em:minVersion>
-#endif
         <em:maxVersion>@CALENDAR_VERSION@</em:maxVersion>
       </Description>
     </em:targetApplication>
     <em:targetApplication>
       <Description>
         <!-- Thunderbird -->
         <em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>
         <em:minVersion>2.0a1</em:minVersion>