Author: titmuss
Date: Fri Apr 18 04:22:41 2008
New Revision: 2271
URL: http://svn.slimdevices.com?rev=2271&root=Jive&view=rev
Log:
[EMAIL PROTECTED] (orig r2270): titmuss | 2008-04-18 12:22:15 +0100
[EMAIL PROTECTED] (orig r2266): titmuss | 2008-04-17 14:29:43 +0100
Bug: 7834
Description:
Fix setup in non-EN languages, by removing some debug code to slow down
loading languages
on the desktop. That never meant to get checked in, doh. Also hardened the
loading
language popup so keypresses can't hide the window.
[EMAIL PROTECTED] (orig r2267): titmuss | 2008-04-17 16:01:36 +0100
Bug: 6441
Description:
Fix coment unsubscriptions.
[EMAIL PROTECTED] (orig r2268): bklaas | 2008-04-17 16:37:34 +0100
Bug: 5426
Description: while connected to a player, sync to SC/SN once/hour
[EMAIL PROTECTED] (orig r2269): bklaas | 2008-04-17 21:04:04 +0100
Bug: 7261
Description: poach "updating squeezebox firmware" code from SlimBrowser
If new receiver firmware required, a fullscreen popup shows up until the
player is upgraded
Also poach string from Slimbrowser for popup
Modified:
7.2/trunk/ (props changed)
7.2/trunk/squeezeplay/src/squeezeplay/share/applets/SetupLanguage/SetupLanguageApplet.lua
7.2/trunk/squeezeplay/src/squeezeplay/share/applets/SetupSqueezebox/SetupSqueezeboxApplet.lua
7.2/trunk/squeezeplay/src/squeezeplay/share/applets/SetupSqueezebox/strings.txt
7.2/trunk/squeezeplay/src/squeezeplay/share/jive/net/Comet.lua
7.2/trunk/squeezeplay/src/squeezeplay/share/jive/utils/locale.lua
7.2/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SqueezeboxJive/SqueezeboxJiveApplet.lua
Propchange: 7.2/trunk/
------------------------------------------------------------------------------
--- svk:merge (original)
+++ svk:merge Fri Apr 18 04:22:41 2008
@@ -1,5 +1,5 @@
-bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.0/trunk:2246
-bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.1/trunk:2262
+bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.0/trunk:2269
+bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.1/trunk:2270
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/7.0:2013
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/SN:1083
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/scrolling:1378
Modified:
7.2/trunk/squeezeplay/src/squeezeplay/share/applets/SetupLanguage/SetupLanguageApplet.lua
URL:
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay/share/applets/SetupLanguage/SetupLanguageApplet.lua?rev=2271&root=Jive&r1=2270&r2=2271&view=diff
==============================================================================
---
7.2/trunk/squeezeplay/src/squeezeplay/share/applets/SetupLanguage/SetupLanguageApplet.lua
(original)
+++
7.2/trunk/squeezeplay/src/squeezeplay/share/applets/SetupLanguage/SetupLanguageApplet.lua
Fri Apr 18 04:22:41 2008
@@ -41,6 +41,7 @@
local debug = require("jive.utils.debug")
local appletManager = appletManager
+local EVENT_ALL_INPUT = jive.ui.EVENT_ALL_INPUT
local EVENT_KEY_PRESS = jive.ui.EVENT_KEY_PRESS
local EVENT_SCROLL = jive.ui.EVENT_SCROLL
local EVENT_CONSUME = jive.ui.EVENT_CONSUME
@@ -184,11 +185,22 @@
-- changing the locale is slow, do this in a task with a spinny
self.popup = Popup("popupIcon")
self.popup:setAllowScreensaver(false)
+ self.popup:setAlwaysOnTop(true)
+ self.popup:setAutoHide(false)
+
self.popup:addWidget(Icon("iconConnecting"))
local stringChoice = "LOADING_LANGUAGE"
self.popup:addWidget(Label("text", self:string(stringChoice)))
- self.popup:show()
-
+ self.popup:show()
+
+ -- no way to exit this popup
+ local listener =
+ Framework:addListener(EVENT_ALL_INPUT,
+ function()
+ return EVENT_CONSUME
+ end,
+ true)
+
self.task = Task('setLang', self,
function(self)
locale:setLocale(choice, true)
@@ -197,6 +209,7 @@
jiveMain:jiveMainNodes()
Framework:styleChanged()
+ Framework:removeListener(listener)
self.popup:hide()
if next then
Modified:
7.2/trunk/squeezeplay/src/squeezeplay/share/applets/SetupSqueezebox/SetupSqueezeboxApplet.lua
URL:
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay/share/applets/SetupSqueezebox/SetupSqueezeboxApplet.lua?rev=2271&root=Jive&r1=2270&r2=2271&view=diff
==============================================================================
---
7.2/trunk/squeezeplay/src/squeezeplay/share/applets/SetupSqueezebox/SetupSqueezeboxApplet.lua
(original)
+++
7.2/trunk/squeezeplay/src/squeezeplay/share/applets/SetupSqueezebox/SetupSqueezeboxApplet.lua
Fri Apr 18 04:22:41 2008
@@ -43,10 +43,62 @@
local setupsqueezeboxTitleStyle = 'settingstitle'
local SETUP_TIMEOUT = 45 -- 45 second timeout for each action
local SETUP_EXTENDED_TIMEOUT = 180 -- 180 second timeout in case Squeezebox
is upgrading after first connecting to SC
+local _updatingPlayerPopup = false
module(...)
oo.class(_M, Applet)
+-- _updatingPlayer
+-- full screen popup that appears while player is getting fw update
+local function _updatingPlayer(self)
+ log:info("_updating popup show")
+
+ if _updatingPlayerPopup then
+ -- don't open this popup twice
+ return
+ end
+
+ local popup = Popup("popupIcon")
+ local icon = Icon("iconConnecting")
+ local label = Label("text",
self:string('SQUEEZEBOX_UPDATING_FIRMWARE_SQUEEZEBOX'))
+ popup:addWidget(icon)
+ popup:addWidget(label)
+ popup:setAlwaysOnTop(true)
+
+ -- add a listener for KEY_PRESS that disconnects from the player and
returns to home
+ popup:addListener(
+ EVENT_KEY_PRESS | EVENT_KEY_HOLD,
+ function(event)
+ local evtCode = event:getKeycode()
+
+ if evtCode == KEY_BACK then
+ -- disconnect from player and go home
+ local manager =
AppletManager:getAppletInstance("SlimDiscovery")
+ if manager then
+ manager:setCurrentPlayer(nil)
+ end
+ popup:hide()
+ end
+ -- other keys are disabled when this popup is on screen
+ return EVENT_CONSUME
+
+ end
+ )
+
+ popup:show()
+
+ _updatingPlayerPopup = popup
+end
+
+-- _hidePlayerUpdating
+-- hide the full screen popup that appears until player is updated
+local function _hidePlayerUpdating()
+ if _updatingPlayerPopup then
+ log:info("_updatingPlayer popup hide")
+ _updatingPlayerPopup:hide()
+ _updatingPlayerPopup = false
+ end
+end
function init(self)
self.data1 = {}
@@ -1306,7 +1358,11 @@
-- needed in case the set slimserver udap packets got
lost
_setAction(self, t_waitSlimserver)
self._totalTimeout = SETUP_EXTENDED_TIMEOUT
+
+ _updatingPlayer(self)
return
+ else
+ _hidePlayerUpdating()
end
-- player is connected to slimserver, set as current player
Modified:
7.2/trunk/squeezeplay/src/squeezeplay/share/applets/SetupSqueezebox/strings.txt
URL:
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay/share/applets/SetupSqueezebox/strings.txt?rev=2271&root=Jive&r1=2270&r2=2271&view=diff
==============================================================================
---
7.2/trunk/squeezeplay/src/squeezeplay/share/applets/SetupSqueezebox/strings.txt
(original)
+++
7.2/trunk/squeezeplay/src/squeezeplay/share/applets/SetupSqueezebox/strings.txt
Fri Apr 18 04:22:41 2008
@@ -213,3 +213,11 @@
IT Squeezebox %s
NL Squeezebox %s
+SQUEEZEBOX_UPDATING_FIRMWARE_SQUEEZEBOX
+ DE Squeezebox-Firmware wird aktualisiert
+ EN Updating Squeezebox firmware
+ ES Actualizando firmware de Squeezebox
+ FR Mise à jour du micrologiciel Squeezebox
+ IT Aggiornamento firmware Squeezebox
+ NL Squeezebox-firmware wordt bijgewerkt
+
Modified: 7.2/trunk/squeezeplay/src/squeezeplay/share/jive/net/Comet.lua
URL:
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay/share/jive/net/Comet.lua?rev=2271&root=Jive&r1=2270&r2=2271&view=diff
==============================================================================
--- 7.2/trunk/squeezeplay/src/squeezeplay/share/jive/net/Comet.lua (original)
+++ 7.2/trunk/squeezeplay/src/squeezeplay/share/jive/net/Comet.lua Fri Apr 18
04:22:41 2008
@@ -271,8 +271,8 @@
},
}
- table.insert( data, sub )
- table.insert( self.sent_reqs, sub )
+ table.insert( data, unsub )
+ table.insert( self.sent_reqs, unsub )
end
-- Clear out pending requests
Modified: 7.2/trunk/squeezeplay/src/squeezeplay/share/jive/utils/locale.lua
URL:
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay/share/jive/utils/locale.lua?rev=2271&root=Jive&r1=2270&r2=2271&view=diff
==============================================================================
--- 7.2/trunk/squeezeplay/src/squeezeplay/share/jive/utils/locale.lua (original)
+++ 7.2/trunk/squeezeplay/src/squeezeplay/share/jive/utils/locale.lua Fri Apr
18 04:22:41 2008
@@ -56,7 +56,6 @@
globalLocale = newLocale or "EN"
readGlobalStringsFile(self)
-for i=1,100 do
-- reload existing strings files
for k, v in pairs(loadedFiles) do
if doYield then
@@ -64,7 +63,6 @@
end
_parseStringsFile(self, newLocale, k, v)
end
-end
end
Modified:
7.2/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SqueezeboxJive/SqueezeboxJiveApplet.lua
URL:
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SqueezeboxJive/SqueezeboxJiveApplet.lua?rev=2271&root=Jive&r1=2270&r2=2271&view=diff
==============================================================================
---
7.2/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SqueezeboxJive/SqueezeboxJiveApplet.lua
(original)
+++
7.2/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SqueezeboxJive/SqueezeboxJiveApplet.lua
Fri Apr 18 04:22:41 2008
@@ -282,23 +282,44 @@
function notify_playerCurrent(self, player)
+ local server
+ if player then
+ self.player = player
+ self.server = player:getSlimServer()
+ else
+ return
+ end
+
+ if self.clockTimer then
+ self.clockTimer:stop()
+ end
+
local sink = function(chunk, err)
if err then
log:warn(err)
return
end
- self:setDate(chunk.data.date)
-
- -- FIXME schedule updates from server
- end
-
- if player then
- player.slimServer.comet:request(sink,
- player:getId(),
- { 'date' }
- )
- end
+ self:setDate(chunk.data.date)
+ end
+
+ self.server.comet:request(sink,
+ player:getId(),
+ { 'date' }
+ )
+
+ -- start a recurring timer for synching to SC/SN
+ self.clockTimer = Timer(6000000, -- 1 hour
+ function()
+ if self.player and self.server then
+ self.server.comet:request(sink,
+ self.player:getId(),
+ { 'date' }
+ )
+ end
+ end,
+ false)
+ self.clockTimer:start()
end
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive-checkins