Author: bklaas
Date: Tue Jun 15 13:28:15 2010
New Revision: 8864
URL: http://svn.slimdevices.com/jive?rev=8864&view=rev
Log:
r39...@daddymac-520 (orig r8861): bklaas | 2010-06-15 14:09:21 -0500
Bug: n/a
Description: misc additions to wire frame applet
r39...@daddymac-520 (orig r8862): bklaas | 2010-06-15 14:37:08 -0500
Bug: 16148
Description: fallback to blank screen on non-server requested soft power off
when clock is not set
r39...@daddymac-520 (orig r8863): bklaas | 2010-06-15 15:27:42 -0500
Bug: n/a
Description: create window style linein that is identical to nowplaying but
retains bgImg transparency
Modified:
7.6/trunk/ (props changed)
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/BlankScreen/BlankScreenApplet.lua
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/QVGAlandscapeSkin/QVGAlandscapeSkinApplet.lua
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/QVGAportraitSkin/QVGAportraitSkinApplet.lua
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/ScreenSavers/ScreenSaversApplet.lua
7.6/trunk/squeezeplay/src/squeezeplay/share/jive/JiveMain.lua
7.6/trunk/squeezeplay/src/squeezeplay/share/jive/utils/datetime.lua
7.6/trunk/squeezeplay/src/squeezeplay_baby/share/applets/LineIn/LineInApplet.lua
7.6/trunk/squeezeplay/src/squeezeplay_test/share/applets/WireFrame/WireFrameApplet.lua
Propchange: 7.6/trunk/
------------------------------------------------------------------------------
--- svk:merge (original)
+++ svk:merge Tue Jun 15 13:28:15 2010
@@ -13,7 +13,7 @@
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.4/private-branches/fab4-skin:4552
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.4/private-branches/new-alsa:6567
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.4/trunk:8423
-bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.5/trunk:8858
+bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.5/trunk:8863
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/7.0:2013
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/SN:1083
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/scrolling:1378
Modified:
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/BlankScreen/BlankScreenApplet.lua
URL:
http://svn.slimdevices.com/jive/7.6/trunk/squeezeplay/src/squeezeplay/share/applets/BlankScreen/BlankScreenApplet.lua?rev=8864&r1=8863&r2=8864&view=diff
==============================================================================
---
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/BlankScreen/BlankScreenApplet.lua
(original)
+++
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/BlankScreen/BlankScreenApplet.lua
Tue Jun 15 13:28:15 2010
@@ -101,6 +101,9 @@
})
self.window:addWidget(self.timeLabel)
else
+ if self.timeLabel then
+ self.window:removeWidget(self.timeLabel)
+ end
self.timeLabel = nil
end
Modified:
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/QVGAlandscapeSkin/QVGAlandscapeSkinApplet.lua
URL:
http://svn.slimdevices.com/jive/7.6/trunk/squeezeplay/src/squeezeplay/share/applets/QVGAlandscapeSkin/QVGAlandscapeSkinApplet.lua?rev=8864&r1=8863&r2=8864&view=diff
==============================================================================
---
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/QVGAlandscapeSkin/QVGAlandscapeSkinApplet.lua
(original)
+++
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/QVGAlandscapeSkin/QVGAlandscapeSkinApplet.lua
Tue Jun 15 13:28:15 2010
@@ -324,6 +324,11 @@
s.nowplaying.pressed = s.nowplaying
s.nowplaying_small_art.pressed = s.nowplaying_small_art
+ -- line in window is the same as nowplaying but with transparent
background
+ s.linein = _uses(s.nowplaying, {
+ bgImg = false,
+ })
+
-- sliders
s.npvolumeB = { hidden = 1 }
Modified:
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/QVGAportraitSkin/QVGAportraitSkinApplet.lua
URL:
http://svn.slimdevices.com/jive/7.6/trunk/squeezeplay/src/squeezeplay/share/applets/QVGAportraitSkin/QVGAportraitSkinApplet.lua?rev=8864&r1=8863&r2=8864&view=diff
==============================================================================
---
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/QVGAportraitSkin/QVGAportraitSkinApplet.lua
(original)
+++
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/QVGAportraitSkin/QVGAportraitSkinApplet.lua
Tue Jun 15 13:28:15 2010
@@ -621,6 +621,10 @@
s.npvolumeB = { hidden = 1 }
+ -- line in is the same as s.nowplaying but with transparent background
+ s.linein = _uses(s.nowplaying, {
+ bgImg = false,
+ })
end
Modified:
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/ScreenSavers/ScreenSaversApplet.lua
URL:
http://svn.slimdevices.com/jive/7.6/trunk/squeezeplay/src/squeezeplay/share/applets/ScreenSavers/ScreenSaversApplet.lua?rev=8864&r1=8863&r2=8864&view=diff
==============================================================================
---
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/ScreenSavers/ScreenSaversApplet.lua
(original)
+++
7.6/trunk/squeezeplay/src/squeezeplay/share/applets/ScreenSavers/ScreenSaversApplet.lua
Tue Jun 15 13:28:15 2010
@@ -223,14 +223,16 @@
--screensaver set for the current mode is activated.
-- the force arg is set to true for preview, allowing screensavers that might
be not shown in certain circumstances to still be previewed
-- see ClockApplet for example
-function _activate(self, the_screensaver, force)
+function _activate(self, the_screensaver, force, isServerRequest)
log:debug("Screensaver activate")
-- what screensaver, check the playmode of the current player
if the_screensaver == nil then
- the_screensaver = self:_getDefaultScreensaver()
- end
- local screensaver = self.screensavers[the_screensaver]
+ self.currentSS = self:_getDefaultScreensaver()
+ else
+ self.currentSS = the_screensaver
+ end
+ local screensaver = self.screensavers[self.currentSS]
-- In some situations the timer restart below tries to activate a SS
when one is already running.
-- We don't want to do this for BlankScreen when BlankScreen is already
active
@@ -258,18 +260,28 @@
local year = os.date("%Y")
-- the "none" choice is false:false, for which the proper course is to
do nothing
- if the_screensaver == 'false:false' then
+ if self.currentSS == 'false:false' then
log:warn('"none" is the configured screensaver for ',
self:_getMode(), ', so do nothing')
return
end
+ -- bug 15654, don't allow false:false to be the default whenOff SS when
the clock is wrong
+ local useBlankSS = tonumber(year) < 2010 and not force and
self:_getMode() == 'whenOff' and not isServerRequest
+
if not screensaver or not screensaver.applet -- fallback to default if
screensaver.applet doesn't exist
- or ( tonumber(year) < 2009 and not force and self:_getMode() ==
'whenOff' ) then -- fallback to blank screensaver on whenOff and no clock
- -- no screensaver, fallback to default
- log:warn('The configured screensaver method ', the_screensaver,
' is not available. Falling back to default from Meta file')
- local fallbackKey = self.defaultSettings[self:_getMode()]
- screensaver = self.screensavers[fallbackKey]
- -- return
+ or useBlankSS then -- fallback to blank screensaver on whenOff
and no clock
+
+ if useBlankSS then
+ -- bug 16148: special case, fall back to blank SS for
whenOff and the clock not set and not a server request
+ log:warn('Clock is not set properly, so fallback to
blank screen SS')
+ self.currentSS = 'BlankScreen:openScreensaver'
+ screensaver = self.screensavers[self.currentSS]
+ else
+ -- no screensaver, fallback to default
+ log:warn('The configured screensaver method ',
self.currentSS, ' is not available. Falling back to default from Meta file')
+ self.currentSS = self.defaultSettings[self:_getMode()]
+ screensaver = self.screensavers[self.currentSS]
+ end
end
if screensaver.applet then
@@ -288,8 +300,8 @@
--service method
-function activateScreensaver(self)
- self:_activate(nil)
+function activateScreensaver(self, isServerRequest)
+ self:_activate(nil, _, isServerRequest)
end
@@ -455,7 +467,7 @@
return EVENT_UNUSED
end
- local ss = self:_getOffScreensaver()
+ local ss = self.currentSS or self:_getOffScreensaver()
if ss then
local screensaver = self.screensavers[ss]
Modified: 7.6/trunk/squeezeplay/src/squeezeplay/share/jive/JiveMain.lua
URL:
http://svn.slimdevices.com/jive/7.6/trunk/squeezeplay/src/squeezeplay/share/jive/JiveMain.lua?rev=8864&r1=8863&r2=8864&view=diff
==============================================================================
--- 7.6/trunk/squeezeplay/src/squeezeplay/share/jive/JiveMain.lua (original)
+++ 7.6/trunk/squeezeplay/src/squeezeplay/share/jive/JiveMain.lua Tue Jun 15
13:28:15 2010
@@ -202,7 +202,7 @@
currentPlayer:setPower(false, nil, isServerRequest)
end
--todo: also pause/power off local player since local player
might be playing and not be the current player
- appletManager:callService("activateScreensaver")
+ appletManager:callService("activateScreensaver",
isServerRequest)
elseif _softPowerState == "on" then
log:info("Turn soft power on")
--todo: Define what should happen for a non-jive remote player.
Currently if a server is down, locally a SS will engage, but when the server
Modified: 7.6/trunk/squeezeplay/src/squeezeplay/share/jive/utils/datetime.lua
URL:
http://svn.slimdevices.com/jive/7.6/trunk/squeezeplay/src/squeezeplay/share/jive/utils/datetime.lua?rev=8864&r1=8863&r2=8864&view=diff
==============================================================================
--- 7.6/trunk/squeezeplay/src/squeezeplay/share/jive/utils/datetime.lua
(original)
+++ 7.6/trunk/squeezeplay/src/squeezeplay/share/jive/utils/datetime.lua Tue Jun
15 13:28:15 2010
@@ -494,7 +494,7 @@
function getCurrentTime()
-- if the time has not been set, return an empty string
if not timeSet then
- if tonumber(os.date("%Y")) < 2000 then
+ if tonumber(os.date("%Y")) < 2010 then
return ""
end
Modified:
7.6/trunk/squeezeplay/src/squeezeplay_baby/share/applets/LineIn/LineInApplet.lua
URL:
http://svn.slimdevices.com/jive/7.6/trunk/squeezeplay/src/squeezeplay_baby/share/applets/LineIn/LineInApplet.lua?rev=8864&r1=8863&r2=8864&view=diff
==============================================================================
---
7.6/trunk/squeezeplay/src/squeezeplay_baby/share/applets/LineIn/LineInApplet.lua
(original)
+++
7.6/trunk/squeezeplay/src/squeezeplay_baby/share/applets/LineIn/LineInApplet.lua
Tue Jun 15 13:28:15 2010
@@ -233,7 +233,7 @@
--todo: don't show if already up
- local window = Window("nowplaying")
+ local window = Window("linein")
local titleGroup = Group('title', {
lbutton = window:createDefaultLeftButton(),
Modified:
7.6/trunk/squeezeplay/src/squeezeplay_test/share/applets/WireFrame/WireFrameApplet.lua
URL:
http://svn.slimdevices.com/jive/7.6/trunk/squeezeplay/src/squeezeplay_test/share/applets/WireFrame/WireFrameApplet.lua?rev=8864&r1=8863&r2=8864&view=diff
==============================================================================
---
7.6/trunk/squeezeplay/src/squeezeplay_test/share/applets/WireFrame/WireFrameApplet.lua
(original)
+++
7.6/trunk/squeezeplay/src/squeezeplay_test/share/applets/WireFrame/WireFrameApplet.lua
Tue Jun 15 13:28:15 2010
@@ -42,40 +42,87 @@
function details(self)
local data = {
- sync1 = {
- enabled = true,
- windowStyle = 'text_list',
- titleText = 'Synchronization',
- helpText = 'This is some test help text to show that
this works',
+ RadioModel = {
+ enabled = true,
+ windowStyle = 'text_list',
+ titleText = 'Synchronize',
+ helpText = 'Synchronize Player A to:',
items = {
- { text = 'Player A', radio = 1},
+ --{ text = 'Player A', radio = 1},
{ text = 'Player B', radio = 1},
{ text = 'Player C', radio = 1},
{ text = 'Player D', radio = 1},
},
},
- sync2 = {
+ CheckboxModel = {
enabled = true,
windowStyle = 'text_list',
- titleText = 'Synchronization',
- items = {
- { text = 'Player A', checkbox = 1},
+ titleText = 'Synchronize',
+ helpText = 'Synchronize Player A with:',
+ items = {
+ --{ text = 'Player A', checkbox = 1, checked =
true},
{ text = 'Player B', checkbox = 1, checked =
true},
{ text = 'Player C', checkbox = 1},
{ text = 'Player D', checkbox = 1},
},
},
- sync3 = {
+ GroupModel = {
+ enabled = true,
+ windowStyle = 'text_list',
+ titleText = 'Multi-Room Audio',
+ helpText = 'Attach Player A to:',
+ items = {
+ { text = 'Group 1', radio = 1},
+ { text = 'Group 2', radio = 1},
+ { text = 'Group 3', radio = 1},
+ { text = 'Group Settings', },
+ },
+ },
+ AdvancedSettings1 = {
+ enabled = true,
+ windowStyle = 'text_list',
+ titleText = 'Multi-Room Audio',
+ helpText = 'Select a multi-room audio group to
manage:',
+ items = {
+ { text = 'Group 1'},
+ { text = 'Group 2'},
+ { text = 'Group 3'},
+ { text = 'Add Another Group' },
+ },
+ },
+ AdvancedSettings2 = {
+ enabled = true,
+ windowStyle = 'text_list',
+ titleText = 'Group 1',
+ items = {
+ { text = 'Rename Group 1' },
+ { text = 'Edit Attached Players', },
+ { text = 'Group 1 Volume Behavior', },
+ { text = 'Delete Group 1' },
+ { text = 'TBD...' },
+ },
+ },
+ lineIn = {
+ special = 'lineIn',
+ windowStyle = 'nowplaying_small_art',
+ iconStyle = 'icon_linein',
+ --iconStyle = 'icon_apple',
+ titleText = 'Line In',
+ },
+ EditAttachedPlayer = {
enabled = true,
- windowStyle = 'text_list',
- titleText = 'Synchronization',
- items = {
- { text = 'Player A', choice = 1, choices = {
'foo', 'bar', 'wtf' }, whichChoice = 3 },
- { text = 'Player B'},
- { text = 'Player C'},
- { text = 'Player D'},
- },
- },
+ --windowStyle = 'text_list',
+ windowStyle = 'choose_player',
+ titleText = 'Group 1 Players',
+ helpText = 'Check the boxes of the players that
should be synchronized within Group 1',
+ items = {
+ { text = 'Player A', checkbox = 1, checked =
true, iconStyle = 'player_baby'},
+ { text = 'Player B', checkbox = 1, checked =
true, iconStyle = 'player_fab4'},
+ { text = 'Player C', checkbox = 1, iconStyle =
'player_receiver' },
+ { text = 'Player D', checkbox = 1, iconStyle =
'player_boom' },
+ },
+ },
+
}
return data
end
@@ -105,28 +152,37 @@
local data = self.data[key]
- local window = Window(data.windowStyle or 'text_list', data.titleText)
- self.menu = SimpleMenu('menu')
-
- for i, item in ipairs(data.items) do
- if item.radio then
- if not self.group then
- self.group = RadioGroup()
+ local window
+ if data.special then
+
+ -- any of the data.special methods need to return a full window
spec and fill the window var with it
+ if data.special == 'lineIn' then
+ window = self:lineInWindow(data)
+ end
+ else
+ window = Window(data.windowStyle or 'text_list', data.titleText)
+ self.menu = SimpleMenu('menu')
+
+ for i, item in ipairs(data.items) do
+ if item.radio then
+ if not self.group then
+ self.group = RadioGroup()
+ end
+ self:addRadioItem(item)
+ elseif item.checkbox then
+ self:addCheckboxItem(item)
+ elseif item.choice then
+ self:addChoiceItem(item)
+ else
+ self:addItem(item)
end
- self:addRadioItem(item)
- elseif item.checkbox then
- self:addCheckboxItem(item)
- elseif item.choice then
- self:addChoiceItem(item)
- else
- self:addItem(item)
end
+ if data.helpText then
+ self:addHelpText(data.helpText)
+ end
+ window:addWidget(self.menu)
end
- if data.helpText then
- self:addHelpText(data.helpText)
- end
-
- window:addWidget(self.menu)
+
window:show()
end
@@ -142,6 +198,7 @@
{
text = item.text,
style = item.style or 'item',
+ iconStyle = item.iconStyle or nil,
}
)
end
@@ -152,6 +209,7 @@
text = item.text,
style = 'item_choice',
sound = "WINDOWSHOW",
+ iconStyle = item.iconStyle or nil,
check = RadioButton("radio",
self.group,
function()
@@ -168,6 +226,7 @@
{
text = item.text,
style = 'item_choice',
+ iconStyle = item.iconStyle or nil,
sound = "WINDOWSHOW",
check = Checkbox("checkbox",
function()
@@ -187,6 +246,7 @@
text = item.text,
style = 'item_choice',
sound = "WINDOWSHOW",
+ iconStyle = item.iconStyle or nil,
check = Choice("choice",
item.choices,
function()
@@ -199,3 +259,31 @@
end
+function lineInWindow(self, data)
+ log:debug("line in window")
+
+ local window = Window(data.windowStyle or 'linein')
+
+ local titleGroup = Group('title', {
+ --lbutton = window:createDefaultLeftButton(),
+ text = Label("text", data.titleText),
+ --rbutton = nil,
+ })
+
+ local artworkGroup = Group('npartwork', {
+ artwork = Icon(data.iconStyle),
+ })
+
+ local nptrackGroup = Group('nptitle', {
+ nptrack = Label('nptrack', data.titleText ),
+ xofy = nil,
+ })
+
+ window:addWidget(titleGroup)
+ window:addWidget(nptrackGroup)
+ window:addWidget(artworkGroup)
+
+ return window
+end
+
+
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/jive-checkins