Author: mherger
Date: Tue Feb 23 02:34:51 2010
New Revision: 8552

URL: http://svn.slimdevices.com/jive?rev=8552&view=rev
Log:
Bug: 15753
Description: use System:findFile() to expand our partial file paths into valid 
absolute paths. 

Ben - this should be working with all three of your scenarios. I tested setting 
them manually in the SetupWallpaper.lua settings file.

Modified:
    
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/SetupWallpaper/SetupWallpaperApplet.lua

Modified: 
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/SetupWallpaper/SetupWallpaperApplet.lua
URL: 
http://svn.slimdevices.com/jive/7.5/trunk/squeezeplay/src/squeezeplay/share/applets/SetupWallpaper/SetupWallpaperApplet.lua?rev=8552&r1=8551&r2=8552&view=diff
==============================================================================
--- 
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/SetupWallpaper/SetupWallpaperApplet.lua
 (original)
+++ 
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/SetupWallpaper/SetupWallpaperApplet.lua
 Tue Feb 23 02:34:51 2010
@@ -380,22 +380,33 @@
        self.currentWallpaper = wallpaper
 
        local srf
+       
        if wallpaper and self.download[wallpaper] then
                -- image in download cache
                if self.download[wallpaper] ~= "fetch" and self.download[url] 
~= "fetchset" then
                        local data = self.download[wallpaper]
                        srf = Tile:loadImageData(data, #data)
                end
+
        elseif wallpaper and string.match(wallpaper, "http://(.*)") then
                -- saved remote image for this player
                srf = Tile:loadImage(downloadPrefix .. playerId:gsub(":", "-"))
-       elseif wallpaper and string.match(wallpaper, "/") then
-               -- saved image from imageviewer
-               srf = Tile:loadImage(wallpaper)
+               
+
        elseif wallpaper then
-               -- try firmware wallpaper
-               srf = Tile:loadImage(firmwarePrefix .. wallpaper)
-       end
+               if not string.match(wallpaper, "/") then
+                       -- try firmware wallpaper
+                       wallpaper = firmwarePrefix .. wallpaper
+               end
+
+               -- get the absolute file path for whatever we have
+               wallpaper = System:findFile(wallpaper)
+               if wallpaper ~= nil then 
+                       -- saved image from imageviewer
+                       srf = Tile:loadImage(wallpaper)
+               end
+       end
+
        if srf ~= nil then
                Framework:setBackground(srf)
        end

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

Reply via email to