Author: tom
Date: Mon Mar 23 09:06:17 2009
New Revision: 4899

URL: http://svn.slimdevices.com/jive?rev=4899&view=rev
Log:
Bug: 11439
Description:
Volume now uses acceleration

Modified:
    7.4/trunk/squeezeplay/src/squeezeplay/share/applets/SlimBrowser/Volume.lua

Modified: 
7.4/trunk/squeezeplay/src/squeezeplay/share/applets/SlimBrowser/Volume.lua
URL: 
http://svn.slimdevices.com/jive/7.4/trunk/squeezeplay/src/squeezeplay/share/applets/SlimBrowser/Volume.lua?rev=4899&r1=4898&r2=4899&view=diff
==============================================================================
--- 7.4/trunk/squeezeplay/src/squeezeplay/share/applets/SlimBrowser/Volume.lua 
(original)
+++ 7.4/trunk/squeezeplay/src/squeezeplay/share/applets/SlimBrowser/Volume.lua 
Mon Mar 23 09:06:17 2009
@@ -84,7 +84,9 @@
                                      Icon("volumeMax")
                              }))
 
-       popup:addListener(ACTION | EVENT_KEY_ALL,
+       popup:focusWidget(nil)
+       
+       popup:addListener(ACTION | EVENT_KEY_ALL | EVENT_SCROLL,
                          function(event)
                                  return self:event(event)
                          end)
@@ -189,7 +191,19 @@
 
        local type = event:getType()
 
-       if type == ACTION then
+       if type == EVENT_SCROLL then
+               local scroll = event:getScroll()
+
+               if scroll > 0 then
+                       self.delta = 1
+               elseif scroll < 0 then
+                       self.delta = -1
+               else
+                       self.delta = 0
+               end
+               _updateVolume(self)
+
+       elseif type == ACTION then
                local action = event:getAction()
                if action == "volume_up" then
                        self.delta = 1

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

Reply via email to