Author: titmuss
Date: Fri Feb  1 13:56:59 2008
New Revision: 1753

URL: http://svn.slimdevices.com?rev=1753&root=Jive&view=rev
Log:
 [EMAIL PROTECTED] (orig r1739):  titmuss | 2008-02-01 20:29:02 +0000
 Bug: 6764
 Description:
 Make the stoppage graphics start sooner when connecting to SN, so it also 
covers the playerRegister call.
 
 

Modified:
    trunk/   (props changed)
    
trunk/jive/src/pkg/jive/share/applets/ChooseMusicSource/ChooseMusicSourceApplet.lua

Propchange: trunk/
------------------------------------------------------------------------------
--- svk:merge (original)
+++ svk:merge Fri Feb  1 13:56:59 2008
@@ -1,3 +1,3 @@
-bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/7.0:1738
+bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/7.0:1739
 bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/SN:1083
 bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/scrolling:1378

Modified: 
trunk/jive/src/pkg/jive/share/applets/ChooseMusicSource/ChooseMusicSourceApplet.lua
URL: 
http://svn.slimdevices.com/trunk/jive/src/pkg/jive/share/applets/ChooseMusicSource/ChooseMusicSourceApplet.lua?rev=1753&root=Jive&r1=1752&r2=1753&view=diff
==============================================================================
--- 
trunk/jive/src/pkg/jive/share/applets/ChooseMusicSource/ChooseMusicSourceApplet.lua
 (original)
+++ 
trunk/jive/src/pkg/jive/share/applets/ChooseMusicSource/ChooseMusicSourceApplet.lua
 Fri Feb  1 13:56:59 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

Reply via email to