Author: bklaas
Date: Thu Apr 29 10:21:47 2010
New Revision: 8749

URL: http://svn.slimdevices.com/jive?rev=8749&view=rev
Log:
Bug: 9057
Description: handle the alarm preview window correctly for the slimbrowse 
window step stack. this fixed a UI problem when backing out of windows after 
calling an alarm preview. I believe this is the final checkin for alarm preview 
support for Squeezeplay-based players.

Modified:
    
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/SlimBrowser/SlimBrowserApplet.lua

Modified: 
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/SlimBrowser/SlimBrowserApplet.lua
URL: 
http://svn.slimdevices.com/jive/7.5/trunk/squeezeplay/src/squeezeplay/share/applets/SlimBrowser/SlimBrowserApplet.lua?rev=8749&r1=8748&r2=8749&view=diff
==============================================================================
--- 
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/SlimBrowser/SlimBrowserApplet.lua
 (original)
+++ 
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/SlimBrowser/SlimBrowserApplet.lua
 Thu Apr 29 10:21:47 2010
@@ -1202,6 +1202,11 @@
                        _goNow(data.goNow)
                end
 
+               local useSimpleMenuOverlay = false
+               if _safeDeref(data, 'window', 'textarea') or _safeDeref(data, 
'window', 'textareaToken') then
+                       useSimpleMenuOverlay = true
+               end
+
                local setupWindow = _safeDeref(data, 'base', 'window', 
'setupWindow')
                if step.window and setupWindow then
                        step.window:setAllowScreensaver(false)
@@ -1243,7 +1248,8 @@
                        _stepSetMenuItems(step, data)
                        if _player then
                                local lastBrowseIndex = 
_player:getLastBrowseIndex(step.commandString)
-                               if lastBrowseIndex and not 
step.lastBrowseIndexUsed then
+                               -- we don't do browse history callback when 
we're using a simple menu overlay so the help text doesn't get lost
+                               if lastBrowseIndex and not 
step.lastBrowseIndexUsed and not useSimpleMenuOverlay then
                                        log:debug("Selecting  lastBrowseIndex: 
", lastBrowseIndex)
                                        
step.menu:setSelectedIndex(lastBrowseIndex)
                                        step.lastBrowseIndexUsed = true
@@ -1344,7 +1350,7 @@
                                end
 
                                -- textarea data for the window
-                               if data.window and (data.window.textarea or 
data.window.textareaToken) then
+                               if useSimpleMenuOverlay then
 
                                        if data.window.textareaToken then
                                                data.window.textarea = 
_string(data.window.textareaToken)
@@ -1986,6 +1992,12 @@
 
                                        step, sink = _emptyDestination(step)
                                        _stepLockHandler(step, function () 
_goNowPlaying(nil, true, true ) end)
+
+                               elseif actionName == 'preview' then
+                                       skipNewWindowPush = true
+
+                                       step, sink = _emptyDestination(step)
+                                       _stepLockHandler(step, function () 
_alarmPreviewWindow(iAction and iAction.title) end )
 
                                elseif nextWindow == 'playlist' then
                                        _goPlaylist(true)
@@ -2070,10 +2082,6 @@
                                        end
                                end
                        
-                               if actionName == 'preview' then
-                                       return _alarmPreviewWindow(iAction and 
iAction.title)
-                               end
-
                                return EVENT_CONSUME
                        end
                end

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

Reply via email to