Author: bklaas
Date: Mon Jan 28 15:42:10 2008
New Revision: 1667

URL: http://svn.slimdevices.com?rev=1667&root=Jive&view=rev
Log:
Bug: 5705
Description: allow Now Playing to enter an empty playlist menu that says "Off" 
when the player is off

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

Modified: 
branches/7.0/jive/src/pkg/jive/share/applets/NowPlaying/NowPlayingApplet.lua
URL: 
http://svn.slimdevices.com/branches/7.0/jive/src/pkg/jive/share/applets/NowPlaying/NowPlayingApplet.lua?rev=1667&root=Jive&r1=1666&r2=1667&view=diff
==============================================================================
--- 
branches/7.0/jive/src/pkg/jive/share/applets/NowPlaying/NowPlayingApplet.lua 
(original)
+++ 
branches/7.0/jive/src/pkg/jive/share/applets/NowPlaying/NowPlayingApplet.lua 
Mon Jan 28 15:42:10 2008
@@ -358,7 +358,7 @@
 
 function _updatePlaylist(self, enabled, nr, count, ws)
        if not ws then ws = self[windowStyle] end
-       if enabled == true and count > 1 then
+       if enabled == true and count and count > 1 then
                nr = nr + 1
                ws.titleGroup:setWidgetValue("playlist", 
self:string("SCREENSAVER_NOWPLAYING_OF", nr, count))
        else 

Modified: 
branches/7.0/jive/src/pkg/jive/share/applets/SlimBrowser/SlimBrowserApplet.lua
URL: 
http://svn.slimdevices.com/branches/7.0/jive/src/pkg/jive/share/applets/SlimBrowser/SlimBrowserApplet.lua?rev=1667&root=Jive&r1=1666&r2=1667&view=diff
==============================================================================
--- 
branches/7.0/jive/src/pkg/jive/share/applets/SlimBrowser/SlimBrowserApplet.lua 
(original)
+++ 
branches/7.0/jive/src/pkg/jive/share/applets/SlimBrowser/SlimBrowserApplet.lua 
Mon Jan 28 15:42:10 2008
@@ -1674,7 +1674,7 @@
                        
_statusStep.window:setTitle(_string("SLIMBROWSER_NOW_PLAYING"))
                end
 
-               if playlistSize <= 1 then
+               if playlistSize == nil or (playlistSize and playlistSize <= 1) 
then
                        _statusStep.menu["_lastSelectedIndex"] = 1
                        _statusStep.menu["_lastSelectedOffset"] = 1 
                        _statusStep.menu.selected = 1 
@@ -1761,7 +1761,11 @@
        local step = _statusStep
 
        step.db:updateStatus(playerStatus)
-       step.menu:setSelectedIndex(step.db:playlistIndex())
+       if step.db:playlistIndex() then
+               step.menu:setSelectedIndex(step.db:playlistIndex())
+       else
+               step.menu:setSelectedIndex(1)
+       end
        step.menu:reLayout()
 
         -- does the playlist need loading?

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

Reply via email to