Author: bklaas
Date: Mon Jan 21 13:37:22 2008
New Revision: 1544
URL: http://svn.slimdevices.com?rev=1544&root=Jive&view=rev
Log:
Bug: 6124
Description:
add style albumitemNoAction to support single 'nothing' item sent from SC when
playlist is empty
query playerStatus.playlist_tracks for playlist size in NowPlaying to determine
whether to push back to SlimBrowser
set title in SlimBrowser to token NOW_PLAYING when playlist is empty
Modified:
branches/7.0/jive/src/pkg/jive/share/applets/DefaultSkin/DefaultSkinApplet.lua
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/DefaultSkin/DefaultSkinApplet.lua
URL:
http://svn.slimdevices.com/branches/7.0/jive/src/pkg/jive/share/applets/DefaultSkin/DefaultSkinApplet.lua?rev=1544&root=Jive&r1=1543&r2=1544&view=diff
==============================================================================
---
branches/7.0/jive/src/pkg/jive/share/applets/DefaultSkin/DefaultSkinApplet.lua
(original)
+++
branches/7.0/jive/src/pkg/jive/share/applets/DefaultSkin/DefaultSkinApplet.lua
Mon Jan 21 13:37:22 2008
@@ -960,6 +960,10 @@
s.albumitem.icon.img = Surface:loadImage(imgpath ..
"menu_album_noartwork.png")
s.albumitem.icon.padding = { 8, 0, 0, 0 }
+ s.albumitemNoAction = _uses(s.albumitem, {
+ order = { 'text' }
+ })
+ s.selected.albumitemNoAction = _uses(s.albumitemNoAction)
-- selected item with artwork and song info
s.selected.albumitem = {}
@@ -967,6 +971,7 @@
s.selected.albumitem.text.fg = SELECT_COLOR
s.selected.albumitem.text.sh = SELECT_SH_COLOR
s.selected.albumitem.bgImg = albumSelectionBox
+
-- locked item with artwork and song info
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=1544&root=Jive&r1=1543&r2=1544&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 21 13:37:22 2008
@@ -560,10 +560,11 @@
function openScreensaver(self, style, transition)
- -- an empty item_loop means an empty playlist
+ -- playlist_tracks needs to be > 0 or else defer back to SlimBrowser
if not self.player
or not self.player.playerStatus
- or not self.player.playerStatus.item_loop then
+ or not self.player.playerStatus.playlist_tracks
+ or self.player.playerStatus.playlist_tracks ==
0 then
local browser = appletManager:getAppletInstance("SlimBrowser")
browser:showPlaylist()
return
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=1544&root=Jive&r1=1543&r2=1544&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 21 13:37:22 2008
@@ -1381,8 +1381,10 @@
style = "albumcurrent"
elseif item and item["style"] then
style = item["style"]
- end
-
+log:warn(style)
+ end
+
+log:warn(style)
widgets[widgetIndex] = _decoratedLabel(widget, style,
item, db, menuAccel)
end
end
@@ -1690,10 +1692,14 @@
-- current playlist should select currently playing item
-- if there is only one item in the playlist, bring the
selected item to top
local playlistSize = _safeDeref(_player, 'playerStatus',
'playlist_tracks')
- if playlistSize == 1 then
+ if playlistSize == 0 then
+
_statusStep.window:setTitle(_string("SLIMBROWSER_NOW_PLAYING"))
+ end
+
+ if playlistSize <= 1 then
_statusStep.menu["_lastSelectedIndex"] = 1
_statusStep.menu["_lastSelectedOffset"] = 1
- _statusStep.menu.selected = 1
+ _statusStep.menu.selected = 1
_statusStep.menu:_updateWidgets()
-- otherwise bring the currently playing item to the screen
with offset of 2
elseif _statusStep.menu.list.currentIndex then
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive-checkins