Author: bklaas
Date: Wed Apr 13 14:00:50 2011
New Revision: 9420
URL: http://svn.slimdevices.com/jive?rev=9420&view=rev
Log:
Bug: 17072
Description: support for title in alertWindow showBriefly block
support for not stacking alertWindow windows that have the same text to display
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=9420&r1=9419&r2=9420&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 Wed Apr 13
14:00:50 2011
@@ -1316,18 +1316,29 @@
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
+function _alertWindow(self, title, textValue)
+
+ local showMe = true
+ local currentWindow = Window:getTopNonTransientWindow()
+ if currentWindow and currentWindow:getWindowId() == textValue then
+ showMe = false
+ end
+
+ if showMe then
+ local window = Window('help_list', title)
+ window:setAllowScreensaver(false)
+ window:showAfterScreensaver()
+ local text = Textarea("text", textValue)
+ window:setWindowId(textValue)
+ window:addWidget(text)
+
+ local s = {}
+ s.window = window
+ self:tieWindow(window)
+ return s
+ else
+ return nil
+ end
end
@@ -1358,7 +1369,11 @@
-- this showBriefly should be displayed unless there's a good
reason not to
local showMe = true
if alertWindow then
- s = self:_alertWindow(textValue)
+ local title = display['title'] or ''
+ s = self:_alertWindow(title, textValue)
+ if not s then
+ showMe = false
+ end
elseif special then
s = self.popupIcon
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/jive-checkins