Author: bklaas
Date: Tue Oct 28 21:35:47 2008
New Revision: 3224

URL: http://svn.slimdevices.com?rev=3224&root=Jive&view=rev
Log:
Bug: 8878
Description: add playlistMode iconbar support.
Add (unofficial) playlistMode icon for iconbar (needs a refresh from Noah).
process playerstatus to update playlistMode icon accordingly.

Added:
    
7.3/trunk/squeezeplay/src/squeezeplay/share/applets/DefaultSkin/images/icon_playlistMode_on.png
   (with props)
Modified:
    
7.3/trunk/squeezeplay/src/squeezeplay/share/applets/DefaultSkin/DefaultSkinApplet.lua
    7.3/trunk/squeezeplay/src/squeezeplay/share/jive/Iconbar.lua
    7.3/trunk/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua

Modified: 
7.3/trunk/squeezeplay/src/squeezeplay/share/applets/DefaultSkin/DefaultSkinApplet.lua
URL: 
http://svn.slimdevices.com/7.3/trunk/squeezeplay/src/squeezeplay/share/applets/DefaultSkin/DefaultSkinApplet.lua?rev=3224&root=Jive&r1=3223&r2=3224&view=diff
==============================================================================
--- 
7.3/trunk/squeezeplay/src/squeezeplay/share/applets/DefaultSkin/DefaultSkinApplet.lua
 (original)
+++ 
7.3/trunk/squeezeplay/src/squeezeplay/share/applets/DefaultSkin/DefaultSkinApplet.lua
 Tue Oct 28 21:35:47 2008
@@ -292,6 +292,14 @@
        s.iconRepeat0 = _icon(41, screenHeight - 30, "icon_repeat_off.png")
        s.iconRepeat1 = _icon(41, screenHeight - 30, "icon_repeat_song.png")
        s.iconRepeat2 = _icon(41, screenHeight - 30, "icon_repeat.png")
+
+       -- repeat off/repeat track/repeat playlist
+       s.iconPlaylistModeOFF = _icon(41, screenHeight - 30, 
"icon_repeat_off.png")
+       s.iconPlaylistMode0 = _icon(41, screenHeight - 30, 
"icon_repeat_off.png")
+
+       -- FIXME, needs official artwork
+       s.iconPlaylistMode1 = _icon(41, screenHeight - 30, 
"icon_playlistMode_on.png")
+       s.iconPlaylistMode2 = _icon(41, screenHeight - 30, "icon_repeat.png")
 
        -- shuffle off/shuffle album/shuffle playlist
        s.iconShuffleOFF = _icon(75, screenHeight - 30, "icon_shuffle_off.png")

Added: 
7.3/trunk/squeezeplay/src/squeezeplay/share/applets/DefaultSkin/images/icon_playlistMode_on.png
URL: 
http://svn.slimdevices.com/7.3/trunk/squeezeplay/src/squeezeplay/share/applets/DefaultSkin/images/icon_playlistMode_on.png?rev=3224&root=Jive&view=auto
==============================================================================
Binary file - no diff available.

Propchange: 
7.3/trunk/squeezeplay/src/squeezeplay/share/applets/DefaultSkin/images/icon_playlistMode_on.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: 7.3/trunk/squeezeplay/src/squeezeplay/share/jive/Iconbar.lua
URL: 
http://svn.slimdevices.com/7.3/trunk/squeezeplay/src/squeezeplay/share/jive/Iconbar.lua?rev=3224&root=Jive&r1=3223&r2=3224&view=diff
==============================================================================
--- 7.3/trunk/squeezeplay/src/squeezeplay/share/jive/Iconbar.lua (original)
+++ 7.3/trunk/squeezeplay/src/squeezeplay/share/jive/Iconbar.lua Tue Oct 28 
21:35:47 2008
@@ -55,6 +55,21 @@
 function setPlaymode(self, val)
        log:debug("Iconbar:setPlaymode(", val, ")")
        self.iconPlaymode:setStyle("iconPlaymode" .. string.upper((val or 
"OFF")))
+end
+
+--[[
+
+=head2 Iconbar:setPlaylistMode(val)
+
+Set the playlistmode of the iconbar. Values are nil (no mode), 1 for playlist 
mode and 2 for party mode.
+When not 1 or 2, setRepeat()
+
+=cut
+--]]
+function setPlaylistMode(self, val)
+       log:debug("Iconbar:setPlaylistMode(", val, ")")
+       -- FIXME: need new styles for playlist and party mode
+       self.iconPlaylistMode:setStyle("iconPlaylistMode" .. string.upper((val 
or "OFF")))
 end
 
 
@@ -168,6 +183,7 @@
                iconBackground = Label("iconBackground", ""),
                iconPlaymode = Icon("iconPlaymodeOFF"),
                iconRepeat = Icon("iconRepeatOFF"),
+               iconPlaylistMode = Icon("iconPlaylistModeOFF"),
                iconShuffle = Icon("iconShuffleOFF"),
                iconBattery = Icon("iconBatteryNONE"),
                iconWireless = Icon("iconWirelessNONE"),
@@ -180,6 +196,7 @@
        Framework:addWidget(obj.iconBackground)
        Framework:addWidget(obj.iconPlaymode)
        Framework:addWidget(obj.iconRepeat)
+       Framework:addWidget(obj.iconPlaylistMode)
        Framework:addWidget(obj.iconShuffle)
        Framework:addWidget(obj.iconBattery)
        Framework:addWidget(obj.iconWireless)

Modified: 7.3/trunk/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua
URL: 
http://svn.slimdevices.com/7.3/trunk/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua?rev=3224&root=Jive&r1=3223&r2=3224&view=diff
==============================================================================
--- 7.3/trunk/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua (original)
+++ 7.3/trunk/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua Tue Oct 28 
21:35:47 2008
@@ -821,11 +821,18 @@
                -- set the playmode (nil, stop, play, pause)
                iconbar:setPlaymode(self.state["mode"])
                
-               -- set the repeat (nil, 0=off, 1=track, 2=playlist)
-               iconbar:setRepeat(self.state["playlist repeat"])
-       
                -- set the shuffle (nil, 0=off, 1=by song, 2=by album)
                iconbar:setShuffle(self.state["playlist shuffle"])
+
+               -- set the playlist mode (nil, 0=off, 1=playlist, 2=party)
+               if self.state['playlist mode'] and self.state['playlist mode'] 
> 0 then
+                       iconbar:setRepeat(0)
+                       iconbar:setPlaylistMode(self.state["playlist mode"])
+               else
+                       -- set the repeat (nil, 0=off, 1=track, 2=playlist)
+                       iconbar:setPlaylistMode(0)
+                       iconbar:setRepeat(self.state["playlist repeat"])
+               end
        end
 end
 

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

Reply via email to