Author: bklaas
Date: Wed Feb 3 13:49:06 2010
New Revision: 8449
URL: http://svn.slimdevices.com/jive?rev=8449&view=rev
Log:
Fixed Bug: 15336
Description: don't consume touch event on disabled fwd and rew buttons
FWIW, I think this is an odd route to take with a disabled button, but it's the
only way to generate the error message from the server side
Modified:
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/NowPlaying/NowPlayingApplet.lua
Modified:
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/NowPlaying/NowPlayingApplet.lua
URL:
http://svn.slimdevices.com/jive/7.5/trunk/squeezeplay/src/squeezeplay/share/applets/NowPlaying/NowPlayingApplet.lua?rev=8449&r1=8448&r2=8449&view=diff
==============================================================================
---
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/NowPlaying/NowPlayingApplet.lua
(original)
+++
7.5/trunk/squeezeplay/src/squeezeplay/share/applets/NowPlaying/NowPlayingApplet.lua
Wed Feb 3 13:49:06 2010
@@ -438,13 +438,16 @@
log:debug('remap buttons to whatever remoteMeta needs')
-- disable rew or fw as needed
if buttons.rew and tonumber(buttons.rew) == 0 then
- self:_remapButton('rew', 'rewDisabled', function()
return EVENT_CONSUME end)
+ self:_remapButton('rew', 'rewDisabled', nil)
else
self.controlsGroup:setWidget('rew', self.rewButton)
end
if buttons.fwd and tonumber(buttons.fwd) == 0 then
- self:_remapButton('fwd', 'fwdDisabled', function()
return EVENT_CONSUME end)
+ -- Bug 15336: in order for a skip limit showBriefly to
be generated, we still need to
+ -- allow the jump_fwd action to be sent for the
disabled button
+ -- this could have implications for services that
expect a disabled button to not send the action
+ self:_remapButton('fwd', 'fwdDisabled', nil)
else
self.controlsGroup:setWidget('fwd', self.fwdButton)
end
@@ -526,8 +529,10 @@
return
end
-- set callback
- local newWidget = Button(Icon(key), newCallback)
- self.controlsGroup:setWidget(key, newWidget)
+ if newCallback then
+ local newWidget = Button(Icon(key), newCallback)
+ self.controlsGroup:setWidget(key, newWidget)
+ end
-- set style
local widget = self.controlsGroup:getWidget(key)
if newStyle then
@@ -652,7 +657,7 @@
if elapsed then
strElapsed = _secondsToString(elapsed)
end
- if duration and duration > 0 then
+ if elapsed and elapsed >= 0 and duration and duration > 0 then
strRemain = "-" .. _secondsToString(duration - elapsed)
end
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/jive-checkins