Author: adrian
Date: Sun Oct 26 07:25:27 2008
New Revision: 3214
URL: http://svn.slimdevices.com?rev=3214&root=Jive&view=rev
Log:
Bug: N/A
Description: update installation applets to match SC change 23689. This aligns
the fields used by the three applets to allow common code on SC.
Modified:
7.3/trunk/squeezeplay/src/squeezeplay/share/applets/SetupAppletInstaller/SetupAppletInstallerApplet.lua
7.3/trunk/squeezeplay/src/squeezeplay/share/applets/SetupSoundEffects/SetupSoundEffectsApplet.lua
7.3/trunk/squeezeplay/src/squeezeplay/share/applets/SetupWallpaper/SetupWallpaperApplet.lua
Modified:
7.3/trunk/squeezeplay/src/squeezeplay/share/applets/SetupAppletInstaller/SetupAppletInstallerApplet.lua
URL:
http://svn.slimdevices.com/7.3/trunk/squeezeplay/src/squeezeplay/share/applets/SetupAppletInstaller/SetupAppletInstallerApplet.lua?rev=3214&root=Jive&r1=3213&r2=3214&view=diff
==============================================================================
---
7.3/trunk/squeezeplay/src/squeezeplay/share/applets/SetupAppletInstaller/SetupAppletInstallerApplet.lua
(original)
+++
7.3/trunk/squeezeplay/src/squeezeplay/share/applets/SetupAppletInstaller/SetupAppletInstallerApplet.lua
Sun Oct 26 07:25:27 2008
@@ -20,7 +20,7 @@
=cut
--]]
-local next, pairs, type, package = next, pairs, type, package
+local next, pairs, type, package, string = next, pairs, type, package, string
local oo = require("loop.simple")
local debug = require("jive.utils.debug")
@@ -54,6 +54,8 @@
local appletManager = appletManager
local jiveMain = jiveMain
local jnt = jnt
+
+local JIVE_VERSION = jive.JIVE_VERSION
module(...)
oo.class(_M, Applet)
@@ -86,7 +88,7 @@
end
end,
false,
- { "jiveapplets" }
+ { "jiveapplets", "target:jive", "version:" ..
string.match(JIVE_VERSION, "(%d%.%d)") }
)
end
@@ -107,6 +109,8 @@
local installed = self:getSettings()
local ip, port = self.server:getIpPort()
+ local arrow = string.char(0xE2, 0x86, 0x92)
+
if data.item_loop then
for _,entry in pairs(data.item_loop) do
@@ -121,26 +125,26 @@
url = entry.url
end
- if installed[entry.applet] then
- version = installed[entry.applet] .. " > " ..
entry.version
- if entry.version > installed[entry.applet] then
- self.todownload[entry.applet] = { url =
url, ver = entry.version }
+ if installed[entry.name] then
+ version = installed[entry.name] .. arrow ..
entry.version
+ if entry.version > installed[entry.name] then
+ self.todownload[entry.name] = { url =
url, ver = entry.version }
check = true
end
else
version = entry.version
- self.todownload[entry.applet] = { url = url,
ver = entry.version }
+ self.todownload[entry.name] = { url = url, ver
= entry.version }
check = true
end
self.menu:addItem( {
- text = entry.name .. " [" .. version .. "]",
+ text = entry.title .. " [" .. version .. "]",
icon = Checkbox("checkbox",
function(object, isSelected)
if isSelected then
-
self.todownload[entry.applet] = { url = url, ver = entry.version }
+
self.todownload[entry.name] = { url = url, ver = entry.version }
else
-
self.todownload[entry.applet] = nil
+
self.todownload[entry.name] = nil
end
end,
check
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=3214&root=Jive&r1=3213&r2=3214&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 07:25:27 2008
@@ -353,27 +353,27 @@
for _,v in pairs(custom) do
menu:addItem({
weight = 10,
- text = v.name,
+ text = v.title,
icon = RadioButton("radio",
group,
function()
- local path =
Framework:findFile(PATH) .. v.file
+ local path =
Framework:findFile(PATH) .. v.name
local attr =
lfs.attributes(path)
if attr then
-
log:info("setting ", v.file, " as active sound for ", sound)
-
self:_setCustom(sound, v.file)
+
log:info("setting ", v.name, " as active sound for ", sound)
+
self:_setCustom(sound, v.name)
Framework:playSound(sound)
end
end,
- settings["_CUSTOM"]
~= nil and settings["_CUSTOM"][sound] == v.file
+ settings["_CUSTOM"]
~= nil and settings["_CUSTOM"][sound] == v.name
),
focusGained = function()
- local path =
Framework:findFile(PATH) .. v.file
+ local path =
Framework:findFile(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.file)
+
log:info("using local copy of: ", v.name)
else
-
log:info("fetching: ", v.file)
+
log:info("fetching: ", v.name)
self:_fetchFile(v.url, path, function() end)
end
end
Modified:
7.3/trunk/squeezeplay/src/squeezeplay/share/applets/SetupWallpaper/SetupWallpaperApplet.lua
URL:
http://svn.slimdevices.com/7.3/trunk/squeezeplay/src/squeezeplay/share/applets/SetupWallpaper/SetupWallpaperApplet.lua?rev=3214&root=Jive&r1=3213&r2=3214&view=diff
==============================================================================
---
7.3/trunk/squeezeplay/src/squeezeplay/share/applets/SetupWallpaper/SetupWallpaperApplet.lua
(original)
+++
7.3/trunk/squeezeplay/src/squeezeplay/share/applets/SetupWallpaper/SetupWallpaperApplet.lua
Sun Oct 26 07:25:27 2008
@@ -225,41 +225,43 @@
if data.item_loop then
for _,entry in pairs(data.item_loop) do
- log:info("server wallpaper: ", entry.name)
+ log:info("server wallpaper: ", entry.title)
self.menu:addItem(
{
weight = 50,
- text = entry.name,
+ text = entry.title,
icon = RadioButton("radio",
self.group,
function()
-
local path = Framework:findFile(PREFIX) .. entry.file
+
local path = Framework:findFile(PREFIX) .. entry.name
local attr = lfs.attributes(path)
if attr then
-
self:setBackground(entry.file, self.currentPlayerId)
+
self:setBackground(entry.name, self.currentPlayerId)
end
end,
-
wallpaper == entry.file
+
wallpaper == entry.name
),
focusGained = function()
- local
path = Framework:findFile(PREFIX) .. entry.file
+ local
path = Framework:findFile(PREFIX) .. entry.name
local
attr = lfs.attributes(path)
if
attr and os.time() - attr.modification < REFRESH_TIME then
-
log:info("using local copy of: ", entry.file)
-
self:showBackground(entry.file, self.currentPlayerId)
+
log:info("using local copy of: ", entry.name)
+
self:showBackground(entry.name, self.currentPlayerId)
else
-
log:info("fetching: ", entry.file)
local url
if entry.relurl then
url = 'http://' .. ip .. ':' .. port .. entry.relurl
else
url = entry.url
end
-
self:_fetchFile(url, path, function() self:showBackground(entry.file,
self.currentPlayerId) end)
+
self:_fetchFile(url, path, function() self:showBackground(entry.name,
self.currentPlayerId) end)
end
end
}
)
+ if wallpaper == entry.name then
+ self.menu:setSelectedIndex(self.menu:numItems()
- 1)
+ end
end
end
end
@@ -297,6 +299,8 @@
if self.fetch[path] then
log:warn("already fetching ", path, " not fetching again")
return
+ else
+ log:info("fetching ", path, " ", url)
end
self.fetch[path] = 1
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive-checkins