Author: bklaas
Date: Fri Nov 14 12:46:48 2008
New Revision: 3377

URL: http://svn.slimdevices.com?rev=3377&root=Jive&view=rev
Log:
Bug: 9626
Description: add popup window for 5 seconds during player scan, only during 
setup
poach "Searching..." string from SC for popup. String should be improved for 
7.3.1

Modified:
    
7.3/trunk/squeezeplay/src/squeezeplay/share/applets/SelectPlayer/SelectPlayerApplet.lua
    7.3/trunk/squeezeplay/src/squeezeplay/share/applets/SelectPlayer/strings.txt

Modified: 
7.3/trunk/squeezeplay/src/squeezeplay/share/applets/SelectPlayer/SelectPlayerApplet.lua
URL: 
http://svn.slimdevices.com/7.3/trunk/squeezeplay/src/squeezeplay/share/applets/SelectPlayer/SelectPlayerApplet.lua?rev=3377&root=Jive&r1=3376&r2=3377&view=diff
==============================================================================
--- 
7.3/trunk/squeezeplay/src/squeezeplay/share/applets/SelectPlayer/SelectPlayerApplet.lua
 (original)
+++ 
7.3/trunk/squeezeplay/src/squeezeplay/share/applets/SelectPlayer/SelectPlayerApplet.lua
 Fri Nov 14 12:46:48 2008
@@ -28,6 +28,7 @@
 local RadioGroup         = require("jive.ui.RadioGroup")
 local RadioButton        = require("jive.ui.RadioButton")
 local Window             = require("jive.ui.Window")
+local Popup              = require("jive.ui.Popup")
 local Group              = require("jive.ui.Group")
 local Icon               = require("jive.ui.Icon")
 local Label              = require("jive.ui.Label")
@@ -333,7 +334,10 @@
 
        window:addWidget(menu)
 
-       window:addTimer(5000, function() self:_scan() end)
+       window:addTimer(5000, function() 
+                               self:_scan() 
+                               self:_hidePopulatingPlayersPopup()
+                       end)
 
 
        window:addListener(EVENT_WINDOW_ACTIVE,
@@ -342,9 +346,55 @@
                           end)
 
        self:tieAndShowWindow(window)
+
+       if self.setupMode then
+               self.populatingPlayers = self:_showPopulatingPlayersPopup()
+       end
+
        return window
 end
 
+function _hidePopulatingPlayersPopup(self, timer)
+
+       if self.populatingPlayers then
+               self.populatingPlayers:hide()
+               self.populatingPlayers = false
+       end
+
+end
+
+function _showPopulatingPlayersPopup(self, timer)
+
+        if self.populatingPlayers then
+                -- don't open this popup twice or when firmware update windows 
are on screen
+                return
+        end
+
+        local popup = Popup("popupIcon")
+        local icon  = Icon("iconConnecting")
+        local label = Label("text", self:string("SEARCHING"))
+        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
+                                popup:hide()
+                        end
+                        -- other keys are disabled when this popup is on screen
+                        return EVENT_CONSUME
+                end
+        )
+
+        popup:show()
+       return popup
+
+end
 
 function _scan(self)
        -- SqueezeCenter and player discovery

Modified: 
7.3/trunk/squeezeplay/src/squeezeplay/share/applets/SelectPlayer/strings.txt
URL: 
http://svn.slimdevices.com/7.3/trunk/squeezeplay/src/squeezeplay/share/applets/SelectPlayer/strings.txt?rev=3377&root=Jive&r1=3376&r2=3377&view=diff
==============================================================================
--- 
7.3/trunk/squeezeplay/src/squeezeplay/share/applets/SelectPlayer/strings.txt 
(original)
+++ 
7.3/trunk/squeezeplay/src/squeezeplay/share/applets/SelectPlayer/strings.txt 
Fri Nov 14 12:46:48 2008
@@ -59,3 +59,15 @@
 THIS_PLAYER
        EN      This Player
 
+SEARCHING
+       DA      Søger...
+       DE      Suchvorgang läuft ...
+       EN      Searching...
+       ES      Buscando...
+       FI      Etsitään...
+       FR      Recherche en cours...
+       IT      Ricerca in corso...
+       NL      Bezig met zoeken...
+       NO      Søker...
+       SV      Söker ...
+

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

Reply via email to