Author: ayoung
Date: Mon Aug 30 05:40:49 2010
New Revision: 9081
URL: http://svn.slimdevices.com/jive?rev=9081&view=rev
Log:
Add macroAction() method and set menu index to first item when selecting home
menu.
Modified:
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/MacroPlay/MacroPlayApplet.lua
Modified:
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/MacroPlay/MacroPlayApplet.lua
URL:
http://svn.slimdevices.com/jive/7.6/trunk/squeezeplay/src/squeezeplay/share/applets/MacroPlay/MacroPlayApplet.lua?rev=9081&r1=9080&r2=9081&view=diff
==============================================================================
---
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/MacroPlay/MacroPlayApplet.lua
(original)
+++
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/MacroPlay/MacroPlayApplet.lua
Mon Aug 30 05:40:49 2010
@@ -162,7 +162,7 @@
help:setValue(self:string("MACRO_AUTOSTART_COMPLETE"))
else
-- countdown to tests
- local timer = countdown or 20
+ local timer = countdown or 5
help:setValue(self:string("MACRO_AUTOSTART_HELP", timer))
window:addTimer(1000,
@@ -320,6 +320,15 @@
end
+-- dispatch ui action 'action', and delay for interval ms
+function macroAction(interval, action)
+ log:info("macroAction: ", action)
+
+ Framework:pushAction(action)
+ macroDelay(interval)
+end
+
+
-- returns the widgets of type class from the window
function _macroFindWidget(class)
local window = Framework.windowStack[1]
@@ -396,6 +405,7 @@
break
end
+ log:info("index=" .. menu:getSelectedIndex())
macroEvent(100, EVENT_SCROLL, dir)
until menu:getSelectedIndex() == index
@@ -447,6 +457,10 @@
if #Framework.windowStack > 1 then
Framework.windowStack[#Framework.windowStack - 1]:hideToTop()
end
+
+ macroDelay(50)
+ local menu = _macroFindWidget(Menu)
+ menu:setSelectedIndex(1)
macroDelay(interval)
end
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/jive-checkins