[open-ils-commits] r16294 - in trunk/Open-ILS/xul/staff_client: chrome/content/main server/main (phasefx)

svn at svn.open-ils.org svn at svn.open-ils.org
Sun Apr 25 23:54:07 EDT 2010


Author: phasefx
Date: 2010-04-25 23:54:04 -0400 (Sun, 25 Apr 2010)
New Revision: 16294

Modified:
   trunk/Open-ILS/xul/staff_client/chrome/content/main/menu.js
   trunk/Open-ILS/xul/staff_client/server/main/data.xul
Log:
create a sound timer/queue in menu_frame that gets inherited by child interfaces, and don't let it grab the one from data.xul

if we try to share xulG._sound from window 1 with window 2, and window 1 is destroyed, the sound object no longer works correctly (it loses reference to the 'urls' variable and cannot find the sounds to play).  May try a common sound file from data.xul later.  As it is now, sound behavior between window 1 and window 2 is slightly different with fancy prompt on my workstation.  In window 2, a sound queued before fancy prompt starts to play before the popup and then gets clipped.  In window 1, the fancy prompt sound obj takes over the queue and plays the sound without clipping

Modified: trunk/Open-ILS/xul/staff_client/chrome/content/main/menu.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/main/menu.js	2010-04-26 03:54:02 UTC (rev 16293)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/main/menu.js	2010-04-26 03:54:04 UTC (rev 16294)
@@ -10,7 +10,7 @@
     offlineStrings = document.getElementById('offlineStrings');
     JSAN.use('util.error'); this.error = new util.error();
     JSAN.use('util.window'); this.window = new util.window();
-    JSAN.use('util.sound'); this.sound = new util.sound();
+    JSAN.use('util.sound'); this.sound = new util.sound({'interval':500,'sig':'menu_constructor'});
     JSAN.use('OpenILS.data'); this.data = new OpenILS.data(); this.data.init({'via':'stash'});
 
     this.w = window;
@@ -149,6 +149,8 @@
                         'chrome,resizable'); 
                     netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
                     mframe.xulG = xulG;
+                    /* This window should get its own objects for these */
+                    delete mframe.xulG['_sound']; delete mframe.xulG['_data'];
                 }
             ],
             'cmd_new_tab' : [

Modified: trunk/Open-ILS/xul/staff_client/server/main/data.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/main/data.xul	2010-04-26 03:54:02 UTC (rev 16293)
+++ trunk/Open-ILS/xul/staff_client/server/main/data.xul	2010-04-26 03:54:04 UTC (rev 16294)
@@ -230,6 +230,7 @@
                         + '?server='+window.escape(xulG.url),
                         'main'+xulG.window.window_name_increment(),'chrome,resizable'
                     );
+                    delete xulG['_sound']; // This came from util.error but I want menu.js to have its own
                     mframe.xulG = xulG; // This is the xulG from main.js, with auth, url, and window
                 } catch(E) {
                     alert(E);



More information about the open-ils-commits mailing list