Author: titmuss
Date: Fri Feb 1 12:29:02 2008
New Revision: 1739
URL: http://svn.slimdevices.com?rev=1739&root=Jive&view=rev
Log:
Bug: 6764
Description:
Make the stoppage graphics start sooner when connecting to SN, so it also
covers the playerRegister call.
Modified:
branches/7.0/jive/src/pkg/jive/share/applets/ChooseMusicSource/ChooseMusicSourceApplet.lua
Modified:
branches/7.0/jive/src/pkg/jive/share/applets/ChooseMusicSource/ChooseMusicSourceApplet.lua
URL:
http://svn.slimdevices.com/branches/7.0/jive/src/pkg/jive/share/applets/ChooseMusicSource/ChooseMusicSourceApplet.lua?rev=1739&root=Jive&r1=1738&r2=1739&view=diff
==============================================================================
---
branches/7.0/jive/src/pkg/jive/share/applets/ChooseMusicSource/ChooseMusicSourceApplet.lua
(original)
+++
branches/7.0/jive/src/pkg/jive/share/applets/ChooseMusicSource/ChooseMusicSourceApplet.lua
Fri Feb 1 12:29:02 2008
@@ -276,6 +276,38 @@
return
end
+
+ -- stoppage popup
+ local window = Popup("popupIcon")
+ window:addWidget(Icon("iconConnecting"))
+
+ local statusLabel = Label("text",
self:string("SLIMSERVER_CONNECTING_TO", server:getName()))
+ window:addWidget(statusLabel)
+
+ -- disable key presses
+ window:addListener(EVENT_KEY_PRESS,
+ function(event)
+ return EVENT_CONSUME
+ end)
+
+ local timeout = 1
+ window:addTimer(1000,
+ function()
+ -- scan all servers waiting for the player
+ self.sdApplet:discover()
+
+ -- we detect when the connect to the new server
+ -- with notify_playerNew
+
+ timeout = timeout + 1
+ if timeout == CONNECT_TIMEOUT then
+ self:_connectPlayerFailed(player,
server)
+ end
+ end)
+
+ self:tieAndShowWindow(window)
+
+
-- we are now ready to connect to SqueezeCenter
if not server:isSqueezeNetwork() then
self:_doConnectPlayer(player, server)
@@ -300,42 +332,12 @@
function _doConnectPlayer(self, player, server)
-
-- tell the player to move servers
self.waitForConnect = {
player = player,
server = server
}
player:connectToServer(server)
-
- local window = Popup("popupIcon")
- window:addWidget(Icon("iconConnecting"))
-
- local statusLabel = Label("text",
self:string("SLIMSERVER_CONNECTING_TO", server:getName()))
- window:addWidget(statusLabel)
-
- -- disable key presses
- window:addListener(EVENT_KEY_PRESS,
- function(event)
- return EVENT_CONSUME
- end)
-
- local timeout = 1
- window:addTimer(1000,
- function()
- -- scan all servers waiting for the player
- self.sdApplet:discover()
-
- -- we detect when the connect to the new server
- -- with notify_playerNew
-
- timeout = timeout + 1
- if timeout == CONNECT_TIMEOUT then
- self:_connectPlayerFailed(player,
server)
- end
- end)
-
- self:tieAndShowWindow(window)
end
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive-checkins