From 93cc886d45127b8a4ae1202e11c0e077e4f1a130 Mon Sep 17 00:00:00 2001 From: "mvl%exedo.nl" Date: Sat, 9 Jul 2005 17:31:26 +0000 Subject: [PATCH] Hook up alarm dialog for sunbird. bug 299366, patch by jminta, r=mvl --- calendar/installer/windows/packages-static | 1 + calendar/resources/Makefile.in | 3 ++- calendar/resources/content/calendar.js | 23 ------------------- calendar/resources/jar.mn | 7 +++--- .../locale/en-US/calendar.properties | 1 + 5 files changed, 8 insertions(+), 27 deletions(-) diff --git a/calendar/installer/windows/packages-static b/calendar/installer/windows/packages-static index 0825213d9fd9..bc86eeaee3f9 100644 --- a/calendar/installer/windows/packages-static +++ b/calendar/installer/windows/packages-static @@ -191,6 +191,7 @@ bin\components\nsBackgroundUpdateService.js bin\components\extensions.xpt bin\components\update.xpt bin\components\calendarService.js +bin\components\calAlarmMonitor.js ; [Browser Chrome Files] bin\chrome\calendar.jar diff --git a/calendar/resources/Makefile.in b/calendar/resources/Makefile.in index f79605049214..afcd9589c4ed 100644 --- a/calendar/resources/Makefile.in +++ b/calendar/resources/Makefile.in @@ -39,7 +39,8 @@ topsrcdir = @top_srcdir@ srcdir = @srcdir@ VPATH = @srcdir@ -EXTRA_COMPONENTS = content/calendarService.js +EXTRA_COMPONENTS = content/calendarService.js \ + content/calAlarmMonitor.js include $(DEPTH)/config/autoconf.mk diff --git a/calendar/resources/content/calendar.js b/calendar/resources/content/calendar.js index 32e65f5d158b..7929b004efb0 100644 --- a/calendar/resources/content/calendar.js +++ b/calendar/resources/content/calendar.js @@ -1045,29 +1045,6 @@ function goFindNewCalendars() } } -function playSound( ThisURL ) -{ - ThisURL = "chrome://calendar/content/sound.wav"; - - var url = Components.classes["@mozilla.org/network/standard-url;1"].createInstance(); - url = url.QueryInterface(Components.interfaces.nsIURL); - url.spec = ThisURL; - - var sample = Components.classes["@mozilla.org/sound;1"].createInstance(); - - sample = sample.QueryInterface(Components.interfaces.nsISound); - - try - { - sample.play( url ); - } - catch ( ex ) - { - sample.beep(); - //alert( ex ); - } -} - var gSelectAll = false; function selectAllEvents() diff --git a/calendar/resources/jar.mn b/calendar/resources/jar.mn index 41959079a2f9..3e64c33d6728 100644 --- a/calendar/resources/jar.mn +++ b/calendar/resources/jar.mn @@ -3,10 +3,12 @@ calendar.jar: content/calendar/about.xul (content/about.xul) * content/calendar/applicationUtil.js (content/applicationUtil.js) content/calendar/sunbird_small.png (content/sunbird_small.png) - content/calendar/alertDialog.js (content/alertDialog.js) - content/calendar/alertDialog.xul (content/alertDialog.xul) content/calendar/attachFile.js (content/attachFile.js) content/calendar/calendar.js (content/calendar.js) + content/calendar/calendar-alarm-dialog.xul (/calendar/base/content/calendar-alarm-dialog.xul) + content/calendar/calendar-alarm-dialog.js (/calendar/base/content/calendar-alarm-dialog.js) + content/calendar/calendar-alarm-widget.css (/calendar/base/content/calendar-alarm-widget.css) + content/calendar/calendar-alarm-widget.xml (/calendar/base/content/calendar-alarm-widget.xml) content/calendar/calendarUtils.js (content/calendarUtils.js) * content/calendar/calendar.xul (content/calendar.xul) content/calendar/calendarEvent.js (content/calendarEvent.js) @@ -98,7 +100,6 @@ calendar.jar: locale/en-US/calendar/connectionPrefs.dtd (locale/en-US/connectionPrefs.dtd) locale/en-US/calendar/prefutilities.properties (locale/en-US/prefutilities.properties) #endif - skin/classic/calendar/alertDialog.css (skin/classic/alertDialog.css) skin/classic/calendar/all_day_event.png (skin/classic/all_day_event.png) skin/classic/calendar/all_day_event_down.png (skin/classic/all_day_event_down.png) skin/classic/calendar/all_day_event_hover.png (skin/classic/all_day_event_hover.png) diff --git a/calendar/resources/locale/en-US/calendar.properties b/calendar/resources/locale/en-US/calendar.properties index 56594a74dc88..a9535785af4d 100644 --- a/calendar/resources/locale/en-US/calendar.properties +++ b/calendar/resources/locale/en-US/calendar.properties @@ -109,6 +109,7 @@ defaultPreviousWeeksInView=0 showAlarms=1 showMissed=1 playAlarmSound=0 +soundURL = chrome://content/calendar/sound.wav reloadServersOnLaunch=false defaultEventLength=60 defaultSnoozeAlarmLength=60