Author: bklaas
Date: Thu Mar 17 15:48:17 2011
New Revision: 9386

URL: http://svn.slimdevices.com/jive?rev=9386&view=rev
Log:
Bug: 17072
Description: add type = 'alertWindow' on displaystatus handler
see bug for details on feature

Modified:
    7.6/trunk/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua

Modified: 7.6/trunk/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua
URL: 
http://svn.slimdevices.com/jive/7.6/trunk/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua?rev=9386&r1=9385&r2=9386&view=diff
==============================================================================
--- 7.6/trunk/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua (original)
+++ 7.6/trunk/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua Thu Mar 17 
15:48:17 2011
@@ -1316,6 +1316,20 @@
        self:updateIconbar()
 end
 
+function _alertWindow(self, textValue)
+
+       local window = Window('help_list', ' ')
+       window:setAllowScreensaver(false)
+        window:showAfterScreensaver()
+       local text = Textarea("text", textValue)
+       window:addWidget(text)
+
+       local s = {}
+       s.window = window
+       self:tieWindow(window)
+       return s
+end
+
 
 -- _process_displaystatus
 -- receives the display status data
@@ -1328,6 +1342,7 @@
                local display = data.display
                local type    = display["type"] or 'text'
                local special = display and (type == 'icon' and display.style)
+               local alertWindow = display and type == 'alertWindow'
                local playMode = display["play-mode"]
                local isRemote = display["is-remote"] and (display["is-remote"] 
== 1) or false
 
@@ -1342,7 +1357,10 @@
 
                -- this showBriefly should be displayed unless there's a good 
reason not to
                local showMe = true
-               if special then
+               if alertWindow then
+                       s = self:_alertWindow(textValue)
+
+               elseif special then
                        s = self.popupIcon
                        local style = 'icon_popup_' .. special
                        s.icon:setStyle(style)  
@@ -1387,7 +1405,7 @@
                        s.textarea:setValue(textValue)
                end
                if showMe then
-                       if tonumber(duration) == -1 then
+                       if alertWindow or tonumber(duration) == -1 then
                                s.window:show()
                        else
                                s.window:showBriefly(duration, nil, 
transitionOn, transitionOff)

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

Reply via email to