Author: titmuss
Date: Tue Apr 22 05:18:12 2008
New Revision: 2309

URL: http://svn.slimdevices.com?rev=2309&root=Jive&view=rev
Log:
Bug: N/A
Description:
Allow applets to load all EVENT and KEY constants in the module declaration 
using Framework.constants. This can't be used for the internal 
jive.ui.* classes due to a loading loop.


Modified:
    
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/ChooseMusicSource/ChooseMusicSourceApplet.lua
    7.1/trunk/squeezeplay/src/squeezeplay/share/applets/Clock/ClockApplet.lua
    
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/DefaultSkin/DefaultSkinApplet.lua
    7.1/trunk/squeezeplay/src/squeezeplay/share/applets/Flickr/FlickrApplet.lua
    
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/InfoBrowser/InfoBrowserApplet.lua
    
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/LogSettings/LogSettingsApplet.lua
    
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/MacroPlay/MacroPlayApplet.lua
    
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/NowPlaying/NowPlayingApplet.lua
    
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/ScreenSavers/ScreenSaversApplet.lua
    
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/Screenshot/ScreenshotApplet.lua
    
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SelectPlayer/SelectPlayerApplet.lua
    
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SetupDateTime/SetupDateTimeApplet.lua
    
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SetupLanguage/SetupLanguageApplet.lua
    
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SetupWallpaper/SetupWallpaperApplet.lua
    
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SlimBrowser/SlimBrowserApplet.lua
    
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SqueezeNetworkPIN/SqueezeNetworkPINApplet.lua
    7.1/trunk/squeezeplay/src/squeezeplay/share/jive/ui/Framework.lua
    7.1/trunk/squeezeplay/src/squeezeplay/share/jive/ui/Menu.lua

Modified: 
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/ChooseMusicSource/ChooseMusicSourceApplet.lua
URL: 
http://svn.slimdevices.com/7.1/trunk/squeezeplay/src/squeezeplay/share/applets/ChooseMusicSource/ChooseMusicSourceApplet.lua?rev=2309&root=Jive&r1=2308&r2=2309&view=diff
==============================================================================
--- 
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/ChooseMusicSource/ChooseMusicSourceApplet.lua
 (original)
+++ 
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/ChooseMusicSource/ChooseMusicSourceApplet.lua
 Tue Apr 22 05:18:12 2008
@@ -30,6 +30,7 @@
 local Applet        = require("jive.Applet")
 local SlimServers   = require("jive.slim.SlimServers")
 
+local Framework     = require("jive.ui.Framework")
 local Checkbox      = require("jive.ui.Checkbox")
 local Label         = require("jive.ui.Label")
 local SimpleMenu    = require("jive.ui.SimpleMenu")
@@ -42,17 +43,12 @@
 local debug         = require("jive.utils.debug")
 local log           = require("jive.utils.log").logger("applets.setup")
 
-local EVENT_WINDOW_POP = jive.ui.EVENT_WINDOW_POP
-local EVENT_KEY_PRESS  = jive.ui.EVENT_KEY_PRESS
-local EVENT_CONSUME    = jive.ui.EVENT_CONSUME
-local EVENT_UNUSED     = jive.ui.EVENT_UNUSED
-
 local jnt           = jnt
 local jiveMain      = jiveMain
 local appletManager = appletManager
 
 
-module(...)
+module(..., Framework.constants)
 oo.class(_M, Applet)
 
 

Modified: 
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/Clock/ClockApplet.lua
URL: 
http://svn.slimdevices.com/7.1/trunk/squeezeplay/src/squeezeplay/share/applets/Clock/ClockApplet.lua?rev=2309&root=Jive&r1=2308&r2=2309&view=diff
==============================================================================
--- 7.1/trunk/squeezeplay/src/squeezeplay/share/applets/Clock/ClockApplet.lua 
(original)
+++ 7.1/trunk/squeezeplay/src/squeezeplay/share/applets/Clock/ClockApplet.lua 
Tue Apr 22 05:18:12 2008
@@ -23,20 +23,9 @@
 local log              = 
require("jive.utils.log").logger("applets.screensavers")
 local datetime         = require("jive.utils.datetime")
 
-local EVENT_KEY_PRESS  = jive.ui.EVENT_KEY_PRESS
-local EVENT_WINDOW_RESIZE = jive.ui.EVENT_WINDOW_RESIZE
-local EVENT_CONSUME    = jive.ui.EVENT_CONSUME
-local EVENT_WINDOW_POP = jive.ui.EVENT_WINDOW_POP
-local FRAME_RATE       = jive.ui.FRAME_RATE
-local LAYER_FRAME      = jive.ui.LAYER_FRAME
-local LAYER_CONTENT    = jive.ui.LAYER_CONTENT
-local LAYER_ALL               = jive.ui.JIVE_LAYER_ALL
-local LAYER_CONTENT_ON_STAGE = jive.ui.LAYER_CONTENT_ON_STAGE
-local KEY_BACK         = jive.ui.KEY_BACK
-
 local appletManager    = appletManager
 
-module(...)
+module(..., Framework.constants)
 oo.class(_M, Applet)
 
 

Modified: 
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/DefaultSkin/DefaultSkinApplet.lua
URL: 
http://svn.slimdevices.com/7.1/trunk/squeezeplay/src/squeezeplay/share/applets/DefaultSkin/DefaultSkinApplet.lua?rev=2309&root=Jive&r1=2308&r2=2309&view=diff
==============================================================================
--- 
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/DefaultSkin/DefaultSkinApplet.lua
 (original)
+++ 
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/DefaultSkin/DefaultSkinApplet.lua
 Tue Apr 22 05:18:12 2008
@@ -43,9 +43,6 @@
 
 local log = require("jive.utils.log").logger("ui")
 
-local EVENT_ACTION           = jive.ui.EVENT_ACTION
-local EVENT_CONSUME          = jive.ui.EVENT_CONSUME
-local EVENT_WINDOW_POP       = jive.ui.EVENT_WINDOW_POP
 local LAYER_FRAME            = jive.ui.LAYER_FRAME
 local LAYER_CONTENT_ON_STAGE = jive.ui.LAYER_CONTENT_ON_STAGE
 
@@ -61,7 +58,7 @@
 local appletManager          = appletManager
 
 
-module(...)
+module(..., Framework.constants)
 oo.class(_M, Applet)
 
 

Modified: 
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/Flickr/FlickrApplet.lua
URL: 
http://svn.slimdevices.com/7.1/trunk/squeezeplay/src/squeezeplay/share/applets/Flickr/FlickrApplet.lua?rev=2309&root=Jive&r1=2308&r2=2309&view=diff
==============================================================================
--- 7.1/trunk/squeezeplay/src/squeezeplay/share/applets/Flickr/FlickrApplet.lua 
(original)
+++ 7.1/trunk/squeezeplay/src/squeezeplay/share/applets/Flickr/FlickrApplet.lua 
Tue Apr 22 05:18:12 2008
@@ -49,21 +49,15 @@
 local debug            = require("jive.utils.debug")
 local log              = 
require("jive.utils.log").logger("applets.screensavers")
 
-local EVENT_KEY_PRESS  = jive.ui.EVENT_KEY_PRESS
-local EVENT_SCROLL     = jive.ui.EVENT_SCROLL
-local EVENT_WINDOW_RESIZE = jive.ui.EVENT_WINDOW_RESIZE
-local EVENT_CONSUME    = jive.ui.EVENT_CONSUME
 local FRAME_RATE       = jive.ui.FRAME_RATE
 local LAYER_FRAME      = jive.ui.LAYER_FRAME
 local LAYER_CONTENT    = jive.ui.LAYER_CONTENT
-local KEY_BACK         = jive.ui.KEY_BACK
-local KEY_GO           = jive.ui.KEY_GO
 
 local jnt              = jnt
 local appletManager    = appletManager
 
 
-module(...)
+module(..., Framework.constants)
 oo.class(_M, Applet)
 
 

Modified: 
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/InfoBrowser/InfoBrowserApplet.lua
URL: 
http://svn.slimdevices.com/7.1/trunk/squeezeplay/src/squeezeplay/share/applets/InfoBrowser/InfoBrowserApplet.lua?rev=2309&root=Jive&r1=2308&r2=2309&view=diff
==============================================================================
--- 
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/InfoBrowser/InfoBrowserApplet.lua
 (original)
+++ 
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/InfoBrowser/InfoBrowserApplet.lua
 Tue Apr 22 05:18:12 2008
@@ -30,17 +30,11 @@
 local Popup         = require("jive.ui.Popup")
 local Timer         = require("jive.ui.Timer")
 
-local EVENT_KEY_PRESS  = jive.ui.EVENT_KEY_PRESS
-local EVENT_CONSUME    = jive.ui.EVENT_CONSUME
-local EVENT_UNUSED     = jive.ui.EVENT_UNUSED
-local KEY_ADD          = jive.ui.KEY_ADD
-local KEY_PLAY         = jive.ui.KEY_PLAY
-
 local log           = require("jive.utils.log").logger("applets.misc")
 local debug         = require("jive.utils.debug")
 
 
-module(...)
+module(..., Framework.constants)
 oo.class(_M, Applet)
 
 

Modified: 
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/LogSettings/LogSettingsApplet.lua
URL: 
http://svn.slimdevices.com/7.1/trunk/squeezeplay/src/squeezeplay/share/applets/LogSettings/LogSettingsApplet.lua?rev=2309&root=Jive&r1=2308&r2=2309&view=diff
==============================================================================
--- 
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/LogSettings/LogSettingsApplet.lua
 (original)
+++ 
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/LogSettings/LogSettingsApplet.lua
 Tue Apr 22 05:18:12 2008
@@ -36,7 +36,7 @@
 local log             = jul.logger("applets.browser")
 
 
-module(...)
+module(..., Framework.constants)
 oo.class(_M, Applet)
 
 

Modified: 
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/MacroPlay/MacroPlayApplet.lua
URL: 
http://svn.slimdevices.com/7.1/trunk/squeezeplay/src/squeezeplay/share/applets/MacroPlay/MacroPlayApplet.lua?rev=2309&root=Jive&r1=2308&r2=2309&view=diff
==============================================================================
--- 
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/MacroPlay/MacroPlayApplet.lua
 (original)
+++ 
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/MacroPlay/MacroPlayApplet.lua
 Tue Apr 22 05:18:12 2008
@@ -39,26 +39,8 @@
 local jive = jive
 
 
-module(...)
+module(..., Framework.constants)
 oo.class(_M, Applet)
-
-
--- Declare as module variables, not locals. This allows visiblity to
--- loaded macro functions using setfenv.
-EVENT_KEY_PRESS           = jive.ui.EVENT_KEY_PRESS
-EVENT_KEY_DOWN            = jive.ui.EVENT_KEY_DOWN
-EVENT_KEY_UP              = jive.ui.EVENT_KEY_UP
-EVENT_KEY_HOLD            = jive.ui.EVENT_KEY_HOLD
-EVENT_SCROLL              = jive.ui.EVENT_SCROLL
-EVENT_CONSUME             = jive.ui.EVENT_CONSUME
-EVENT_ACTION              = jive.ui.EVENT_ACTION
-EVENT_WINDOW_POP          = jive.ui.EVENT_WINDOW_POP
-
-KEY_BACK                  = jive.ui.KEY_BACK
-KEY_DOWN                  = jive.ui.KEY_DOWN
-KEY_HOME                  = jive.ui.KEY_HOME
-KEY_GO                    = jive.ui.KEY_GO
-KEY_PLAY                  = jive.ui.KEY_PLAY
 
 
 -- macro (global) state

Modified: 
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/NowPlaying/NowPlayingApplet.lua
URL: 
http://svn.slimdevices.com/7.1/trunk/squeezeplay/src/squeezeplay/share/applets/NowPlaying/NowPlayingApplet.lua?rev=2309&root=Jive&r1=2308&r2=2309&view=diff
==============================================================================
--- 
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/NowPlaying/NowPlayingApplet.lua
 (original)
+++ 
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/NowPlaying/NowPlayingApplet.lua
 Tue Apr 22 05:18:12 2008
@@ -37,37 +37,10 @@
 local LAYOUT_CENTER          = jive.ui.LAYOUT_CENTER
 local LAYOUT_NONE            = jive.ui.LAYOUT_NONE
 
-local EVENT_KEY_ALL          = jive.ui.EVENT_KEY_ALL
-local EVENT_KEY_DOWN         = jive.ui.EVENT_KEY_DOWN
-local EVENT_KEY_UP           = jive.ui.EVENT_KEY_UP
-local EVENT_KEY_PRESS        = jive.ui.EVENT_KEY_PRESS
-local EVENT_KEY_HOLD         = jive.ui.EVENT_KEY_HOLD
-local EVENT_SCROLL           = jive.ui.EVENT_SCROLL
-local EVENT_CONSUME          = jive.ui.EVENT_CONSUME
-local EVENT_UNUSED           = jive.ui.EVENT_UNUSED
-local EVENT_ACTION           = jive.ui.EVENT_ACTION
-local EVENT_FOCUS_GAINED     = jive.ui.EVENT_FOCUS_GAINED
-local EVENT_FOCUS_LOST       = jive.ui.EVENT_FOCUS_LOST
-local EVENT_WINDOW_POP       = jive.ui.EVENT_WINDOW_POP
-local EVENT_WINDOW_INACTIVE  = jive.ui.EVENT_WINDOW_INACTIVE
-local EVENT_WINDOW_ACTIVE    = jive.ui.EVENT_WINDOW_ACTIVE
-local EVENT_HIDE             = jive.ui.EVENT_HIDE
-local EVENT_SHOW             = jive.ui.EVENT_SHOW
-local KEY_GO                 = jive.ui.KEY_GO
-local KEY_FWD                = jive.ui.KEY_FWD
-local KEY_REW                = jive.ui.KEY_REW
-local KEY_HOME               = jive.ui.KEY_HOME
-local KEY_PLAY               = jive.ui.KEY_PLAY
-local KEY_ADD                = jive.ui.KEY_ADD
-local KEY_BACK               = jive.ui.KEY_BACK
-local KEY_PAUSE              = jive.ui.KEY_PAUSE
-local KEY_VOLUME_DOWN        = jive.ui.KEY_VOLUME_DOWN
-local KEY_VOLUME_UP          = jive.ui.KEY_VOLUME_UP
-
 local jiveMain               = jiveMain
 local jnt                    = jnt
 
-module(...)
+module(..., Framework.constants)
 oo.class(_M, Applet)
 
 local ARTWORK_SIZE = 154

Modified: 
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/ScreenSavers/ScreenSaversApplet.lua
URL: 
http://svn.slimdevices.com/7.1/trunk/squeezeplay/src/squeezeplay/share/applets/ScreenSavers/ScreenSaversApplet.lua?rev=2309&root=Jive&r1=2308&r2=2309&view=diff
==============================================================================
--- 
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/ScreenSavers/ScreenSaversApplet.lua
 (original)
+++ 
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/ScreenSavers/ScreenSaversApplet.lua
 Tue Apr 22 05:18:12 2008
@@ -40,25 +40,11 @@
 local log              = 
require("jive.utils.log").logger("applets.screensavers")
 
 local appletManager    = appletManager
-local EVENT_KEY_PRESS  = jive.ui.EVENT_KEY_PRESS
-local EVENT_KEY_HOLD   = jive.ui.EVENT_KEY_HOLD 
-local EVENT_SCROLL     = jive.ui.EVENT_SCROLL
-local EVENT_MOTION     = jive.ui.EVENT_MOTION
-local EVENT_CONSUME    = jive.ui.EVENT_CONSUME
-local EVENT_ACTION     = jive.ui.EVENT_ACTION
-local EVENT_WINDOW_POP = jive.ui.EVENT_WINDOW_POP
-local EVENT_WINDOW_PUSH = jive.ui.EVENT_WINDOW_PUSH
-local EVENT_WINDOW_INACTIVE = jive.ui.EVENT_WINDOW_INACTIVE
-local EVENT_UNUSED     = jive.ui.EVENT_UNUSED
-local KEY_PLAY         = jive.ui.KEY_PLAY
-local KEY_GO           = jive.ui.KEY_GO
-local KEY_LEFT         = jive.ui.KEY_LEFT
-local KEY_HOME         = jive.ui.KEY_HOME
 
 local jnt = jnt
 
 
-module(...)
+module(..., Framework.constants)
 oo.class(_M, Applet)
 
 

Modified: 
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/Screenshot/ScreenshotApplet.lua
URL: 
http://svn.slimdevices.com/7.1/trunk/squeezeplay/src/squeezeplay/share/applets/Screenshot/ScreenshotApplet.lua?rev=2309&root=Jive&r1=2308&r2=2309&view=diff
==============================================================================
--- 
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/Screenshot/ScreenshotApplet.lua
 (original)
+++ 
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/Screenshot/ScreenshotApplet.lua
 Tue Apr 22 05:18:12 2008
@@ -29,15 +29,10 @@
 local log              = require("jive.utils.log").logger("applets.misc")
 
 
-local EVENT_KEY_HOLD   = jive.ui.EVENT_KEY_HOLD
-local EVENT_CONSUME    = jive.ui.EVENT_CONSUME
-local EVENT_UNUSED     = jive.ui.EVENT_UNUSED
-local KEY_REW          = jive.ui.KEY_REW
-local KEY_PAUSE        = jive.ui.KEY_PAUSE
 local JIVE_LAYER_ALL   = jive.ui.JIVE_LAYER_ALL
 
 
-module(...)
+module(..., Framework.constants)
 oo.class(_M, Applet)
 
 

Modified: 
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SelectPlayer/SelectPlayerApplet.lua
URL: 
http://svn.slimdevices.com/7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SelectPlayer/SelectPlayerApplet.lua?rev=2309&root=Jive&r1=2308&r2=2309&view=diff
==============================================================================
--- 
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SelectPlayer/SelectPlayerApplet.lua
 (original)
+++ 
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SelectPlayer/SelectPlayerApplet.lua
 Tue Apr 22 05:18:12 2008
@@ -46,14 +46,10 @@
 local jiveMain           = jiveMain
 local appletManager      = appletManager
 
-local EVENT_WINDOW_POP = jive.ui.EVENT_WINDOW_POP
-local EVENT_WINDOW_ACTIVE = jive.ui.EVENT_WINDOW_ACTIVE
-local EVENT_WINDOW_INACTIVE = jive.ui.EVENT_WINDOW_INACTIVE
-
 -- load SetupWallpaper for use in previewing Wallpapers
 local SetupWallpaper = AppletManager:loadApplet("SetupWallpaper")
 
-module(...)
+module(..., Framework.constants)
 oo.class(_M, Applet)
 
 

Modified: 
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SetupDateTime/SetupDateTimeApplet.lua
URL: 
http://svn.slimdevices.com/7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SetupDateTime/SetupDateTimeApplet.lua?rev=2309&root=Jive&r1=2308&r2=2309&view=diff
==============================================================================
--- 
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SetupDateTime/SetupDateTimeApplet.lua
 (original)
+++ 
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SetupDateTime/SetupDateTimeApplet.lua
 Tue Apr 22 05:18:12 2008
@@ -38,16 +38,10 @@
 local table            = require("jive.utils.table")
 
 local appletManager    = appletManager
-local EVENT_KEY_PRESS  = jive.ui.EVENT_KEY_PRESS
-local EVENT_SCROLL     = jive.ui.EVENT_SCROLL
-local EVENT_CONSUME    = jive.ui.EVENT_CONSUME
-local EVENT_ACTION     = jive.ui.EVENT_ACTION
-local EVENT_WINDOW_POP = jive.ui.EVENT_WINDOW_POP
-local KEY_PLAY         = jive.ui.KEY_PLAY
 
 local datetimeTitleStyle = 'settingstitle'
 
-module(...)
+module(..., Framework.constants)
 oo.class(_M, Applet)
 
 function settingsShow(self, menuItem)

Modified: 
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SetupLanguage/SetupLanguageApplet.lua
URL: 
http://svn.slimdevices.com/7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SetupLanguage/SetupLanguageApplet.lua?rev=2309&root=Jive&r1=2308&r2=2309&view=diff
==============================================================================
--- 
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SetupLanguage/SetupLanguageApplet.lua
 (original)
+++ 
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SetupLanguage/SetupLanguageApplet.lua
 Tue Apr 22 05:18:12 2008
@@ -41,18 +41,9 @@
 local debug            = require("jive.utils.debug")
 
 local appletManager    = appletManager
-local EVENT_ALL_INPUT  = jive.ui.EVENT_ALL_INPUT
-local EVENT_KEY_PRESS  = jive.ui.EVENT_KEY_PRESS
-local EVENT_SCROLL     = jive.ui.EVENT_SCROLL
-local EVENT_CONSUME    = jive.ui.EVENT_CONSUME
-local EVENT_ACTION     = jive.ui.EVENT_ACTION
-local EVENT_WINDOW_POP = jive.ui.EVENT_WINDOW_POP
-local EVENT_WINDOW_INACTIVE = jive.ui.EVENT_WINDOW_INACTIVE
-local KEY_PLAY         = jive.ui.KEY_PLAY
-
 local jiveMain         = jiveMain
 
-module(...)
+module(..., Framework.constants)
 oo.class(_M, Applet)
 
 

Modified: 
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SetupWallpaper/SetupWallpaperApplet.lua
URL: 
http://svn.slimdevices.com/7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SetupWallpaper/SetupWallpaperApplet.lua?rev=2309&root=Jive&r1=2308&r2=2309&view=diff
==============================================================================
--- 
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SetupWallpaper/SetupWallpaperApplet.lua
 (original)
+++ 
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SetupWallpaper/SetupWallpaperApplet.lua
 Tue Apr 22 05:18:12 2008
@@ -46,13 +46,9 @@
 local log                    = 
require("jive.utils.log").logger("applets.setup")
 local debug                  = require("jive.utils.debug")
 
-local EVENT_FOCUS_GAINED     = jive.ui.EVENT_FOCUS_GAINED
-local EVENT_FOCUS_LOST       = jive.ui.EVENT_FOCUS_LOST
-local EVENT_WINDOW_POP       = jive.ui.EVENT_WINDOW_POP
-
 local jnt                    = jnt
 
-module(...)
+module(..., Framework.constants)
 oo.class(_M, Applet)
 
 

Modified: 
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SlimBrowser/SlimBrowserApplet.lua
URL: 
http://svn.slimdevices.com/7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SlimBrowser/SlimBrowserApplet.lua?rev=2309&root=Jive&r1=2308&r2=2309&view=diff
==============================================================================
--- 
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SlimBrowser/SlimBrowserApplet.lua
 (original)
+++ 
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SlimBrowser/SlimBrowserApplet.lua
 Tue Apr 22 05:18:12 2008
@@ -57,41 +57,13 @@
 local log                    = 
require("jive.utils.log").logger("player.browse")
 local logd                   = 
require("jive.utils.log").logger("player.browse.data")
 
-                             
-local EVENT_KEY_ALL          = jive.ui.EVENT_KEY_ALL
-local EVENT_KEY_DOWN         = jive.ui.EVENT_KEY_DOWN
-local EVENT_KEY_UP           = jive.ui.EVENT_KEY_UP
-local EVENT_KEY_PRESS        = jive.ui.EVENT_KEY_PRESS
-local EVENT_KEY_HOLD         = jive.ui.EVENT_KEY_HOLD
-local EVENT_SCROLL           = jive.ui.EVENT_SCROLL
-local EVENT_CONSUME          = jive.ui.EVENT_CONSUME
-local EVENT_UNUSED           = jive.ui.EVENT_UNUSED
-local EVENT_ACTION           = jive.ui.EVENT_ACTION
-local EVENT_FOCUS_GAINED     = jive.ui.EVENT_FOCUS_GAINED
-local EVENT_FOCUS_LOST       = jive.ui.EVENT_FOCUS_LOST
-local EVENT_WINDOW_POP       = jive.ui.EVENT_WINDOW_POP
-local EVENT_WINDOW_INACTIVE  = jive.ui.EVENT_WINDOW_INACTIVE
-local EVENT_WINDOW_ACTIVE    = jive.ui.EVENT_WINDOW_ACTIVE
-local EVENT_HIDE             = jive.ui.EVENT_HIDE
-local EVENT_SHOW             = jive.ui.EVENT_SHOW
-local KEY_FWD                = jive.ui.KEY_FWD
-local KEY_REW                = jive.ui.KEY_REW
-local KEY_HOME               = jive.ui.KEY_HOME
-local KEY_PLAY               = jive.ui.KEY_PLAY
-local KEY_ADD                = jive.ui.KEY_ADD
-local KEY_BACK               = jive.ui.KEY_BACK
-local KEY_PAUSE              = jive.ui.KEY_PAUSE
-local KEY_VOLUME_DOWN        = jive.ui.KEY_VOLUME_DOWN
-local KEY_VOLUME_UP          = jive.ui.KEY_VOLUME_UP
-local KEY_GO                 = jive.ui.KEY_GO
-
 local jiveMain               = jiveMain
 local appletManager          = appletManager
 local iconbar                = iconbar
 local jnt                    = jnt
 
 
-module(...)
+module(..., Framework.constants)
 oo.class(_M, Applet)
 
 

Modified: 
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SqueezeNetworkPIN/SqueezeNetworkPINApplet.lua
URL: 
http://svn.slimdevices.com/7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SqueezeNetworkPIN/SqueezeNetworkPINApplet.lua?rev=2309&root=Jive&r1=2308&r2=2309&view=diff
==============================================================================
--- 
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SqueezeNetworkPIN/SqueezeNetworkPINApplet.lua
 (original)
+++ 
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SqueezeNetworkPIN/SqueezeNetworkPINApplet.lua
 Tue Apr 22 05:18:12 2008
@@ -22,10 +22,7 @@
 
 local jnt                    = jnt
 
-local EVENT_KEY_PRESS        = jive.ui.EVENT_KEY_PRESS
-local EVENT_CONSUME          = jive.ui.EVENT_CONSUME
-
-module(...)
+module(..., Framework.constants)
 oo.class(_M, Applet)
 
 

Modified: 7.1/trunk/squeezeplay/src/squeezeplay/share/jive/ui/Framework.lua
URL: 
http://svn.slimdevices.com/7.1/trunk/squeezeplay/src/squeezeplay/share/jive/ui/Framework.lua?rev=2309&root=Jive&r1=2308&r2=2309&view=diff
==============================================================================
--- 7.1/trunk/squeezeplay/src/squeezeplay/share/jive/ui/Framework.lua (original)
+++ 7.1/trunk/squeezeplay/src/squeezeplay/share/jive/ui/Framework.lua Tue Apr 
22 05:18:12 2008
@@ -157,6 +157,60 @@
 --]]
 
 
+--[[
+
+=head2 jive.ui.Framework:constants()
+
+Import constants into a module.
+
+=cut
+--]]
+function constants(module)
+       module.EVENT_SCROLL = jive.ui.EVENT_SCROLL
+       module.EVENT_ACTION = jive.ui.EVENT_ACTION
+       module.EVENT_KEY_DOWN = jive.ui.EVENT_KEY_DOWN
+       module.EVENT_KEY_UP = jive.ui.EVENT_KEY_UP
+       module.EVENT_KEY_PRESS = jive.ui.EVENT_KEY_PRESS
+       module.EVENT_KEY_HOLD = jive.ui.EVENT_KEY_HOLD
+       module.EVENT_MOUSE_DOWN = jive.ui.EVENT_MOUSE_DOWN
+       module.EVENT_MOUSE_UP = jive.ui.EVENT_MOUSE_UP
+       module.EVENT_MOUSE_PRESS = jive.ui.EVENT_MOUSE_PRESS
+       module.EVENT_MOUSE_HOLD = jive.ui.EVENT_MOUSE_HOLD
+       module.EVENT_WINDOW_PUSH = jive.ui.EVENT_WINDOW_PUSH
+       module.EVENT_WINDOW_POP = jive.ui.EVENT_WINDOW_POP
+       module.EVENT_WINDOW_ACTIVE = jive.ui.EVENT_WINDOW_ACTIVE
+       module.EVENT_WINDOW_INACTIVE = jive.ui.EVENT_WINDOW_INACTIVE
+       module.EVENT_SHOW = jive.ui.EVENT_SHOW 
+       module.EVENT_HIDE = jive.ui.EVENT_HIDE
+       module.EVENT_FOCUS_GAINED = jive.ui.EVENT_FOCUS_GAINED
+       module.EVENT_FOCUS_LOST = jive.ui.EVENT_FOCUS_LOST
+       module.EVENT_WINDOW_RESIZE = jive.ui.EVENT_WINDOW_RESIZE
+       module.EVENT_SWITCH = jive.ui.EVENT_SWITCH
+       module.EVENT_MOTION = jive.ui.EVENT_MOTION
+       module.EVENT_KEY_ALL = jive.ui.EVENT_KEY_ALL
+       module.EVENT_MOUSE_ALL = jive.ui.EVENT_MOUSE_ALL
+       module.EVENT_ALL_INPUT = jive.ui.EVENT_ALL_INPUT
+       module.EVENT_VISIBLE_ALL = jive.ui.EVENT_VISIBLE_ALL
+       module.EVENT_ALL = jive.ui.EVENT_ALL
+
+       module.KEY_NONE = jive.ui.KEY_NONE
+       module.KEY_GO = jive.ui.KEY_GO
+       module.KEY_BACK = jive.ui.KEY_BACK
+       module.KEY_UP = jive.ui.KEY_UP
+       module.KEY_DOWN = jive.ui.KEY_DOWN
+       module.KEY_LEFT = jive.ui.KEY_LEFT
+       module.KEY_RIGHT = jive.ui.KEY_RIGHT
+       module.KEY_HOME = jive.ui.KEY_HOME
+       module.KEY_PLAY = jive.ui.KEY_PLAY
+       module.KEY_ADD = jive.ui.KEY_ADD
+       module.KEY_PAUSE = jive.ui.KEY_PAUSE
+       module.KEY_REW = jive.ui.KEY_REW
+       module.KEY_FWD = jive.ui.KEY_FWD 
+       module.KEY_VOLUME_UP = jive.ui.KEY_VOLUME_UP
+       module.KEY_VOLUME_DOWN = jive.ui.KEY_VOLUME_DOWN
+end
+
+
 
 --[[
 

Modified: 7.1/trunk/squeezeplay/src/squeezeplay/share/jive/ui/Menu.lua
URL: 
http://svn.slimdevices.com/7.1/trunk/squeezeplay/src/squeezeplay/share/jive/ui/Menu.lua?rev=2309&root=Jive&r1=2308&r2=2309&view=diff
==============================================================================
--- 7.1/trunk/squeezeplay/src/squeezeplay/share/jive/ui/Menu.lua (original)
+++ 7.1/trunk/squeezeplay/src/squeezeplay/share/jive/ui/Menu.lua Tue Apr 22 
05:18:12 2008
@@ -52,7 +52,8 @@
 local log                  = require("jive.utils.log").logger("ui")
 
 local math                 = require("math")
-                           
+
+
 local EVENT_ALL            = jive.ui.EVENT_ALL
 local EVENT_ACTION         = jive.ui.EVENT_ACTION
 local EVENT_SCROLL         = jive.ui.EVENT_SCROLL

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

Reply via email to