Author: titmuss
Date: Wed Apr 30 06:10:26 2008
New Revision: 2401

URL: http://svn.slimdevices.com?rev=2401&root=Jive&view=rev
Log:
 [EMAIL PROTECTED] (orig r2384):  titmuss | 2008-04-29 10:35:20 +0100
 Bug: N/A
 Description:
 Improve smoke tests. Add macros to select menu items by index and by text 
pattern, 
 these macros make the tests more robust.
 
 
 [EMAIL PROTECTED] (orig r2385):  titmuss | 2008-04-29 11:34:42 +0100
 Bug: N/A
 Description:
 Harden the smoke test macros.
 
 
 [EMAIL PROTECTED] (orig r2386):  titmuss | 2008-04-29 13:53:32 +0100
 Bug: N/A
 Description:
 Macro bug fixes.
 
 
 [EMAIL PROTECTED] (orig r2387):  titmuss | 2008-04-29 14:02:03 +0100
 Bug: N/A
 Description:
 Added a new layer LAYER_LOWER that is used for drawing all widgets under 
transparent 
 windows. This allows the macro tests to capture screenshots without the 
transparency, 
 allowing more reliable image comparision.
 
 
 [EMAIL PROTECTED] (orig r2388):  titmuss | 2008-04-29 14:21:28 +0100
 Bug: N/A
 Description:
 Updated screenshots for smoke tests without transparency.
 
 
 [EMAIL PROTECTED] (orig r2389):  titmuss | 2008-04-29 14:46:59 +0100
 Bug: N/A
 Description:
 Added macro function for doing text input.
 Added macro function that allows macro parameters to be fetched from the 
Macros.lua file.
 
 
 [EMAIL PROTECTED] (orig r2390):  titmuss | 2008-04-29 16:57:51 +0100
 Bug: N/A
 Description:
 Added macro for testing WPA setup.
 
 
 [EMAIL PROTECTED] (orig r2391):  titmuss | 2008-04-29 16:58:17 +0100
 Bug: N/A
 Description:
 Keep files in root during upgrades (for example ssh key files).
 
 
 [EMAIL PROTECTED] (orig r2392):  titmuss | 2008-04-29 22:16:54 +0100
 Bug: N/A
 Description:
 Minor bug fixes and timing fixes in the macro scripts.
 Added reference screenshots for setup mode.
 
 
 [EMAIL PROTECTED] (orig r2393):  bklaas | 2008-04-30 03:25:59 +0100
 Description: put the simple demo applet "Doomsday" in a specialProjects folder 
under squeezeplay
 this is the applet used for instruction in 
http://mwiki.slimdevices.com/index.php/SqueezePlay_Applet_Guide
 [EMAIL PROTECTED] (orig r2394):  titmuss | 2008-04-30 12:06:19 +0100
 Bug: N/A
 Description:
 The firmware upgrade message always said an upgrade was available if the 
current firmware version 
 was not equal to the version on the server. If you upgraded using an SD card 
to a newer version, 
 this message was wrong. Now only display the upgrade message if the version on 
the server is 
 newer.
 
 
 [EMAIL PROTECTED] (orig r2396):  titmuss | 2008-04-30 12:19:45 +0100
 Bug: N/A
 Description:
 Fix regex.
 
 
 [EMAIL PROTECTED] (orig r2397):  titmuss | 2008-04-30 14:03:13 +0100
 Bug: 6975
 Description:
 Rename /etc/jive.version to /etc/squeezeos.version.
 
 
 [EMAIL PROTECTED] (orig r2398):  titmuss | 2008-04-30 14:04:29 +0100
 Bug: 6975
 Description:
 Rename /etc/jive.version to /etc/squeezeos.version.
 
 
 [EMAIL PROTECTED] (orig r2399):  titmuss | 2008-04-30 14:06:41 +0100
 Bug: N/A
 Description:
 Cancel all outstanding requests when disconnecting on Comet. This fixes 
firmware downgrading from 
 7.0.1 to 7.0.
 
 
 [EMAIL PROTECTED] (orig r2400):  titmuss | 2008-04-30 14:07:34 +0100
  [EMAIL PROTECTED] (orig r2395):  titmuss | 2008-04-30 12:10:59 +0100
  Bug: N/A
  Description:
  Missing full stop.
  
 

Added:
    7.2/trunk/squeezeplay/src/squeezeplay.version
    7.2/trunk/squeezeplay/src/squeezeplay/specialProjects/
    7.2/trunk/squeezeplay/src/squeezeplay/specialProjects/Doomsday/
    
7.2/trunk/squeezeplay/src/squeezeplay/specialProjects/Doomsday/DoomsdayApplet.lua
    
7.2/trunk/squeezeplay/src/squeezeplay/specialProjects/Doomsday/DoomsdayMeta.lua
    7.2/trunk/squeezeplay/src/squeezeplay/specialProjects/Doomsday/settings.lua
    7.2/trunk/squeezeplay/src/squeezeplay/specialProjects/Doomsday/strings.txt  
 (with props)
    7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/ChooseLanguage.bmp   
(with props)
    7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/ChoosePlayer.bmp   
(with props)
    7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/Continue.bmp   (with 
props)
    7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/SetupWPAMacro.lua
    7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/Welcome.bmp   (with 
props)
    7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/WirelessNetworks.bmp  
 (with props)
    7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/WirelessPassword.bmp  
 (with props)
    7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/WirelessRegion.bmp   
(with props)
Removed:
    7.2/trunk/squeezeplay/src/jive.version
Modified:
    7.2/trunk/   (props changed)
    7.2/trunk/squeezeos/src/Makefile
    7.2/trunk/squeezeos/src/system/filesystem/etc/keep-after-upgrade
    7.2/trunk/squeezeos/src/system/filesystem/linuxrc
    7.2/trunk/squeezeplay/src/squeezeplay/Makefile.am
    7.2/trunk/squeezeplay/src/squeezeplay/Makefile.in
    
7.2/trunk/squeezeplay/src/squeezeplay/share/applets/MacroPlay/MacroPlayApplet.lua
    7.2/trunk/squeezeplay/src/squeezeplay/share/applets/SlimBrowser/strings.txt
    7.2/trunk/squeezeplay/src/squeezeplay/share/jive/net/Comet.lua
    7.2/trunk/squeezeplay/src/squeezeplay/share/jive/ui/Window.lua
    7.2/trunk/squeezeplay/src/squeezeplay/src/ui/jive.h
    7.2/trunk/squeezeplay/src/squeezeplay/src/ui/jive_window.c
    7.2/trunk/squeezeplay/src/squeezeplay/src/ui/lua_jiveui.c
    7.2/trunk/squeezeplay/src/squeezeplay/src/ui/lua_jiveui.pkg
    
7.2/trunk/squeezeplay/src/squeezeplay_jive/share/applets/AboutJive/AboutJiveApplet.lua
    
7.2/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SetupFirmwareUpgrade/SetupFirmwareUpgradeApplet.lua
    7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/CopyingUpdate.bmp
    7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/FactoryReset2.bmp
    7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/FactoryResetMacro.lua
    7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/ForcedUpgradeMacro.lua
    7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/HomeMenu.bmp
    7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/HomeMenuMacro.lua
    7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/Macros.lua
    7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/PlaymodeMacro.lua
    7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/PlaymodePause.bmp
    7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/PlaymodePlay.bmp
    7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/PlaymodeStop.bmp
    7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/SoftwareUpdate.bmp
    
7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/SoftwareUpgradeMacro.lua

Propchange: 7.2/trunk/
------------------------------------------------------------------------------
--- svk:merge (original)
+++ svk:merge Wed Apr 30 06:10:26 2008
@@ -1,5 +1,5 @@
-bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.0/trunk:2354
-bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.1/trunk:2360
+bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.0/trunk:2395
+bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.1/trunk:2400
 bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/7.0:2013
 bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/SN:1083
 bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/scrolling:1378

Modified: 7.2/trunk/squeezeos/src/Makefile
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeos/src/Makefile?rev=2401&root=Jive&r1=2400&r2=2401&view=diff
==============================================================================
--- 7.2/trunk/squeezeos/src/Makefile (original)
+++ 7.2/trunk/squeezeos/src/Makefile Wed Apr 30 06:10:26 2008
@@ -54,8 +54,8 @@
 #
 image: ${IMAGEDIR}
        # Bump version number
-       scripts/mkversion > ${BUILDDIR}/etc/jive.version
-       cp ${BUILDDIR}/etc/jive.version ${IMAGEDIR}/jive.version
+       scripts/mkversion > ${BUILDDIR}/etc/squeezeos.version
+       cp ${BUILDDIR}/etc/squeezeos.version ${IMAGEDIR}/jive.version
        # Copy files for cramfs
        -rm -rf ${STAGE}
        mkdir -p ${STAGE}

Modified: 7.2/trunk/squeezeos/src/system/filesystem/etc/keep-after-upgrade
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeos/src/system/filesystem/etc/keep-after-upgrade?rev=2401&root=Jive&r1=2400&r2=2401&view=diff
==============================================================================
--- 7.2/trunk/squeezeos/src/system/filesystem/etc/keep-after-upgrade (original)
+++ 7.2/trunk/squeezeos/src/system/filesystem/etc/keep-after-upgrade Wed Apr 30 
06:10:26 2008
@@ -1,3 +1,4 @@
 # Files matching the following pattern are preserved after an SqueezeOS upgrade
 /settings.lua$
 /etc/
+/root/

Modified: 7.2/trunk/squeezeos/src/system/filesystem/linuxrc
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeos/src/system/filesystem/linuxrc?rev=2401&root=Jive&r1=2400&r2=2401&view=diff
==============================================================================
--- 7.2/trunk/squeezeos/src/system/filesystem/linuxrc (original)
+++ 7.2/trunk/squeezeos/src/system/filesystem/linuxrc Wed Apr 30 06:10:26 2008
@@ -27,7 +27,7 @@
        /bin/mount -t jffs2 -o noatime /dev/mtdblock/2 /mnt/storage
 else
        # Upgraded?
-       /usr/bin/diff -N /etc/jive.version /mnt/storage/etc/jive.version > 
/dev/null 2> /dev/null
+       /usr/bin/diff -N /etc/squeezeos.version 
/mnt/storage/etc/squeezeos.version > /dev/null 2> /dev/null
        if [ $? -ne 0 ]
        then
                # Remove modified files
@@ -35,7 +35,7 @@
                /usr/bin/find /mnt/storage/ -type f | /bin/grep -v -f 
/etc/keep-after-upgrade | /usr/bin/xargs /bin/rm -f
        fi
 
-       cp /etc/jive.version /mnt/storage/etc/jive.version
+       cp /etc/squeezeos.version /mnt/storage/etc/squeezeos.version
 fi
 
 # Mount overlay filesystem

Added: 7.2/trunk/squeezeplay/src/squeezeplay.version
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay.version?rev=2401&root=Jive&view=auto
==============================================================================
--- 7.2/trunk/squeezeplay/src/squeezeplay.version (added)
+++ 7.2/trunk/squeezeplay/src/squeezeplay.version Wed Apr 30 06:10:26 2008
@@ -1,0 +1,1 @@
+7.1

Modified: 7.2/trunk/squeezeplay/src/squeezeplay/Makefile.am
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay/Makefile.am?rev=2401&root=Jive&r1=2400&r2=2401&view=diff
==============================================================================
--- 7.2/trunk/squeezeplay/src/squeezeplay/Makefile.am (original)
+++ 7.2/trunk/squeezeplay/src/squeezeplay/Makefile.am Wed Apr 30 06:10:26 2008
@@ -27,7 +27,7 @@
 src/version.h: FORCE
        @${ECHO} '/* This file is automatically generated */' > src/version.h
        @${ECHO} -n '#define JIVE_VERSION "' >> src/version.h
-       @${ECHO} -n `cat ../jive.version` >> src/version.h
+       @${ECHO} -n `cat ../squeezeplay.version` >> src/version.h
        @${ECHO} -n ' r' >> src/version.h
        @svnversion -n .. >> src/version.h
        @${ECHO} '"' >> src/version.h

Modified: 7.2/trunk/squeezeplay/src/squeezeplay/Makefile.in
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay/Makefile.in?rev=2401&root=Jive&r1=2400&r2=2401&view=diff
==============================================================================
--- 7.2/trunk/squeezeplay/src/squeezeplay/Makefile.in (original)
+++ 7.2/trunk/squeezeplay/src/squeezeplay/Makefile.in Wed Apr 30 06:10:26 2008
@@ -2232,7 +2232,7 @@
 src/version.h: FORCE
        @${ECHO} '/* This file is automatically generated */' > src/version.h
        @${ECHO} -n '#define JIVE_VERSION "' >> src/version.h
-       @${ECHO} -n `cat ../jive.version` >> src/version.h
+       @${ECHO} -n `cat ../squeezeplay.version` >> src/version.h
        @${ECHO} -n ' r' >> src/version.h
        @svnversion -n .. >> src/version.h
        @${ECHO} '"' >> src/version.h

Modified: 
7.2/trunk/squeezeplay/src/squeezeplay/share/applets/MacroPlay/MacroPlayApplet.lua
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay/share/applets/MacroPlay/MacroPlayApplet.lua?rev=2401&root=Jive&r1=2400&r2=2401&view=diff
==============================================================================
--- 
7.2/trunk/squeezeplay/src/squeezeplay/share/applets/MacroPlay/MacroPlayApplet.lua
 (original)
+++ 
7.2/trunk/squeezeplay/src/squeezeplay/share/applets/MacroPlay/MacroPlayApplet.lua
 Wed Apr 30 06:10:26 2008
@@ -13,7 +13,7 @@
 
 
 -- stuff we use
-local assert, getfenv, loadfile, ipairs, package, pairs, require, setfenv, 
setmetatable, tostring, type = assert, getfenv, loadfile, ipairs, package, 
pairs, require, setfenv, setmetatable, tostring, type
+local assert, getfenv, loadfile, ipairs, package, pairs, require, setfenv, 
setmetatable, tostring, type, unpack = assert, getfenv, loadfile, ipairs, 
package, pairs, require, setfenv, setmetatable, tostring, type, unpack
 
 local oo               = require("loop.simple")
 local io               = require("io")
@@ -33,13 +33,15 @@
 local Surface          = require("jive.ui.Surface")
 local Task             = require("jive.ui.Task")
 local Textarea         = require("jive.ui.Textarea")
+local Textinput        = require("jive.ui.Textinput")
 local Timer            = require("jive.ui.Timer")
 local Window           = require("jive.ui.Window")
 
 local debug            = require("jive.utils.debug")
 local log              = require("jive.utils.log").logger("applets.misc")
 
-local LAYER_ALL        = jive.ui.LAYER_ALL
+local LAYER_CONTENT    = jive.ui.LAYER_CONTENT
+local LAYER_FRAME      = jive.ui.LAYER_FRAME
 
 local jive = jive
 
@@ -135,16 +137,12 @@
                        sound = "BUMP",
                }
 
-               debug.dump(macro, -1)
-
                if macro.passed then
                        item.icon = Icon("macroPass")
                end
                if macro.failed then
                        item.icon = Icon("macroFail")
                end
-
-               debug.dump(item, -1)
 
                menu:addItem(item)
        end
@@ -315,24 +313,87 @@
 end
 
 
+-- returns the widgets of type class from the window
+function _macroFindWidget(class)
+       local window = Framework.windowStack[1]
+
+       -- find widget
+       local widget = {}
+       window:iterate(function(w)
+               if oo.instanceof(w, class) then
+                       widget[#widget + 1] = w
+               end
+       end)
+
+       return unpack(widget)
+end
+
+
 -- returns the text of the selected menu item (or nil)
 function macroGetMenuText()
-       local window = Framework.windowStack[1]
-
-       -- find menu + selection
-       local item = false
-       window:iterate(function(widget)
-               if oo.instanceof(widget, Menu) then
-                       item = widget:getSelectedItem()
-               end
-       end)
-
+       local menu = _macroFindWidget(Menu)
+       if not menu then
+               return
+       end
+
+       local item = menu:getSelectedItem()
        if not item then
                return
        end
 
        -- assumes Group with "text" widget
        return item:getWidget("text"):getValue()
+end
+
+
+-- select the menu item, using index
+function macroSelectMenuIndex(interval, index)
+       local menu = _macroFindWidget(Menu)
+       if not menu then
+               return
+       end
+
+       local ok = false
+
+       local len = #menu:getItems()
+       if index > len then
+               return false
+       end
+
+       while menu:getSelectedIndex() ~= index do
+               macroEvent(100, EVENT_KEY_PRESS, KEY_DOWN)
+       end
+
+       macroDelay(interval)
+       return true
+end
+
+
+-- select the menu item, based on pattern. this uses key down events.
+function macroSelectMenuItem(interval, pattern)
+       local menu = _macroFindWidget(Menu)
+       if not menu then
+               return
+       end
+
+       local index = menu:getSelectedIndex() or 1
+       local dir = KEY_DOWN
+       if index ~= 1 then
+               dir = KEY_UP
+       end
+
+       local ok = false
+       repeat
+               if macroIsMenuItem(pattern) then
+                       ok = true
+                       break
+               end
+
+               macroEvent(100, EVENT_KEY_PRESS, dir)
+       until menu:getSelectedIndex() == index
+
+       macroDelay(interval)
+       return ok
 end
 
 
@@ -343,6 +404,33 @@
        log:info("macroIsMenuItem ", menuText, "==", pattern)
 
        return string.match(tostring(menuText), pattern)
+end
+
+
+-- enter text
+function macroTextInput(interval, text)
+       log:info("macroTextInput ", text)
+
+       local input = _macroFindWidget(Textinput)
+
+       local i = 1
+
+       local value = tostring(input:getValue())
+       while value ~= text do
+               local ct = string.sub(text, i, i)
+               local cv = string.sub(value, i, i)
+
+               if ct == cv then
+                       macroEvent(100, EVENT_KEY_PRESS, KEY_RIGHT)
+                       i = i + 1
+               else
+                       macroEvent(20, EVENT_KEY_PRESS, KEY_UP)
+               end
+
+               value = tostring(input:getValue())
+       end
+
+       macroEvent(100, EVENT_KEY_PRESS, KEY_RIGHT)
 end
 
 
@@ -370,7 +458,7 @@
        local window = Framework.windowStack[1]
 
        local screen = Surface:newRGB(w, h)
-       window:draw(screen, LAYER_ALL)
+       window:draw(screen, LAYER_FRAME | LAYER_CONTENT)
 
        local reffile = self.macrodir .. file .. ".bmp"
        if lfs.attributes(reffile, "mode") == "file" then
@@ -392,10 +480,18 @@
        else
                log:debug("Saving reference screenshot " .. reffile)
                screen:saveBMP(reffile)
+               pass = true
        end
 
        macroDelay(interval)
        return pass
+end
+
+
+function macroParameter(key)
+       local self = instance
+
+       return self.macro.param[key]
 end
 
 

Modified: 
7.2/trunk/squeezeplay/src/squeezeplay/share/applets/SlimBrowser/strings.txt
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay/share/applets/SlimBrowser/strings.txt?rev=2401&root=Jive&r1=2400&r2=2401&view=diff
==============================================================================
--- 7.2/trunk/squeezeplay/src/squeezeplay/share/applets/SlimBrowser/strings.txt 
(original)
+++ 7.2/trunk/squeezeplay/src/squeezeplay/share/applets/SlimBrowser/strings.txt 
Wed Apr 30 06:10:26 2008
@@ -143,7 +143,7 @@
        EN      Song Position
 
 SLIMBROWSER_USER_UPDATE_FIRMWARE_SQUEEZEBOX
-       EN      Software Update ready for %s. To begin, press and hold the 
Brightness button on your original IR remote
+       EN      Software Update ready for %s. To begin, press and hold the 
Brightness button on your original IR remote.
 
 SLIMBROWSER_PLAYER_UPDATE_REQUIRED
        EN      Player Update

Modified: 7.2/trunk/squeezeplay/src/squeezeplay/share/jive/net/Comet.lua
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay/share/jive/net/Comet.lua?rev=2401&root=Jive&r1=2400&r2=2401&view=diff
==============================================================================
--- 7.2/trunk/squeezeplay/src/squeezeplay/share/jive/net/Comet.lua (original)
+++ 7.2/trunk/squeezeplay/src/squeezeplay/share/jive/net/Comet.lua Wed Apr 30 
06:10:26 2008
@@ -877,6 +877,10 @@
                v.pending = true
        end
 
+       -- As we are disconnecting we no longer care about waiting for
+       -- a reply from the sent requests
+       self.sent_reqs = {}
+
        local data = { {
                channel  = '/meta/disconnect',
                clientId = self.clientId,

Modified: 7.2/trunk/squeezeplay/src/squeezeplay/share/jive/ui/Window.lua
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay/share/jive/ui/Window.lua?rev=2401&root=Jive&r1=2400&r2=2401&view=diff
==============================================================================
--- 7.2/trunk/squeezeplay/src/squeezeplay/share/jive/ui/Window.lua (original)
+++ 7.2/trunk/squeezeplay/src/squeezeplay/share/jive/ui/Window.lua Wed Apr 30 
06:10:26 2008
@@ -79,6 +79,7 @@
 local LAYER_CONTENT_OFF_STAGE = jive.ui.LAYER_CONTENT_OFF_STAGE
 local LAYER_CONTENT_ON_STAGE  = jive.ui.LAYER_CONTENT_ON_STAGE
 local LAYER_FRAME             = jive.ui.LAYER_FRAME
+local LAYER_LOWER             = jive.ui.LAYER_LOWER
 
 local LAYOUT_NORTH            = jive.ui.LAYOUT_NORTH
 local LAYOUT_EAST             = jive.ui.LAYOUT_EAST
@@ -755,7 +756,7 @@
        return function(widget, surface)
                        local x = frames * 3
 
-                       self:draw(surface, LAYER_FRAME)
+                       self:draw(surface, LAYER_FRAME | LAYER_LOWER)
                        surface:setOffset(x, 0)
                        self:draw(surface, LAYER_CONTENT | 
LAYER_CONTENT_OFF_STAGE | LAYER_CONTENT_ON_STAGE)
                        surface:setOffset(0, 0)
@@ -784,7 +785,7 @@
        return function(widget, surface)
                        local x = frames * 3
 
-                       self:draw(surface, LAYER_FRAME)
+                       self:draw(surface, LAYER_FRAME | LAYER_LOWER)
                        surface:setOffset(-x, 0)
                        self:draw(surface, LAYER_CONTENT | 
LAYER_CONTENT_OFF_STAGE | LAYER_CONTENT_ON_STAGE)
                        surface:setOffset(0, 0)
@@ -817,7 +818,7 @@
                        local x = screenWidth - ((frames * frames * frames) / 
scale)
 
                        surface:setOffset(0, 0)
-                       newWindow:draw(surface, LAYER_FRAME)
+                       newWindow:draw(surface, LAYER_FRAME | LAYER_LOWER)
 
                        surface:setOffset(-x, 0)
                        oldWindow:draw(surface, LAYER_CONTENT | 
LAYER_CONTENT_OFF_STAGE)
@@ -855,7 +856,7 @@
                        local x = screenWidth - ((frames * frames * frames) / 
scale)
 
                        surface:setOffset(0, 0)
-                       newWindow:draw(surface, LAYER_FRAME)
+                       newWindow:draw(surface, LAYER_FRAME | LAYER_LOWER)
 
                        surface:setOffset(x, 0)
                        oldWindow:draw(surface, LAYER_CONTENT | 
LAYER_CONTENT_OFF_STAGE)

Added: 
7.2/trunk/squeezeplay/src/squeezeplay/specialProjects/Doomsday/DoomsdayApplet.lua
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay/specialProjects/Doomsday/DoomsdayApplet.lua?rev=2401&root=Jive&view=auto
==============================================================================
--- 
7.2/trunk/squeezeplay/src/squeezeplay/specialProjects/Doomsday/DoomsdayApplet.lua
 (added)
+++ 
7.2/trunk/squeezeplay/src/squeezeplay/specialProjects/Doomsday/DoomsdayApplet.lua
 Wed Apr 30 06:10:26 2008
@@ -1,0 +1,137 @@
+
+--[[
+=head1 NAME
+
+applets.Doomsday.DoomsdayApplet - Doomsday Applet
+
+=head1 DESCRIPTION
+
+This applet was created solely for the purpose of the demonstration on
+http://mwiki.slimdevices.com/index.php/SqueezePlay_Applet_Guide
+
+=head1 FUNCTIONS
+
+Applet related methods are described in L<jive.Applet>. 
+
+=cut
+--]]
+
+
+-- stuff we use
+local tostring = tostring
+local oo                     = require("loop.simple")
+local string                 = require("string")
+
+local Applet                 = require("jive.Applet")
+local RadioButton            = require("jive.ui.RadioButton")
+local RadioGroup             = require("jive.ui.RadioGroup")
+local Window                 = require("jive.ui.Window")
+local Popup                  = require("jive.ui.Popup")
+local Textarea               = require('jive.ui.Textarea')
+
+local SimpleMenu             = require("jive.ui.SimpleMenu")
+local RadioGroup             = require("jive.ui.RadioGroup")
+local log                    = 
require("jive.utils.log").addCategory("doomsday", jive.utils.log.DEBUG)
+
+module(...)
+oo.class(_M, Applet)
+
+
+function menu(self, menuItem)
+
+       log:info("menu")
+       local group = RadioGroup()
+       local currentSetting = self:getSettings().currentSetting
+
+       -- create a SimpleMenu object with selections to be created     
+       local menu = SimpleMenu("menu", {
+               -- first menu item
+               {       
+                       -- text for the menu item
+                       text = self:string("DOOMSDAY_OPTION1"),
+                       -- add a radiobutton with a callback function to be 
used when selected
+                       icon = RadioButton(
+                               -- skin style of radio button (defined in 
DefaultSkin)
+                               "radio",
+                               -- group to attach button
+                               group,
+                               -- callback function
+                               function()
+                                       log:info("radio button 1 selected")
+                                       -- show the warning
+                                       self:warnMasses('DOOMSDAY_MESSAGE1')
+                                       -- store the setting to settings.lua
+                                       self:getSettings()['currentSetting'] = 1
+                                       self:storeSettings()
+                               end,
+                               -- fill the radio button if this is the 
currentSetting
+                               (currentSetting == 1)
+                       ),
+               },
+               {       
+                       text = self:string("DOOMSDAY_OPTION2"),
+                       icon = RadioButton(
+                               "radio",
+                               group,
+                               function()
+                                       log:info("radio button 2 selected")
+                                       self:warnMasses('DOOMSDAY_MESSAGE2')
+                                       self:getSettings()['currentSetting'] = 2
+                                       self:storeSettings()
+                               end,
+                               (currentSetting == 2)
+                       ),
+               },
+               {       
+                       text = self:string("DOOMSDAY_OPTION3"),
+                       icon = RadioButton(
+                               "radio",
+                               group,
+                               function()
+                                       log:info("radio button 3 selected")
+                                       self:warnMasses('DOOMSDAY_MESSAGE3')
+                                       self:getSettings()['currentSetting'] = 
3 
+                                       self:storeSettings()
+                               end,
+                               (currentSetting == 3)
+                       ),
+               },
+               {       
+                       text = self:string("DOOMSDAY_OPTION4"),
+                       icon = RadioButton(
+                               "radio",
+                               group,
+                               function()
+                                       log:info("radio button 4 selected")
+                                       self:warnMasses('DOOMSDAY_MESSAGE4')
+                                       self:getSettings()['currentSetting'] = 4
+                                       self:storeSettings()
+                               end,
+                               (currentSetting == 4)
+                       ),
+               },
+       })
+
+       -- create a window object
+       local window = Window("window", self:string("DOOMSDAY")) 
+       
+       -- add the SimpleMenu to the window
+       window:addWidget(menu)
+
+       -- show the window
+       window:show()
+end
+
+function warnMasses(self, warning)
+       log:info(self:string(warning))
+
+       -- create a Popup object, using already established 'currentsong' skin 
style
+       local doomsday = Popup('currentsong')
+
+       -- add message to popup
+       local doomsdayMessage = Textarea('popupplay', self:string(warning))
+       doomsday:addWidget(doomsdayMessage)
+
+       -- display the message for 3 seconds
+       doomsday:showBriefly(30000, nil, Window.transitionPushPopupUp, 
Window.transitionPushPopupDown)
+end

Added: 
7.2/trunk/squeezeplay/src/squeezeplay/specialProjects/Doomsday/DoomsdayMeta.lua
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay/specialProjects/Doomsday/DoomsdayMeta.lua?rev=2401&root=Jive&view=auto
==============================================================================
--- 
7.2/trunk/squeezeplay/src/squeezeplay/specialProjects/Doomsday/DoomsdayMeta.lua 
(added)
+++ 
7.2/trunk/squeezeplay/src/squeezeplay/specialProjects/Doomsday/DoomsdayMeta.lua 
Wed Apr 30 06:10:26 2008
@@ -1,0 +1,27 @@
+local oo            = require("loop.simple")
+local AppletMeta    = require("jive.AppletMeta")
+
+local appletManager = appletManager
+local jiveMain      = jiveMain
+
+
+module(...)
+oo.class(_M, AppletMeta)
+
+
+function jiveVersion(meta)
+       return 1, 1
+end
+
+
+function defaultSettings(meta)
+        return {
+                currentSetting = 0,
+        }
+end
+
+function registerApplet(meta)
+       
+       jiveMain:addItem(meta:menuItem('doomsdayApplet', 'home', "DOOMSDAY", 
function(applet, ...) applet:menu(...) end, 20))
+
+end

Added: 
7.2/trunk/squeezeplay/src/squeezeplay/specialProjects/Doomsday/settings.lua
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay/specialProjects/Doomsday/settings.lua?rev=2401&root=Jive&view=auto
==============================================================================
--- 7.2/trunk/squeezeplay/src/squeezeplay/specialProjects/Doomsday/settings.lua 
(added)
+++ 7.2/trunk/squeezeplay/src/squeezeplay/specialProjects/Doomsday/settings.lua 
Wed Apr 30 06:10:26 2008
@@ -1,0 +1,2 @@
+settings = {};
+settings["currentSetting"] = 2;

Added: 
7.2/trunk/squeezeplay/src/squeezeplay/specialProjects/Doomsday/strings.txt
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay/specialProjects/Doomsday/strings.txt?rev=2401&root=Jive&view=auto
==============================================================================
--- 7.2/trunk/squeezeplay/src/squeezeplay/specialProjects/Doomsday/strings.txt 
(added)
+++ 7.2/trunk/squeezeplay/src/squeezeplay/specialProjects/Doomsday/strings.txt 
Wed Apr 30 06:10:26 2008
@@ -1,0 +1,34 @@
+#
+# The two letter codes are defined by ISO 639-1
+# http://en.wikipedia.org/wiki/List_of_ISO_639_codes
+
+DOOMSDAY
+       EN      Doomsday
+       DE      Doomstag
+
+DOOMSDAY_OPTION1
+       EN      Dire Warning 1
+
+DOOMSDAY_OPTION2
+       EN      Dire Warning 2
+
+DOOMSDAY_OPTION3
+       EN      Dire Warning 3
+
+DOOMSDAY_OPTION4
+       EN      Dire Warning 4
+
+DOOMSDAY_MESSAGE0
+       EN      Fear is in the air!
+
+DOOMSDAY_MESSAGE1
+       EN      The End is Nigh!
+
+DOOMSDAY_MESSAGE2
+       EN      Run for the hills!
+
+DOOMSDAY_MESSAGE3
+       EN      Get your affairs in order!
+
+DOOMSDAY_MESSAGE4
+       EN      DUCK!

Propchange: 
7.2/trunk/squeezeplay/src/squeezeplay/specialProjects/Doomsday/strings.txt
------------------------------------------------------------------------------
    svn:executable = *

Modified: 7.2/trunk/squeezeplay/src/squeezeplay/src/ui/jive.h
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay/src/ui/jive.h?rev=2401&root=Jive&r1=2400&r2=2401&view=diff
==============================================================================
--- 7.2/trunk/squeezeplay/src/squeezeplay/src/ui/jive.h (original)
+++ 7.2/trunk/squeezeplay/src/squeezeplay/src/ui/jive.h Wed Apr 30 06:10:26 2008
@@ -61,6 +61,7 @@
        JIVE_LAYER_CONTENT              = 0x02,
        JIVE_LAYER_CONTENT_OFF_STAGE    = 0x04,
        JIVE_LAYER_CONTENT_ON_STAGE     = 0x08,
+       JIVE_LAYER_LOWER                = 0x10,
        JIVE_LAYER_ALL                  = 0xFF,
 } JiveLayer;
 

Modified: 7.2/trunk/squeezeplay/src/squeezeplay/src/ui/jive_window.c
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay/src/ui/jive_window.c?rev=2401&root=Jive&r1=2400&r2=2401&view=diff
==============================================================================
--- 7.2/trunk/squeezeplay/src/squeezeplay/src/ui/jive_window.c (original)
+++ 7.2/trunk/squeezeplay/src/squeezeplay/src/ui/jive_window.c Wed Apr 30 
06:10:26 2008
@@ -210,7 +210,7 @@
                        lua_pushvalue(L, 1);
                        lua_call(L, 1, 1);
 
-                       if ((layer & JIVE_LAYER_FRAME) && jive_getmethod(L, -1, 
"draw")) {
+                       if ((layer & JIVE_LAYER_LOWER) && jive_getmethod(L, -1, 
"draw")) {
                                lua_pushvalue(L, -2);
                                lua_pushvalue(L, 2);
                                lua_pushinteger(L, JIVE_LAYER_ALL);

Modified: 7.2/trunk/squeezeplay/src/squeezeplay/src/ui/lua_jiveui.c
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay/src/ui/lua_jiveui.c?rev=2401&root=Jive&r1=2400&r2=2401&view=diff
==============================================================================
--- 7.2/trunk/squeezeplay/src/squeezeplay/src/ui/lua_jiveui.c (original)
+++ 7.2/trunk/squeezeplay/src/squeezeplay/src/ui/lua_jiveui.c Wed Apr 30 
06:10:26 2008
@@ -2175,6 +2175,7 @@
    tolua_constant(tolua_S,"LAYER_CONTENT",JIVE_LAYER_CONTENT);
    
tolua_constant(tolua_S,"LAYER_CONTENT_OFF_STAGE",JIVE_LAYER_CONTENT_OFF_STAGE);
    
tolua_constant(tolua_S,"LAYER_CONTENT_ON_STAGE",JIVE_LAYER_CONTENT_ON_STAGE);
+   tolua_constant(tolua_S,"LAYER_LOWER",JIVE_LAYER_LOWER);
    tolua_constant(tolua_S,"LAYER_ALL",JIVE_LAYER_ALL);
    tolua_constant(tolua_S,"EVENT_NONE",JIVE_EVENT_NONE);
    tolua_constant(tolua_S,"EVENT_SCROLL",JIVE_EVENT_SCROLL);

Modified: 7.2/trunk/squeezeplay/src/squeezeplay/src/ui/lua_jiveui.pkg
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay/src/ui/lua_jiveui.pkg?rev=2401&root=Jive&r1=2400&r2=2401&view=diff
==============================================================================
--- 7.2/trunk/squeezeplay/src/squeezeplay/src/ui/lua_jiveui.pkg (original)
+++ 7.2/trunk/squeezeplay/src/squeezeplay/src/ui/lua_jiveui.pkg Wed Apr 30 
06:10:26 2008
@@ -71,6 +71,7 @@
        JIVE_LAYER_CONTENT @ LAYER_CONTENT              = 0x02,
        JIVE_LAYER_CONTENT_OFF_STAGE @ LAYER_CONTENT_OFF_STAGE  = 0x04,
        JIVE_LAYER_CONTENT_ON_STAGE @ LAYER_CONTENT_ON_STAGE    = 0x08,
+       JIVE_LAYER_LOWER @ LAYER_LOWER          = 0x10,
        JIVE_LAYER_ALL @ LAYER_ALL                      = 0xFF,
 } Layer;
 

Modified: 
7.2/trunk/squeezeplay/src/squeezeplay_jive/share/applets/AboutJive/AboutJiveApplet.lua
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay_jive/share/applets/AboutJive/AboutJiveApplet.lua?rev=2401&root=Jive&r1=2400&r2=2401&view=diff
==============================================================================
--- 
7.2/trunk/squeezeplay/src/squeezeplay_jive/share/applets/AboutJive/AboutJiveApplet.lua
 (original)
+++ 
7.2/trunk/squeezeplay/src/squeezeplay_jive/share/applets/AboutJive/AboutJiveApplet.lua
 Wed Apr 30 06:10:26 2008
@@ -26,7 +26,7 @@
 function settingsShow(self)
        local window = Window("window", self:string("ABOUT_JIVE"), 
'settingstitle')
 
-       local fh = io.open("/etc/jive.version", "r")
+       local fh = io.open("/etc/squeezeos.version", "r")
        local version = fh:read("*a")
        fh:close()
 

Modified: 
7.2/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SetupFirmwareUpgrade/SetupFirmwareUpgradeApplet.lua
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SetupFirmwareUpgrade/SetupFirmwareUpgradeApplet.lua?rev=2401&root=Jive&r1=2400&r2=2401&view=diff
==============================================================================
--- 
7.2/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SetupFirmwareUpgrade/SetupFirmwareUpgradeApplet.lua
 (original)
+++ 
7.2/trunk/squeezeplay/src/squeezeplay_jive/share/applets/SetupFirmwareUpgrade/SetupFirmwareUpgradeApplet.lua
 Wed Apr 30 06:10:26 2008
@@ -11,6 +11,7 @@
 
 local oo                     = require("loop.simple")
 
+local math                   = require("math")
 local string                 = require("string")
 local table                  = require("jive.utils.table")
 local socket                 = require("socket")
@@ -73,6 +74,23 @@
 end
 
 
+-- return 0 if version are same, +ive if upgrade, -ive if downgrade
+function _versionCompare(a, b)
+       if not a or not b then
+               return math.huge
+       end
+
+       local aMajor, aMinor = string.match(a, "(.+) r(%d+)")
+       local bMajor, bMinor = string.match(b, "(.+) r(%d+)")
+
+       if not aMajor or not bMajor or aMajor ~= bMajor then
+               return math.huge
+       end
+
+       return bMinor - aMinor
+end
+
+
 function _makeUpgradeItems(self, window, menu, optional, url, urlHelp)
        local help = Textarea("help", "")
 
@@ -85,7 +103,7 @@
                        self:_upgrade()
                end,
                focusGained = function()
-                       if version == JIVE_VERSION then
+                       if _versionCompare(JIVE_VERSION, version) <= 0 then
                                help:setValue(self:string(urlHelp or 
"UPDATE_BEGIN_REINSTALL", version or "?"))
                        else
                                help:setValue(self:string(urlHelp or 
"UPDATE_BEGIN_UPGRADE", version or "?"))

Added: 7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/ChooseLanguage.bmp
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/ChooseLanguage.bmp?rev=2401&root=Jive&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 
7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/ChooseLanguage.bmp
------------------------------------------------------------------------------
    svn:executable = *

Propchange: 
7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/ChooseLanguage.bmp
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: 7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/ChoosePlayer.bmp
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/ChoosePlayer.bmp?rev=2401&root=Jive&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 
7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/ChoosePlayer.bmp
------------------------------------------------------------------------------
    svn:executable = *

Propchange: 
7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/ChoosePlayer.bmp
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: 7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/Continue.bmp
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/Continue.bmp?rev=2401&root=Jive&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/Continue.bmp
------------------------------------------------------------------------------
    svn:executable = *

Propchange: 7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/Continue.bmp
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: 
7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/CopyingUpdate.bmp
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/CopyingUpdate.bmp?rev=2401&root=Jive&r1=2400&r2=2401&view=diff
==============================================================================
Binary files - no diff available.

Modified: 
7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/FactoryReset2.bmp
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/FactoryReset2.bmp?rev=2401&root=Jive&r1=2400&r2=2401&view=diff
==============================================================================
Binary files - no diff available.

Modified: 
7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/FactoryResetMacro.lua
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/FactoryResetMacro.lua?rev=2401&root=Jive&r1=2400&r2=2401&view=diff
==============================================================================
--- 7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/FactoryResetMacro.lua 
(original)
+++ 7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/FactoryResetMacro.lua 
Wed Apr 30 06:10:26 2008
@@ -4,10 +4,10 @@
 
 
 -- Settings
-while not macroIsMenuItem("Settings") do
-       macroEvent(100, EVENT_KEY_PRESS, KEY_DOWN)
+if not macroSelectMenuItem(100, "Settings") then
+       return macroFail("Settings")
 end
-macroEvent(100, EVENT_KEY_PRESS, KEY_GO)
+macroEvent(1000, EVENT_KEY_PRESS, KEY_GO)
 
 if not macroScreenshot(1000, "Settings") then
        return macroFail("Settings")
@@ -15,10 +15,10 @@
 
 
 -- Advanced
-while not macroIsMenuItem("Advanced") do
-       macroEvent(100, EVENT_KEY_PRESS, KEY_DOWN)
+if not macroSelectMenuItem(100, "Advanced") then
+       return macroFail("Advanced")
 end
-macroEvent(100, EVENT_KEY_PRESS, KEY_GO)
+macroEvent(1000, EVENT_KEY_PRESS, KEY_GO)
 
 if not macroScreenshot(1000, "Advanced") then
        return macroFail("Advanced")
@@ -26,10 +26,10 @@
 
 
 -- Factory Reset
-while not macroIsMenuItem("Factory Reset") do
-       macroEvent(100, EVENT_KEY_PRESS, KEY_DOWN)
+if not macroSelectMenuItem(100, "Factory Reset") then
+       return macroFail("FactoryReset1")
 end
-macroEvent(500, EVENT_KEY_PRESS, KEY_GO)
+macroEvent(1000, EVENT_KEY_PRESS, KEY_GO)
 
 if not macroScreenshot(1000, "FactoryReset1") then
        return macroFail("FactoryReset1")
@@ -37,12 +37,12 @@
 
 
 -- Begin update
-while not macroIsMenuItem("Continue") do
-       macroEvent(100, EVENT_KEY_PRESS, KEY_DOWN)
+if not macroSelectMenuItem(100, "Continue") then
+       return macroFail("FactoryReset2")
 end
 macroEvent(1000, EVENT_KEY_PRESS, KEY_GO)
 
-if not macroScreenshot(1000, "FactoryReset2") then
+if not macroScreenshot(100, "FactoryReset2") then
        return macroFail("FactoryReset2")
 end
 

Modified: 
7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/ForcedUpgradeMacro.lua
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/ForcedUpgradeMacro.lua?rev=2401&root=Jive&r1=2400&r2=2401&view=diff
==============================================================================
--- 
7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/ForcedUpgradeMacro.lua 
(original)
+++ 
7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/ForcedUpgradeMacro.lua 
Wed Apr 30 06:10:26 2008
@@ -11,8 +11,8 @@
 
 
 -- Begin update
-while not macroIsMenuItem("Begin update") do
-       return macroEvent(100, EVENT_KEY_PRESS, KEY_DOWN)
+if not macroSelectMenuItem(100, "Begin update") then
+       return macroFail("CopyingUpdate")
 end
 macroEvent(1000, EVENT_KEY_PRESS, KEY_GO)
 

Modified: 7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/HomeMenu.bmp
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/HomeMenu.bmp?rev=2401&root=Jive&r1=2400&r2=2401&view=diff
==============================================================================
Binary files - no diff available.

Modified: 
7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/HomeMenuMacro.lua
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/HomeMenuMacro.lua?rev=2401&root=Jive&r1=2400&r2=2401&view=diff
==============================================================================
--- 7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/HomeMenuMacro.lua 
(original)
+++ 7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/HomeMenuMacro.lua Wed 
Apr 30 06:10:26 2008
@@ -2,6 +2,9 @@
 
 -- go home
 macroHome(1000)
+
+-- select top menu item
+macroSelectMenuIndex(100, 1)
 
 -- check screen
 if not macroScreenshot(1000, "HomeMenu") then

Modified: 7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/Macros.lua
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/Macros.lua?rev=2401&root=Jive&r1=2400&r2=2401&view=diff
==============================================================================
--- 7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/Macros.lua (original)
+++ 7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/Macros.lua Wed Apr 30 
06:10:26 2008
@@ -1,11 +1,21 @@
 return {
   auto=1,
-  autostart={ "homeMenu", "playmode" },
+  autostart={ "forcedUpgrade", "softwareUpgrade", "factoryReset", "setupWPA", 
"homeMenu", "playmode" },
   macros={
+    factoryReset={
+      desc="Verify a factory reset.",
+      file="FactoryResetMacro.lua",
+      name="Factory Reset" 
+    },
     forcedUpgrade={
       desc="Forced software upgrade.",
       file="ForcedUpgradeMacro.lua",
-      name="Forced Upgrade",
+      name="Forced Upgrade" 
+    },
+    homeMenu={
+      desc="Verify the home menu.",
+      file="HomeMenuMacro.lua",
+      name="Home Menu",
     },
     playmode={
       desc="Playmode tests (stop/pause/play).",
@@ -17,15 +27,16 @@
       file="SoftwareUpgradeMacro.lua",
       name="Software Upgrade" 
     },
-    homeMenu={
-      desc="Verify the home menu.",
-      file="HomeMenuMacro.lua",
-      name="Home Menu" 
-    },
-    factoryReset={
-      desc="Verify a factory reset.",
-      file="FactoryResetMacro.lua",
-      name="Factory Reset" 
-    } 
+    setupWPA={
+      desc="Setup using WPA network. This macro only works after a Factory 
Reset.",
+      file="SetupWPAMacro.lua",
+      name="Setup WPA",
+      param={
+        region="Europe",
+        ssid="linksys",
+        wpa="adgjmptw",
+        player="Transporter"
+      }
+    }
   } 
 }

Modified: 
7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/PlaymodeMacro.lua
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/PlaymodeMacro.lua?rev=2401&root=Jive&r1=2400&r2=2401&view=diff
==============================================================================
--- 7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/PlaymodeMacro.lua 
(original)
+++ 7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/PlaymodeMacro.lua Wed 
Apr 30 06:10:26 2008
@@ -1,14 +1,14 @@
 
 -- go home
-macroHome()
+macroHome(500)
 
--- key down until Now Playing
-while not macroIsMenuItem("Now Playing") do
-       macroEvent(100, EVENT_KEY_PRESS, KEY_DOWN)
+-- select Now Playing
+if not macroSelectMenuItem(100, "Now Playing") then
+       return macroFail("Now Playing")
 end
 
 -- key go into Now Playing
-macroEvent(100, EVENT_KEY_PRESS, KEY_GO)
+macroEvent(1000, EVENT_KEY_PRESS, KEY_GO)
 
 
 -- stop (hold pause), wait until after show briefly

Modified: 
7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/PlaymodePause.bmp
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/PlaymodePause.bmp?rev=2401&root=Jive&r1=2400&r2=2401&view=diff
==============================================================================
Binary files - no diff available.

Modified: 7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/PlaymodePlay.bmp
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/PlaymodePlay.bmp?rev=2401&root=Jive&r1=2400&r2=2401&view=diff
==============================================================================
Binary files - no diff available.

Modified: 7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/PlaymodeStop.bmp
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/PlaymodeStop.bmp?rev=2401&root=Jive&r1=2400&r2=2401&view=diff
==============================================================================
Binary files - no diff available.

Added: 7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/SetupWPAMacro.lua
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/SetupWPAMacro.lua?rev=2401&root=Jive&view=auto
==============================================================================
--- 7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/SetupWPAMacro.lua 
(added)
+++ 7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/SetupWPAMacro.lua Wed 
Apr 30 06:10:26 2008
@@ -1,0 +1,100 @@
+
+-- go home
+macroHome(1000)
+
+
+-- Return to Setup
+if not macroSelectMenuItem(100, "Return to Setup") then
+       return macroFail("Return to Setup")
+end
+macroEvent(1000, EVENT_KEY_PRESS, KEY_GO)
+
+
+-- Choose Language
+if not macroSelectMenuItem(100, "English") then
+       return macroFail("English")
+end
+if not macroScreenshot(1000, "ChooseLanguage") then
+       return macroFail("ChooseLanguage")
+end
+macroEvent(1000, EVENT_KEY_PRESS, KEY_GO)
+
+
+-- Welcome
+if not macroScreenshot(1000, "Welcome") then
+       return macroFail("Welcome")
+end
+macroEvent(1000, EVENT_KEY_PRESS, KEY_GO)
+
+
+-- Wireless Region
+if not macroScreenshot(1000, "WirelessRegion") then
+       return macroFail("WirelessRegion")
+end
+
+local region = macroParameter("region")
+if not macroSelectMenuItem(100, region) then
+       return macroFail("Region: ", region)
+end
+macroEvent(1000, EVENT_KEY_PRESS, KEY_GO)
+
+
+-- Finding Networks (allow 5 seconds)
+macroDelay(5000)
+
+
+-- Wireless Networks
+if not macroScreenshot(1000, "WirelessNetworks") then
+       return macroFail("WirelessNetworks")
+end
+
+local ssid = macroParameter("ssid")
+if not macroSelectMenuItem(100, ssid) then
+       return macroFail("SSID: ", ssid)
+end
+macroEvent(1000, EVENT_KEY_PRESS, KEY_GO)
+
+
+-- Wireless Password
+if not macroScreenshot(1000, "WirelessPassword") then
+       return macroFail("WirelessPassword")
+end
+
+local wpa = macroParameter("wpa")
+macroTextInput(100, wpa)
+macroEvent(1000, EVENT_KEY_PRESS, KEY_GO)
+
+
+-- Connecting to <ssid> (allow 20 seconds)
+macroDelay(20000)
+
+
+-- Choose Player (allow 10 seconds)
+macroDelay(10000)
+if not macroScreenshot(1000, "ChoosePlayer") then
+       return macroFail("ChoosePlayer")
+end
+
+local player = macroParameter("player")
+if not macroSelectMenuItem(100, player) then
+       return macroFail("Player: ", player)
+end
+macroEvent(1000, EVENT_KEY_PRESS, KEY_GO)
+
+
+-- Connecting to <player> (allow 10 seconds)
+macroDelay(10000)
+
+
+-- That's it!
+if not macroSelectMenuItem(100, "Continue") then
+       return macroFail("Continue")
+end
+if not macroScreenshot(1000, "Continue") then
+       return macroFail("Continue")
+end
+macroEvent(1000, EVENT_KEY_PRESS, KEY_GO)
+
+
+-- All done!
+macroPass("SetupWPA")

Modified: 
7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/SoftwareUpdate.bmp
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/SoftwareUpdate.bmp?rev=2401&root=Jive&r1=2400&r2=2401&view=diff
==============================================================================
Binary files - no diff available.

Modified: 
7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/SoftwareUpgradeMacro.lua
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/SoftwareUpgradeMacro.lua?rev=2401&root=Jive&r1=2400&r2=2401&view=diff
==============================================================================
--- 
7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/SoftwareUpgradeMacro.lua 
(original)
+++ 
7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/SoftwareUpgradeMacro.lua 
Wed Apr 30 06:10:26 2008
@@ -1,13 +1,13 @@
 
 -- go home
-macroHome()
+macroHome(500)
 
 
 -- Settings
-while not macroIsMenuItem("Settings") do
-       macroEvent(100, EVENT_KEY_PRESS, KEY_DOWN)
+if not macroSelectMenuItem(100, "Settings") then
+       return macroFail("Settings")
 end
-macroEvent(100, EVENT_KEY_PRESS, KEY_GO)
+macroEvent(1000, EVENT_KEY_PRESS, KEY_GO)
 
 if not macroScreenshot(1000, "Settings") then
        return macroFail("Settings")
@@ -15,10 +15,10 @@
 
 
 -- Advanced
-while not macroIsMenuItem("Advanced") do
-       macroEvent(100, EVENT_KEY_PRESS, KEY_DOWN)
+if not macroSelectMenuItem(100, "Advanced") then
+       return macroFail("Advanced")
 end
-macroEvent(100, EVENT_KEY_PRESS, KEY_GO)
+macroEvent(1000, EVENT_KEY_PRESS, KEY_GO)
 
 if not macroScreenshot(1000, "Advanced") then
        return macroFail("Advanced")
@@ -26,10 +26,10 @@
 
 
 -- Software Update
-while not macroIsMenuItem("Software Update") do
-       macroEvent(100, EVENT_KEY_PRESS, KEY_DOWN)
+if not macroSelectMenuItem(100, "Software Update") then
+       return macroFail("SoftwareUpdate")
 end
-macroEvent(500, EVENT_KEY_PRESS, KEY_GO)
+macroEvent(1000, EVENT_KEY_PRESS, KEY_GO)
 
 if not macroScreenshot(1000, "SoftwareUpdate") then
        return macroFail("SoftwareUpdate")
@@ -37,8 +37,8 @@
 
 
 -- Begin update
-while not macroIsMenuItem("Begin update") do
-       return macroEvent(100, EVENT_KEY_PRESS, KEY_DOWN)
+if not macroSelectMenuItem(100, "Begin update") then
+       return macroFail("CopyingUpdate")
 end
 macroEvent(1000, EVENT_KEY_PRESS, KEY_GO)
 

Added: 7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/Welcome.bmp
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/Welcome.bmp?rev=2401&root=Jive&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/Welcome.bmp
------------------------------------------------------------------------------
    svn:executable = *

Propchange: 7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/Welcome.bmp
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: 
7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/WirelessNetworks.bmp
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/WirelessNetworks.bmp?rev=2401&root=Jive&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 
7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/WirelessNetworks.bmp
------------------------------------------------------------------------------
    svn:executable = *

Propchange: 
7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/WirelessNetworks.bmp
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: 
7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/WirelessPassword.bmp
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/WirelessPassword.bmp?rev=2401&root=Jive&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 
7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/WirelessPassword.bmp
------------------------------------------------------------------------------
    svn:executable = *

Propchange: 
7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/WirelessPassword.bmp
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: 7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/WirelessRegion.bmp
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/WirelessRegion.bmp?rev=2401&root=Jive&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 
7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/WirelessRegion.bmp
------------------------------------------------------------------------------
    svn:executable = *

Propchange: 
7.2/trunk/squeezeplay/src/squeezeplay_jive/test/smoke/WirelessRegion.bmp
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

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

Reply via email to