Author: adrian
Date: Sun Oct 26 15:23:46 2008
New Revision: 3219

URL: http://svn.slimdevices.com?rev=3219&root=Jive&view=rev
Log:
Bug: N/A
Desciption: make applet work on windows

Modified:
    
7.3/trunk/squeezeplay/src/squeezeplay/share/applets/SetupSoundEffects/SetupSoundEffectsApplet.lua

Modified: 
7.3/trunk/squeezeplay/src/squeezeplay/share/applets/SetupSoundEffects/SetupSoundEffectsApplet.lua
URL: 
http://svn.slimdevices.com/7.3/trunk/squeezeplay/src/squeezeplay/share/applets/SetupSoundEffects/SetupSoundEffectsApplet.lua?rev=3219&root=Jive&r1=3218&r2=3219&view=diff
==============================================================================
--- 
7.3/trunk/squeezeplay/src/squeezeplay/share/applets/SetupSoundEffects/SetupSoundEffectsApplet.lua
 (original)
+++ 
7.3/trunk/squeezeplay/src/squeezeplay/share/applets/SetupSoundEffects/SetupSoundEffectsApplet.lua
 Sun Oct 26 15:23:46 2008
@@ -18,7 +18,7 @@
 
 
 -- stuff we use
-local ipairs, pairs, tostring = ipairs, pairs, tostring
+local ipairs, pairs, tostring, string = ipairs, pairs, tostring, string
 
 local table           = require("table")
 
@@ -61,8 +61,8 @@
 module(...)
 oo.class(_M, Applet)
 
-
-local PATH = "applets/SetupSoundEffects/sounds/"
+local path = 
string.match(Framework:findFile("applets/SetupSoundEffects/sounds/bump.wav"), 
"(.*)bump.wav")
+log:info("path: ", path)
 
 local REFRESH_TIME = 300
 
@@ -357,7 +357,7 @@
                        icon = RadioButton("radio",
                                                           group,
                                                           function()
-                                                                  local path = 
Framework:findFile(PATH) .. v.name
+                                                                  local path = 
path .. v.name
                                                                   local attr = 
lfs.attributes(path)
                                                                   if attr then
                                                                           
log:info("setting ", v.name, " as active sound for ", sound)
@@ -368,7 +368,7 @@
                                                           settings["_CUSTOM"] 
~= nil and settings["_CUSTOM"][sound] == v.name
                                                   ),
                        focusGained = function()
-                                                         local path = 
Framework:findFile(PATH) .. v.name
+                                                         local path = path .. 
v.name
                                                          local attr = 
lfs.attributes(path)
                                                          if attr and os.time() 
- attr.modification < REFRESH_TIME then
                                                                  
log:info("using local copy of: ", v.name)
@@ -453,7 +453,7 @@
        for k,v in pairs(sounds) do
                if sound == nil or sound == k then
                        local file = settings["_CUSTOM"] and 
settings["_CUSTOM"][k] or sounds[k]["default"]
-                       Framework:loadSound(k, PATH .. file, sounds[k]["chan"])
+                       Framework:loadSound(k,path .. file, sounds[k]["chan"])
 
                        local enabled = settings[k]
                        if enabled == nil then

_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive-checkins

Reply via email to