diff --git a/calendar/base/build/calBaseModule.cpp b/calendar/base/build/calBaseModule.cpp index 2f3d549e07b..dcfa305d983 100644 --- a/calendar/base/build/calBaseModule.cpp +++ b/calendar/base/build/calBaseModule.cpp @@ -46,28 +46,37 @@ #include "calDuration.h" #include "calPeriod.h" #include "calICSService.h" +#include "calTimezoneService.h" #include "calRecurrenceRule.h" #include "calRecurrenceDate.h" #include "calRecurrenceDateSet.h" #include "calBaseCID.h" -NS_GENERIC_FACTORY_CONSTRUCTOR(calDateTime) NS_GENERIC_FACTORY_CONSTRUCTOR(calDuration) -NS_GENERIC_FACTORY_CONSTRUCTOR(calPeriod) -NS_GENERIC_FACTORY_CONSTRUCTOR(calICSService) -NS_GENERIC_FACTORY_CONSTRUCTOR(calRecurrenceRule) -NS_GENERIC_FACTORY_CONSTRUCTOR(calRecurrenceDate) -NS_GENERIC_FACTORY_CONSTRUCTOR(calRecurrenceDateSet) - -NS_DECL_CLASSINFO(calDateTime) NS_DECL_CLASSINFO(calDuration) + +NS_GENERIC_FACTORY_CONSTRUCTOR(calPeriod) NS_DECL_CLASSINFO(calPeriod) -NS_DECL_CLASSINFO(calICSService) + +NS_GENERIC_FACTORY_CONSTRUCTOR(calRecurrenceRule) NS_DECL_CLASSINFO(calRecurrenceRule) + +NS_GENERIC_FACTORY_CONSTRUCTOR(calRecurrenceDate) NS_DECL_CLASSINFO(calRecurrenceDate) + +NS_GENERIC_FACTORY_CONSTRUCTOR(calRecurrenceDateSet) NS_DECL_CLASSINFO(calRecurrenceDateSet) +NS_GENERIC_FACTORY_CONSTRUCTOR(calDateTime) +NS_DECL_CLASSINFO(calDateTime) + +NS_GENERIC_FACTORY_CONSTRUCTOR(calICSService) +NS_DECL_CLASSINFO(calICSService) + +NS_GENERIC_FACTORY_CONSTRUCTOR(calTimezoneService) +NS_DECL_CLASSINFO(calTimezoneService) + static const nsModuleComponentInfo components[] = { { "Calendar DateTime Object", @@ -114,6 +123,17 @@ static const nsModuleComponentInfo components[] = NULL, &NS_CLASSINFO_NAME(calICSService) }, + { "Timezone Service", + CAL_TIMEZONESERVICE_CID, + CAL_TIMEZONESERVICE_CONTRACTID, + calTimezoneServiceConstructor, + NULL, + NULL, + NULL, + NS_CI_INTERFACE_GETTER_NAME(calTimezoneService), + NULL, + &NS_CLASSINFO_NAME(calTimezoneService) + }, { "Calendar Recurrence Rule", CAL_RECURRENCERULE_CID, CAL_RECURRENCERULE_CONTRACTID, diff --git a/calendar/base/content/calendar-decorated-month-view.xml b/calendar/base/content/calendar-decorated-month-view.xml index c057f71e85c..3ffb52571f9 100644 --- a/calendar/base/content/calendar-decorated-month-view.xml +++ b/calendar/base/content/calendar-decorated-month-view.xml @@ -120,7 +120,7 @@ this.calView.goToDay(this.calView.selectedDay); break; case "calendar.timezone.local": - this.calView.viewElem.timezone = subj.getCharPref(pref); + this.calView.viewElem.timezone = calendarDefaultTimezone(); if (!this.calView.startDay || !this.calView.endDay) { // Don't refresh if we're not initialized return; diff --git a/calendar/base/content/calendar-decorated-multiday-base-view.xml b/calendar/base/content/calendar-decorated-multiday-base-view.xml index 3e00663681e..53b938c3ee2 100644 --- a/calendar/base/content/calendar-decorated-multiday-base-view.xml +++ b/calendar/base/content/calendar-decorated-multiday-base-view.xml @@ -163,7 +163,7 @@ break; case "calendar.timezone.local": - this.viewElem.timezone = aSubject.getCharPref(aPreference); + this.viewElem.timezone = calendarDefaultTimezone(); if (!this.startDay || !this.endDay) { // don't refresh if we're not initialized return; diff --git a/calendar/base/content/calendar-decorated-multiweek-view.xml b/calendar/base/content/calendar-decorated-multiweek-view.xml index f8380dfc14e..4962bf2f03d 100644 --- a/calendar/base/content/calendar-decorated-multiweek-view.xml +++ b/calendar/base/content/calendar-decorated-multiweek-view.xml @@ -132,7 +132,7 @@ this.calView.goToDay(this.calView.selectedDay); break; case "calendar.timezone.local": - this.calView.viewElem.timezone = subj.getCharPref(pref); + this.calView.viewElem.timezone = calendarDefaultTimezone(); if (!this.calView.startDay || !this.calView.endDay) { // Don't refresh if we're not initialized return; diff --git a/calendar/base/content/calendar-dnd-listener.js b/calendar/base/content/calendar-dnd-listener.js index 4e9010e1530..67290d27023 100644 --- a/calendar/base/content/calendar-dnd-listener.js +++ b/calendar/base/content/calendar-dnd-listener.js @@ -71,7 +71,7 @@ var calendarDNDObserver = { case "text/calendar": var parser = Components.classes["@mozilla.org/calendar/ics-parser;1"] .createInstance(Components.interfaces.calIIcsParser); - parser.parseString(data); + parser.parseString(data, null); startBatchTransaction(); try { for each (var item in parser.getItems({})) { @@ -150,7 +150,7 @@ var calendarDNDObserver = { } var parser = Components.classes["@mozilla.org/calendar/ics-parser;1"] .createInstance(Components.interfaces.calIIcsParser); - parser.parseString(str); + parser.parseString(str, null); startBatchTransaction(); try { for each (var item in parser.getItems({})) { diff --git a/calendar/base/content/calendar-month-view.xml b/calendar/base/content/calendar-month-view.xml index 80d8bf0015b..1e17c5becd0 100644 --- a/calendar/base/content/calendar-month-view.xml +++ b/calendar/base/content/calendar-month-view.xml @@ -836,6 +836,7 @@ hdr.index = i; } + this.mTimezone = floating(); var alarmService = Components.classes['@mozilla.org/calendar/alarm-service;1'] .getService(Components.interfaces.calIAlarmService); alarmService.addObserver(this.mObserver); @@ -857,7 +858,7 @@ null null null - "floating" + null [] null diff --git a/calendar/base/content/calendar-multiday-view.xml b/calendar/base/content/calendar-multiday-view.xml index 00fe8f374aa..01d2e9fd8de 100644 --- a/calendar/base/content/calendar-multiday-view.xml +++ b/calendar/base/content/calendar-multiday-view.xml @@ -265,6 +265,7 @@ @@ -277,7 +278,7 @@ null null null - "UTC" + null null 0