From 4310997f2e6f5aa16e01e02974c05ea143cda752 Mon Sep 17 00:00:00 2001 From: phasefx Date: Sat, 18 Jun 2005 05:17:57 +0000 Subject: [PATCH] sound git-svn-id: svn://svn.open-ils.org/ILS/trunk@844 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../chrome/content/evergreen/util/sound.js | 42 ++++++++++++++++++++++ .../chrome/content/evergreen/util/util.js | 32 ----------------- .../chrome/content/evergreen/util/util_overlay.xul | 3 +- .../chrome/content/evergreen/util/xpcom.js | 7 ---- 4 files changed, 44 insertions(+), 40 deletions(-) create mode 100644 Evergreen/staff_client/chrome/content/evergreen/util/sound.js diff --git a/Evergreen/staff_client/chrome/content/evergreen/util/sound.js b/Evergreen/staff_client/chrome/content/evergreen/util/sound.js new file mode 100644 index 0000000000..842764f1b8 --- /dev/null +++ b/Evergreen/staff_client/chrome/content/evergreen/util/sound.js @@ -0,0 +1,42 @@ +sdump('D_TRACE','Loading sound.js\n'); + +function xp_sound_init() { + var SOUNDContractID = "@mozilla.org/sound;1"; + var SOUNDIID = Components.interfaces.nsISound; + var SOUND = Components.classes[SOUNDContractID].createInstance(SOUNDIID); + return SOUND; +} + +function snd_bad() { + mw.G.sound.play( xp_url_init('chrome://evergreen/content/media/sounds/redalert.wav') ); +} + +function snd_really_bad() { + mw.G.sound.play( xp_url_init('chrome://evergreen/content/media/sounds/die.wav') ); +} + +function snd_good() { + mw.G.sound.play( xp_url_init('chrome://evergreen/content/media/sounds/turn.wav') ); +} + +function snd_circ_good() { + mw.G.sound.play( xp_url_init('chrome://evergreen/content/media/sounds/clicked.wav') ); +} + +function snd_circ_bad() { + mw.G.sound.play( xp_url_init('chrome://evergreen/content/media/sounds/cow.wav') ); +} + +function snd_logon() { + +} + +function snd_logoff() { + +} + +function snd_exit() { + +} + + diff --git a/Evergreen/staff_client/chrome/content/evergreen/util/util.js b/Evergreen/staff_client/chrome/content/evergreen/util/util.js index e4f94f2c57..f9c987a5d3 100644 --- a/Evergreen/staff_client/chrome/content/evergreen/util/util.js +++ b/Evergreen/staff_client/chrome/content/evergreen/util/util.js @@ -20,38 +20,6 @@ function sdump(level,msg) { } catch(E) {} } -function snd_bad() { - mw.G.sound.play( xp_url_init('chrome://evergreen/content/media/redalert.wav') ); -} - -function snd_really_bad() { - mw.G.sound.play( xp_url_init('chrome://evergreen/content/media/die.wav') ); -} - -function snd_good() { - mw.G.sound.play( xp_url_init('chrome://evergreen/content/media/turn.wav') ); -} - -function snd_circ_good() { - mw.G.sound.play( xp_url_init('chrome://evergreen/content/media/clicked.wav') ); -} - -function snd_circ_bad() { - mw.G.sound.play( xp_url_init('chrome://evergreen/content/media/cow.wav') ); -} - -function snd_logon() { - -} - -function snd_logoff() { - -} - -function snd_exit() { - -} - function handle_error(E) { var s = ''; if (instanceOf(E,ex)) { diff --git a/Evergreen/staff_client/chrome/content/evergreen/util/util_overlay.xul b/Evergreen/staff_client/chrome/content/evergreen/util/util_overlay.xul index 444f316960..ae559e6d9a 100644 --- a/Evergreen/staff_client/chrome/content/evergreen/util/util_overlay.xul +++ b/Evergreen/staff_client/chrome/content/evergreen/util/util_overlay.xul @@ -22,8 +22,9 @@