Author: bklaas
Date: Tue Jun 15 13:52:47 2010
New Revision: 8866
URL: http://svn.slimdevices.com/jive?rev=8866&view=rev
Log:
Fixed Bug: 16148
Description: do not display time in BlankScreen SS if clock is deemed not set
add isClockSet() method to datetime.lua
Modified:
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/BlankScreen/BlankScreenApplet.lua
7.5/trunk/squeezeplay/src/squeezeplay/share/jive/utils/datetime.lua
Modified:
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/BlankScreen/BlankScreenApplet.lua
URL:
http://svn.slimdevices.com/jive/7.5/trunk/squeezeplay/src/squeezeplay/share/applets/BlankScreen/BlankScreenApplet.lua?rev=8866&r1=8865&r2=8866&view=diff
==============================================================================
---
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/BlankScreen/BlankScreenApplet.lua
(original)
+++
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/BlankScreen/BlankScreenApplet.lua
Tue Jun 15 13:52:47 2010
@@ -93,9 +93,10 @@
function onOverlayWindowShown(self)
self:_setBrightness("on")
- local time = datetime:getCurrentTime()
+ local clockSet = datetime:isClockSet()
- if time then
+ if clockSet then
+ local time = datetime:getCurrentTime()
self.timeLabel = Group("text_block_black", {
text = Label("text", time)
})
Modified: 7.5/trunk/squeezeplay/src/squeezeplay/share/jive/utils/datetime.lua
URL:
http://svn.slimdevices.com/jive/7.5/trunk/squeezeplay/src/squeezeplay/share/jive/utils/datetime.lua?rev=8866&r1=8865&r2=8866&view=diff
==============================================================================
--- 7.5/trunk/squeezeplay/src/squeezeplay/share/jive/utils/datetime.lua
(original)
+++ 7.5/trunk/squeezeplay/src/squeezeplay/share/jive/utils/datetime.lua Tue Jun
15 13:52:47 2010
@@ -13,6 +13,7 @@
getAllDateFormats(self)
setWeekstart(self, day)
+isClockSet(self)
getWeekstart(self)
setDateFormat(self, dateformat)
getDateFormat(self)
@@ -483,6 +484,22 @@
end
--[[
+=head2 isClockSet()
+
+Returns a boolean as to whether the clock appears to be set correctly
+
+=cut
+--]]
+function isClockSet()
+ if tonumber(os.date("%Y")) < 2010 then
+ return false
+ end
+ return true
+
+end
+
+
+--[[
=head2 getCurrentTime()
Returns the current, formatted time.
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/jive-checkins