Author: titmuss
Date: Mon Feb 11 06:31:30 2008
New Revision: 1902

URL: http://svn.slimdevices.com?rev=1902&root=Jive&view=rev
Log:
Bug: 6946
Description:
Fix showBriefly to ensure that the callback is called when the window is poped 
from 
the window stack. Previously the callback was only called by the key press and 
timer 
listeners. This may fix a problem where the volume control could get stuck.


Modified:
    branches/7.0/jive/src/pkg/jive/share/jive/ui/Window.lua

Modified: branches/7.0/jive/src/pkg/jive/share/jive/ui/Window.lua
URL: 
http://svn.slimdevices.com/branches/7.0/jive/src/pkg/jive/share/jive/ui/Window.lua?rev=1902&root=Jive&r1=1901&r2=1902&view=diff
==============================================================================
--- branches/7.0/jive/src/pkg/jive/share/jive/ui/Window.lua (original)
+++ branches/7.0/jive/src/pkg/jive/share/jive/ui/Window.lua Mon Feb 11 06:31:30 
2008
@@ -277,26 +277,22 @@
                return
        end
 
+       if callback then
+               self:addListener(EVENT_WINDOW_POP, callback)
+       end
+
        if self.brieflyHandler == nil then
                self.brieflyHandler =
                        self:addListener(EVENT_KEY_PRESS | EVENT_SCROLL,
                                         function(event)
-                                                local r = EVENT_CONSUME
-                                                if callback then
-                                                        r = callback()
-                                                end
-                                                
                                                 self:hide(popTransition, 
"NONE")
-                                                return r
+                                                return EVENT_CONSUME
                                         end)
        end
 
        self.brieflyTimer = Timer(msecs,
                                  function(timer)
                                          self.brieflyTimer = nil
-                                         if callback then
-                                                 callback()
-                                         end
                                          self:hide(popTransition, "NONE")
                                  end,
                                  true)

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

Reply via email to