Author: titmuss
Date: Fri Feb  1 07:36:01 2008
New Revision: 1732

URL: http://svn.slimdevices.com?rev=1732&root=Jive&view=rev
Log:
Bug: 6764
Description:
Don't allow the connecting popup to open twice in SlimBrowser. Also make sure 
it's closed when disconnecting from the 
player.
Don't send the playerRegister command to SC when changing music sources.
Correctly maintain the player list in SlimServer when a player is switch to 
another server.


Modified:
    
branches/7.0/jive/src/pkg/jive/share/applets/ChooseMusicSource/ChooseMusicSourceApplet.lua
    
branches/7.0/jive/src/pkg/jive/share/applets/SlimBrowser/SlimBrowserApplet.lua
    branches/7.0/jive/src/pkg/jive/share/jive/slim/Player.lua
    branches/7.0/jive/src/pkg/jive/share/jive/slim/SlimServer.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=1732&root=Jive&r1=1731&r2=1732&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 07:36:01 2008
@@ -279,6 +279,7 @@
        -- we are now ready to connect to SqueezeCenter
        if not server:isSqueezeNetwork() then
                self:_doConnectPlayer(player, server)
+               return
        end
 
        -- make sure the player is linked on SqueezeNetwork, this may return an

Modified: 
branches/7.0/jive/src/pkg/jive/share/applets/SlimBrowser/SlimBrowserApplet.lua
URL: 
http://svn.slimdevices.com/branches/7.0/jive/src/pkg/jive/share/applets/SlimBrowser/SlimBrowserApplet.lua?rev=1732&root=Jive&r1=1731&r2=1732&view=diff
==============================================================================
--- 
branches/7.0/jive/src/pkg/jive/share/applets/SlimBrowser/SlimBrowserApplet.lua 
(original)
+++ 
branches/7.0/jive/src/pkg/jive/share/applets/SlimBrowser/SlimBrowserApplet.lua 
Fri Feb  1 07:36:01 2008
@@ -509,6 +509,11 @@
 local function _connectingToPlayer(self, player)
        log:info("_connectingToPlayer popup show")
 
+       if _connectingPopup then
+               -- don't open this popup twice
+               return
+       end
+
        local popup = Popup("popupIcon")
        local icon  = Icon("iconConnecting")
        local playerName = player:getName()
@@ -538,8 +543,18 @@
        )
        
        popup:show()
+
        _connectingPopup = popup
-
+end
+
+-- _connectedToPlayer
+-- hide the full screen popup that appears until menus are loaded
+local function _connectedToPlayer()
+       if _connectingPopup then
+               log:info("_connectingToPlayer popup hide")
+               _connectingPopup:hide()
+               _connectingPopup = nil
+       end
 end
 
 -- _bigArtworkPopup
@@ -778,10 +793,8 @@
                                jiveMain:addItem(item)
                        end
                end
-               if _menuReceived and _connectingPopup then
-                       log:info("_connectingToPlayer popup hide")
-                       _connectingPopup:hide()
-                       _connectingPopup = nil
+               if _menuReceived then
+                       _connectedToPlayer()
                end
          end
 end
@@ -2106,6 +2119,9 @@
        end
        _playerMenus = {}
 
+       -- remove connecting popup
+       _connectedToPlayer()
+
        _player = false
        _server = false
        _string = false

Modified: branches/7.0/jive/src/pkg/jive/share/jive/slim/Player.lua
URL: 
http://svn.slimdevices.com/branches/7.0/jive/src/pkg/jive/share/jive/slim/Player.lua?rev=1732&root=Jive&r1=1731&r2=1732&view=diff
==============================================================================
--- branches/7.0/jive/src/pkg/jive/share/jive/slim/Player.lua (original)
+++ branches/7.0/jive/src/pkg/jive/share/jive/slim/Player.lua Fri Feb  1 
07:36:01 2008
@@ -272,7 +272,7 @@
                -- delete from old server
                if self.slimServer then
                        log:info(self, " delete for ", self.slimServer)
-                       self.jnt:notify('playerDelete', self)
+                       self.slimServer:_deletePlayer(self)
                end
 
                -- add to new server

Modified: branches/7.0/jive/src/pkg/jive/share/jive/slim/SlimServer.lua
URL: 
http://svn.slimdevices.com/branches/7.0/jive/src/pkg/jive/share/jive/slim/SlimServer.lua?rev=1732&root=Jive&r1=1731&r2=1732&view=diff
==============================================================================
--- branches/7.0/jive/src/pkg/jive/share/jive/slim/SlimServer.lua (original)
+++ branches/7.0/jive/src/pkg/jive/share/jive/slim/SlimServer.lua Fri Feb  1 
07:36:01 2008
@@ -169,6 +169,12 @@
                self.players[k] = nil
        end
        
+end
+
+-- package private method to delete a player
+function _deletePlayer(self, player)
+       player:free(self)
+       table:delete(self.players, player:getId())
 end
 
 

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

Reply via email to