Author: bklaas
Date: Fri Apr 23 11:14:22 2010
New Revision: 8728

URL: http://svn.slimdevices.com/jive?rev=8728&view=rev
Log:
Bug: 9057
Description: pull the preview action listener into a separate clause from the 
_jive_button logic

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=8728&r1=8727&r2=8728&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
 Fri Apr 23 11:14:22 2010
@@ -2211,22 +2211,24 @@
                return EVENT_UNUSED
        end
        
+       local item = db:item(dbIndex)
+
+       -- special case: an action of "preview", which is used to preview alarm 
sounds before listening
+       if item and item.actions and item.actions.preview then
+               if evtType == ACTION then
+                       log:warn('--->Trapped what Squeezeplay thinks is an 
attempt to preview an alarm sound')
+                       local action = event:getAction()
+                       local actionName = _actionToActionName[action]
+                       if actionName == 'play' or actionName == 'more' then
+                               return _actionHandler(menu, menuItem, db, 
dbIndex, event, 'preview', item)
+                       end
+               end
+       end
+
        -- we don't want to do anything if this menu item involves an active 
decoration
        -- like a radio, checkbox, or set of choices
        -- further, we want the event to propagate to the active widget, so 
return EVENT_UNUSED
-       local item = db:item(dbIndex)
        if item and item["_jive_button"] then
-               -- special case: an action of "preview", which is used to 
preview alarm sounds before listening
-               if item and item.actions and item.actions.preview then
-                       if evtType == ACTION then
-                               log:warn('--->Trapped what Squeezeplay thinks 
is an attempt to preview an alarm sound')
-                               local action = event:getAction()
-                               local actionName = _actionToActionName[action]
-                               if actionName == 'play' or actionName == 'more' 
then
-                                       return _actionHandler(menu, menuItem, 
db, dbIndex, event, 'preview', item)
-                               end
-                       end
-               end
                return EVENT_UNUSED
        end
 

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

Reply via email to