Author: bklaas
Date: Thu Jan 17 13:37:15 2008
New Revision: 1490

URL: http://svn.slimdevices.com?rev=1490&root=Jive&view=rev
Log:
Bug: 5523
Description: changes necessary to support the clear playlist and save playlist 
items in the playlist

allow for a 3rd "special case" nextWindow destination, the playlist page
allow for a custom window transition to be sent to NowPlaying.openScreensaver()

some clean up of unnecessary function args

Modified:
    trunk/jive/src/pkg/jive/share/applets/NowPlaying/NowPlayingApplet.lua
    trunk/jive/src/pkg/jive/share/applets/SlimBrowser/SlimBrowserApplet.lua

Modified: trunk/jive/src/pkg/jive/share/applets/NowPlaying/NowPlayingApplet.lua
URL: 
http://svn.slimdevices.com/trunk/jive/src/pkg/jive/share/applets/NowPlaying/NowPlayingApplet.lua?rev=1490&root=Jive&r1=1489&r2=1490&view=diff
==============================================================================
--- trunk/jive/src/pkg/jive/share/applets/NowPlaying/NowPlayingApplet.lua 
(original)
+++ trunk/jive/src/pkg/jive/share/applets/NowPlaying/NowPlayingApplet.lua Thu 
Jan 17 13:37:15 2008
@@ -555,7 +555,7 @@
 end
 
 
-function openScreensaver(self, style)
+function openScreensaver(self, style, transition)
 
        -- an empty item_loop means an empty playlist
        if not self.player 
@@ -587,7 +587,10 @@
        self.player = discovery:getCurrentPlayer()
 
        local transitionOn
-       if style == 'ss' then
+       if transition then
+               transitionOn = transition
+               log:warn(transitionOn)
+       elseif style == 'ss' then
                transitionOn = Window.transitionFadeIn
        elseif style == 'browse' then
                transitionOn = Window.transitionPushLeft

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=1490&root=Jive&r1=1489&r2=1490&view=diff
==============================================================================
--- trunk/jive/src/pkg/jive/share/applets/SlimBrowser/SlimBrowserApplet.lua 
(original)
+++ trunk/jive/src/pkg/jive/share/applets/SlimBrowser/SlimBrowserApplet.lua Thu 
Jan 17 13:37:15 2008
@@ -666,15 +666,22 @@
 
 -- _goNowPlaying
 -- pushes next window to the NowPlaying window
-local function _goNowPlaying(chunk, err)
+local function _goNowPlaying(transition)
        Framework:playSound("WINDOWSHOW")
        local NowPlaying = AppletManager:loadApplet("NowPlaying")
-       NowPlaying:openScreensaver('browse')
+       NowPlaying:openScreensaver('browse', transition)
+end
+
+-- _goPlaylist
+-- pushes next window to the Playlist window
+local function _goPlaylist()
+       Framework:playSound("WINDOWSHOW")
+       showPlaylist()
 end
 
 -- _goHome
 -- pushes the home window to the top
-local function _goHome(chunk, err)
+local function _goHome()
        local windowStack = Framework.windowStack
        Framework:playSound("JUMP")
        while #windowStack > 1 do
@@ -840,6 +847,8 @@
                                                        if v.nextWindow then
                                                                if v.nextWindow 
== 'home' then
                                                                        sink = 
_goHome
+                                                               elseif 
v.nextWindow == 'playlist' then
+                                                                       sink = 
_goPlaylist
                                                                elseif 
v.nextWindow == 'nowPlaying' then
                                                                        sink = 
_goNowPlaying
                                                                end
@@ -1179,6 +1188,8 @@
                                -- cover all our "special cases" first, custom 
navigation, artwork popup, etc.
                                if item['nextWindow'] == 'nowPlaying' then
                                        sink = _goNowPlaying
+                               elseif item['nextWindow'] == 'playlist' then
+                                       sink = _goPlaylist
                                elseif item['nextWindow'] == 'home' then
                                        sink = _goHome
                                elseif item["showBigArtwork"] then
@@ -1688,6 +1699,18 @@
                        _statusStep.menu:_updateWidgets()
                end
        
+               _statusStep.window:addListener(EVENT_KEY_PRESS,
+                       function(event)
+                               local evtCode = event:getKeycode()
+                               if evtCode == KEY_BACK then
+                                       --FIXME window transition is wrong here
+                                       
_goNowPlaying(Window.transitionPushRight)
+                                       return EVENT_CONSUME
+                               end
+                       end
+               )
+
+       
                return EVENT_CONSUME
        end
        return EVENT_UNUSED

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

Reply via email to