Discussion:
Imported repeating event
Howard Brazee
20 years ago
Permalink
I imported an Outlook calendar. I had a recurring appointment that
happened at 2:00 every 2 weeks (it was to function as a task reminder).

I imported it into Sunbird 0.2 and got a bunch of full day events. My
full-day repeating events (birthdays), also don't show up as repeating
events.

What's the easiest way to convert these into repeating events?

I moved the calendar up a couple of years and saw the events. I
wouldn't mind deleting events and re-creating them by hand, but how many
do I need to delete?
Dave Clegg
20 years ago
Permalink
I've just picked up 0.2 Sunbird and was easily able to import the iCal
of another (WinDates) calendar manager I have been using. Great!

One feature of my old calendar manager is that as long as the dialog box
announcing an alarm is open, it will keep replaying the alarm sound
every 10 seconds for a minute or two until you snooze or acknowledge the
alarm.

With Sunbird, if you happen to have wandered away from your computer
when the sound happens (once), it may be some time before you happen to
look at your screen and see the dialog.

I have not seen this "feature" in the newsgroups or feature requirements
page.

If somebody who knows the code well thinks this would be pretty easy,
I'm happy to take a crack at it - I am a programmer, though haven't done
much with JavaScript recently.

Dave Clegg
Dave Clegg
20 years ago
Permalink
...
Figured out how to do it...
First, I had to add calendar.js to the includes for the alertDialog -
that involved adding
<script type="application/x-javascript"
src="chrome://calendar/content/calendar.js"/>
to the Javascript includes section of alertDialog.xul

Now the playSound() function is available from the alertDialog.

Then in alertDialog.js add a variable for tracking the number of times
the sound gets played:
var SoundCounter = 0;

Then at the very bottom of the onLoad() function add
repeatSound();
The definition of the repeatSound function is also added to alertDialog.js:
function repeatSound()
{
if(
getBoolPref(opener.gCalendarWindow.calendarPreferences.calendarPref,
"alarms.playsound",
gCalendarBundle.getString("playAlarmSound") )
)
{
playSound();
}
SoundCounter ++;
if (SoundCounter < 6)
{
setTimeout("repeatSound()",10000)
}
}

The sound gets repeated every 10000 milliseconds for 6 times -- this
gives me the 1 minutes worth of repeated audible alerts I wanted.

As soon as the alertDialog box is dismissed the sound will stop.

dave
Christopher Jahn
20 years ago
Permalink
...
This really should be a new thread, rather than a reply to a message that
is about something completely different.
--
}:-) Christopher Jahn
{:-( http://home.comcast.net/~xjahn/Main.html

Never trust a cop with a rubber glove.
Continue reading on narkive:
Loading...