Closed Bug 325660 Opened 19 years ago Closed 18 years ago

calendar XPI needs main-window overlay to explicitly start alarm service

Categories

(Calendar :: Sunbird Only, defect)

defect
Not set
major

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: dmosedale, Assigned: mozilla)

References

Details

(Keywords: regression)

Attachments

(2 files, 1 obsolete file)

As a result of the changes made in bug 325476, the alarm service is no longer being started in calendar.xpi.  An overlay to the main application window needs to be added that explicitly starts the service.
*** Bug 328767 has been marked as a duplicate of this bug. ***
Attached patch add alarm init to overlay (obsolete) — — Splinter Review
This isn't really a killer, a very similar problem exists with MailNews, too, where you have to open that window once to activate mailbox checks.

But I looked at this and this patch works, I tested with SeaMonkey. Unfortunately, it also slows down the startup time by quite a bit because initializing the alarm service obviously means that it checks each event before continuing and that all takes place before any windows are painted, so it's pretty annoying.

Btw, are the files calendar\resources\content\calExtOverlay.* still in use for Firefox? Then the same lines would need to be added there.
Assignee: nobody → mozilla
Status: NEW → ASSIGNED
As Joey remarked in the newsgroup timezone=-1 was not very clever, but it doesn't have any serious results AFAICS.

But there doesn't seem to be an interface that lets me access calendarDefaultTimezone() or at least guessSystemTimezone() to do this correctly or am I blind?
(In reply to comment #3)
> As Joey remarked in the newsgroup timezone=-1 was not very clever, but it
> doesn't have any serious results AFAICS.
It should, if there are any items with alarms actually in the calendar:

js> var cdt = Components.classes["@mozilla.org/calendar/datetime;1"].createInstance(Components.interfaces.calIDateTime);
js> cdt.jsDate = new Date();
Sun Mar 26 2006 12:33:45 GMT-0500 (CDT)
js> cdt.getInTimezone(-1);
uncaught exception: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [calIDateTime.getInTimezone]"  nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)"  location: "JS frame :: typein :: <TOP_LEVEL> :: line 3"  data: no]


> 
> But there doesn't seem to be an interface that lets me access
> calendarDefaultTimezone() or at least guessSystemTimezone() to do this
> correctly or am I blind?
> 
You need to include chrome://calendar/content/calendarUtils.js, then the function will be available.
Oh yes, including works, too, and is better than cheating. Stupid me! :-)

Let me figure out over the next days if I find a way to not make it block the startup while loading the alarms.
Attachment #216301 - Attachment is obsolete: true
Attached patch Asynchronous alarm init — — Splinter Review
Now that the calendar extension is announced to be dead any more work is probably wasted. But as I had already done this new patch I can as well upload it.

I haven't actually timed if synchronous or this new asynchronous alarm init is faster to display the main window, so I leave both active...
calendar.xpi is dead
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: