Author: bklaas
Date: Mon Mar  1 13:05:44 2010
New Revision: 8609

URL: http://svn.slimdevices.com/jive?rev=8609&view=rev
Log:
Bug: 12013
Description: skip menu lock treatment when it is not applicable, e.g., when 
touching on a callback that isn't in a menu like the title bar

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=8609&r1=8608&r2=8609&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
 Mon Mar  1 13:05:44 2010
@@ -379,13 +379,13 @@
 end
 
 
-local function _stepLockHandler(step, loadedCallback)
+local function _stepLockHandler(step, loadedCallback, skipMenuLock)
        if not step then
                return
        end
 
        local currentStep = _getCurrentStep()
-       if currentStep and currentStep.menu then
+       if currentStep and currentStep.menu and not skipMenuLock then
                currentStep.menu:lock(
                        function()
                                step.cancelled = true
@@ -410,11 +410,17 @@
 end
 
 
-local function _pushToNewWindow(step)
-       _stepLockHandler(step,  function()
-                                       _pushStep(step)
-                                       step.window:show()
-                               end)
+-- skipMenuLock is given as true when no lock treatment is needed on the menu 
+-- (e.g., for when _pushToWindow is being used outside a menu like in titlebar 
CM touch button)
+local function _pushToNewWindow(step, skipMenuLock)
+       _stepLockHandler(
+               step,  
+               function()
+                       _pushStep(step)
+                       step.window:show()
+               end, 
+               skipMenuLock
+       )
 end
 
 
@@ -2512,7 +2518,7 @@
                                                        if step.menu then
                                                                from, qty = 
_decideFirstChunk(step, containerContextMenu)
                                                        end
-                                                       _pushToNewWindow(step)
+                                                       _pushToNewWindow(step, 
true)
                                                        
_performJSONAction(containerContextMenu, from, qty, step, sink, _)
                                                end
                                        ),

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

Reply via email to