Author: bklaas
Date: Fri Jul 25 15:15:07 2008
New Revision: 2746

URL: http://svn.slimdevices.com?rev=2746&root=Jive&view=rev
Log:
Bug: 8655
Description: create albumitemplay and albumitemadd styles to DefaultSkin. make 
slimbrowser capture a menuStyle prefix

Modified:
    
7.2/trunk/squeezeplay/src/squeezeplay/share/applets/DefaultSkin/DefaultSkinApplet.lua
    
7.2/trunk/squeezeplay/src/squeezeplay/share/applets/SlimBrowser/SlimBrowserApplet.lua

Modified: 
7.2/trunk/squeezeplay/src/squeezeplay/share/applets/DefaultSkin/DefaultSkinApplet.lua
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay/share/applets/DefaultSkin/DefaultSkinApplet.lua?rev=2746&root=Jive&r1=2745&r2=2746&view=diff
==============================================================================
--- 
7.2/trunk/squeezeplay/src/squeezeplay/share/applets/DefaultSkin/DefaultSkinApplet.lua
 (original)
+++ 
7.2/trunk/squeezeplay/src/squeezeplay/share/applets/DefaultSkin/DefaultSkinApplet.lua
 Fri Jul 25 15:15:07 2008
@@ -1006,6 +1006,9 @@
        s.albumitem.icon.img = Surface:loadImage(imgpath .. 
"menu_album_noartwork.png")
        s.albumitem.icon.border = { 8, 0, 0, 0 }
 
+       s.albumitemplay = _uses(s.albumitem)
+       s.albumitemadd  = _uses(s.albumitem)
+
        s.popupToast = _uses(s.albumitem, 
                {
                        order = { 'icon', 'text', 'textarea' },
@@ -1064,6 +1067,13 @@
        s.selected.albumitem.play.img = Surface:loadImage(imgpath .. 
"selection_right.png")
        s.selected.albumitem.play.border = { 0, 0, 5, 0 }
 
+       s.selected.albumitemplay = _uses(s.selected.albumitem, {
+                       play = { img = Surface:loadImage(imgpath .. 
"selection_play.png") }
+       })
+       s.selected.albumitemadd = _uses(s.selected.albumitem, {
+                       play = { img = Surface:loadImage(imgpath .. 
"selection_add.png") }
+       })
+       
        -- locked item with artwork and song info
        s.locked.albumitem = {}
        s.locked.albumitem.text = {}

Modified: 
7.2/trunk/squeezeplay/src/squeezeplay/share/applets/SlimBrowser/SlimBrowserApplet.lua
URL: 
http://svn.slimdevices.com/7.2/trunk/squeezeplay/src/squeezeplay/share/applets/SlimBrowser/SlimBrowserApplet.lua?rev=2746&root=Jive&r1=2745&r2=2746&view=diff
==============================================================================
--- 
7.2/trunk/squeezeplay/src/squeezeplay/share/applets/SlimBrowser/SlimBrowserApplet.lua
 (original)
+++ 
7.2/trunk/squeezeplay/src/squeezeplay/share/applets/SlimBrowser/SlimBrowserApplet.lua
 Fri Jul 25 15:15:07 2008
@@ -321,7 +321,6 @@
 local function _decoratedLabel(group, labelStyle, item, db, menuAccel)
        -- if item is a windowSpec, then the icon is kept in the spec for 
nothing (overhead)
        -- however it guarantees the icon in the title is not shared with (the 
same) icon in the menu.
-
        if not group then
                group = Group("item", { text = Label("text", ""), icon = 
Icon("icon"), play = Icon("play"), back = Button(Icon("back"), function() 
group:getWindow():dispatchNewEvent(EVENT_KEY_PRESS, KEY_BACK) return 
EVENT_CONSUME end) })
        end
@@ -1532,9 +1531,14 @@
                        if current then
                                style = "albumcurrent"
                        elseif item and item["style"] then
-                               style = item["style"]
-                       end
-
+                               local menuStyle = menu:getStyle()
+                               local menuPrefix = string.match(menuStyle, 
"(%a+)menu")
+                               if menuPrefix then
+                                       style = menuPrefix .. item["style"]
+                               else
+                                       style = item["style"]
+                               end
+                       end
                        widgets[widgetIndex] = _decoratedLabel(widget, style, 
item, db, menuAccel)
                end
        end

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

Reply via email to