Author: tom
Date: Fri Jan 30 11:39:38 2009
New Revision: 3998

URL: http://svn.slimdevices.com?rev=3998&root=Jive&view=rev
Log:
Bug: N/A
Description:
Action framework:
- Fix slider/scanner, events getting consumed due to previous checkin

Modified:
    7.4/trunk/squeezeplay/src/squeezeplay/share/applets/SlimBrowser/Scanner.lua
    7.4/trunk/squeezeplay/src/squeezeplay/share/jive/ui/Slider.lua

Modified: 
7.4/trunk/squeezeplay/src/squeezeplay/share/applets/SlimBrowser/Scanner.lua
URL: 
http://svn.slimdevices.com/7.4/trunk/squeezeplay/src/squeezeplay/share/applets/SlimBrowser/Scanner.lua?rev=3998&root=Jive&r1=3997&r2=3998&view=diff
==============================================================================
--- 7.4/trunk/squeezeplay/src/squeezeplay/share/applets/SlimBrowser/Scanner.lua 
(original)
+++ 7.4/trunk/squeezeplay/src/squeezeplay/share/applets/SlimBrowser/Scanner.lua 
Fri Jan 30 11:39:38 2009
@@ -52,11 +52,16 @@
        local hrs  = math.floor(seconds / 3600 )
        local mins = math.floor((seconds % 3600) / 60)
        local secs = seconds % 60
+
+       if secs > 0 and secs < 1 then
+               -- the string.format fails if value > 0 and < 1
+               secs = 0
+       end
        
        if hrs > 0 then
                return string.format("%d:%02d:%02d", hrs, mins, secs)
        end
-       
+
        return string.format("%d:%02d", mins, secs)
 end
 
@@ -128,7 +133,7 @@
        if self.player:isRemote() then
                self.autoinvokeTime = AUTOINVOKE_INTERVAL_REMOTE
        else
-               self.autoinvokeTime = AUTOINVOKE_INTERVAL_LOCAL 
+               self.autoinvokeTime = AUTOINVOKE_INTERVAL_LOCAL
        end
 
        _updateDisplay(self)
@@ -259,23 +264,19 @@
                if action == "scanner_fwd" then
                        self.delta = 1
 
-                       self.holdTimer:restart()
                        if onscreen then
                                _updateSelectedTime(self)
                        end
 
-                       self.delta = 0
                        return EVENT_CONSUME
                end
                if action == "scanner_rew" then
                        self.delta = -1
 
-                       self.holdTimer:restart()
                        if onscreen then
                                _updateSelectedTime(self)
                        end
 
-                       self.delta = 0
                        return EVENT_CONSUME
                end
 

Modified: 7.4/trunk/squeezeplay/src/squeezeplay/share/jive/ui/Slider.lua
URL: 
http://svn.slimdevices.com/7.4/trunk/squeezeplay/src/squeezeplay/share/jive/ui/Slider.lua?rev=3998&root=Jive&r1=3997&r2=3998&view=diff
==============================================================================
--- 7.4/trunk/squeezeplay/src/squeezeplay/share/jive/ui/Slider.lua (original)
+++ 7.4/trunk/squeezeplay/src/squeezeplay/share/jive/ui/Slider.lua Fri Jan 30 
11:39:38 2009
@@ -192,9 +192,10 @@
 function _callClosureAction(self, event)
        if self.closure then
                self.closure(self, self.size, true)
-       end
-
-       return EVENT_CONSUME
+               return EVENT_CONSUME
+       end
+
+       return EVENT_UNUSED
 end
 
 
@@ -203,7 +204,7 @@
 
        if type == EVENT_SCROLL then
                self:_moveSlider(event:getScroll())
-               return EVENT_CONSUME
+               return EVENT_UNUSED --current usages need this so they can 
handle the scroll directly
 
        elseif type == EVENT_MOUSE_DOWN or
                type == EVENT_MOUSE_DRAG then
@@ -217,7 +218,7 @@
                        -- vertical
                        self:_setSlider(y / h)
                end
-               return EVENT_CONSUME
+               return EVENT_UNUSED --current usages need this so they can 
handle the scroll directly
 
        elseif type == EVENT_KEY_PRESS then
                local keycode = event:getKeycode()

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

Reply via email to