Index: squeezeplay/share/jive/slim/ArtworkCache.lua =================================================================== --- squeezeplay/share/jive/slim/ArtworkCache.lua (revision 2079) +++ squeezeplay/share/jive/slim/ArtworkCache.lua (working copy) @@ -19,8 +19,8 @@ module(..., oo.class) --- Limit artwork cache to 20 Mbytes -local ARTWORK_LIMIT = 20 * 1024 * 1024 +-- Limit artwork cache to 15 Mbytes +local ARTWORK_LIMIT = 15 * 1024 * 1024 function __init(self) @@ -60,7 +60,7 @@ v = v.prev end - log:debug("artworkThumbCache items=", items, " citems=", citems, " bytes=", self.total) + log:debug("artworkThumbCache items=", items, " citems=", citems, " bytes=", self.total, " fullness=", (self.total / ARTWORK_LIMIT) * 100) end Index: squeezeplay/share/jive/ui/Window.lua =================================================================== --- squeezeplay/share/jive/ui/Window.lua (revision 2079) +++ squeezeplay/share/jive/ui/Window.lua (working copy) @@ -232,21 +232,38 @@ --]] function replace(self, toReplace, transition) + local stack = Framework.windowStack + local topWindow = 1 - for i in ipairs(Framework.windowStack) do - if Framework.windowStack[i] == toReplace then + for i in ipairs(stack) do + if stack[i] == toReplace then if i == topWindow then self:showInstead(transition) else -- the old window may still be visible under -- a transparent window, if so hide it - local oldwindow = Framework.windowStack[i] + local oldwindow = stack[i] if oldwindow.visible then oldwindow:dispatchNewEvent(EVENT_HIDE) end - Framework.windowStack[i] = self + -- old windw is being removed from the window + -- stack + ----oldwindow:dispatchNewEvent(EVENT_WINDOW_POP) + -- remove the window if it is already in the + -- stack + local onstack = table.delete(stack, self) + + if not onstack then + -- this window is being pushed to the + -- stack + self:dispatchNewEvent(EVENT_WINDOW_PUSH) + end + + + stack[i] = self + -- if the old window was visible, the new one -- is now if oldwindow.visible then