Author: titmuss
Date: Fri Feb 1 15:23:11 2008
New Revision: 1761
URL: http://svn.slimdevices.com?rev=1761&root=Jive&view=rev
Log:
[EMAIL PROTECTED] (orig r1758): bklaas | 2008-02-01 22:43:20 +0000
Bug: 5761
Description:
add new local function _goNow that is for directives sent to slimbrowser to
immediately go to a special window
add hooks for this function sent as browse data
refactor _goNowPlaying and goHome calls to use _goNow()
Modified:
trunk/ (props changed)
trunk/jive/src/pkg/jive/share/applets/SlimBrowser/SlimBrowserApplet.lua
Propchange: trunk/
------------------------------------------------------------------------------
--- svk:merge (original)
+++ svk:merge Fri Feb 1 15:23:11 2008
@@ -1,3 +1,3 @@
-bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/7.0:1757
+bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/7.0:1758
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/SN:1083
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/scrolling:1378
Modified:
trunk/jive/src/pkg/jive/share/applets/SlimBrowser/SlimBrowserApplet.lua
URL:
http://svn.slimdevices.com/trunk/jive/src/pkg/jive/share/applets/SlimBrowser/SlimBrowserApplet.lua?rev=1761&root=Jive&r1=1760&r2=1761&view=diff
==============================================================================
--- trunk/jive/src/pkg/jive/share/applets/SlimBrowser/SlimBrowserApplet.lua
(original)
+++ trunk/jive/src/pkg/jive/share/applets/SlimBrowser/SlimBrowserApplet.lua Fri
Feb 1 15:23:11 2008
@@ -590,6 +590,9 @@
-- _goNowPlaying
-- pushes next window to the NowPlaying window
local function _goNowPlaying(transition)
+ if not transition then
+ transition = Window.transitionPushRight
+ end
Framework:playSound("WINDOWSHOW")
local NowPlaying = AppletManager:loadApplet("NowPlaying")
NowPlaying:openScreensaver('browse', transition)
@@ -610,6 +613,22 @@
log:debug(chunk)
end
+-- _goNow
+-- go immediately to a particular destination
+local function _goNow(destination, transition, step)
+ if not transition then
+ transition = Window.transitionPushRight
+ end
+ if destination == 'nowPlaying' then
+ _goNowPlaying(transition)
+ elseif destination == 'home' then
+ goHome()
+ elseif destination == 'playlist' then
+ _goPlaylist()
+ elseif destination == 'parent' and step and step.window then
+ _hideMe(step)
+ end
+end
-- _browseSink
-- sink that sets the data for our go action
@@ -641,6 +660,9 @@
debug.dump(chunk, 8)
end
+ if step.window and data and data.goNow then
+ _goNow(data.goNow)
+ end
if step.window and data and data.window and
data.window.textArea then
if step.menu then
step.window:removeWidget(step.menu)
@@ -871,9 +893,9 @@
-- are we in home?
if #windowStack > 1 then
- goHome()
+ _goNow('home')
else
- _goNowPlaying()
+ _goNow('nowPlaying', Window.transitionPushLeft)
end
return EVENT_CONSUME
@@ -1656,7 +1678,7 @@
function(event)
local evtCode = event:getKeycode()
if evtCode == KEY_BACK then
- _goNowPlaying(Window.transitionPushRight)
+ _goNow('nowPlaying')
return EVENT_CONSUME
end
end
@@ -1741,9 +1763,9 @@
-- if this window is #2 on the stack
there is no NowPlaying window
-- (e.g., when playlist is empty)
if #windowStack == 2 then
- goHome()
+ _goNow('home')
else
-
_goNowPlaying(Window.transitionPushRight)
+ _goNow('nowPlaying')
end
return EVENT_CONSUME
end
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive-checkins