Author: richard
Date: Wed Feb 25 02:27:02 2009
New Revision: 4451
URL: http://svn.slimdevices.com/jive?rev=4451&view=rev
Log:
r4...@harrypotter (orig r4439): tom | 2009-02-24 16:19:12 +0000
Bug: N/A
Description:
showBriefly fixes - add visible check to let second quick showBriefly to still
appear.
Player showBriefly fixes - now mouse clicks and back hide the window, textarea
no longer gets focus
Modified:
7.4/branches/pango/ (props changed)
7.4/branches/pango/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua
7.4/branches/pango/squeezeplay/src/squeezeplay/share/jive/ui/Window.lua
Propchange: 7.4/branches/pango/
------------------------------------------------------------------------------
--- svk:merge (original)
+++ svk:merge Wed Feb 25 02:27:02 2009
@@ -4,7 +4,7 @@
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.2/trunk:2921
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.3/private-branches/jive-refresh:3653
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.3/trunk:4138
-bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.4/trunk:4433
+bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.4/trunk:4439
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/7.0:2013
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/SN:1083
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/scrolling:1378
Modified:
7.4/branches/pango/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua
URL:
http://svn.slimdevices.com/jive/7.4/branches/pango/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua?rev=4451&r1=4450&r2=4451&view=diff
==============================================================================
--- 7.4/branches/pango/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua
(original)
+++ 7.4/branches/pango/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua
Wed Feb 25 02:27:02 2009
@@ -58,6 +58,12 @@
local EVENT_KEY_ALL = jive.ui.EVENT_KEY_ALL
local EVENT_CHAR_PRESS = jive.ui.EVENT_CHAR_PRESS
+local EVENT_MOUSE_HOLD = jive.ui.EVENT_MOUSE_HOLD
+local EVENT_MOUSE_DRAG = jive.ui.EVENT_MOUSE_DRAG
+local EVENT_MOUSE_PRESS = jive.ui.EVENT_MOUSE_PRESS
+local EVENT_MOUSE_DOWN = jive.ui.EVENT_MOUSE_DOWN
+local EVENT_MOUSE_UP = jive.ui.EVENT_MOUSE_UP
+local EVENT_MOUSE_ALL = jive.ui.EVENT_MOUSE_ALL
local EVENT_SCROLL = jive.ui.EVENT_SCROLL
local EVENT_CONSUME = jive.ui.EVENT_CONSUME
local ACTION = jive.ui.ACTION
@@ -829,6 +835,12 @@
end
+local function hideAction(self)
+ self.currentSong.window:hide()
+ return EVENT_CONSUME
+end
+
+
-- onStage
-- we're being browsed!
function onStage(self)
@@ -874,14 +886,30 @@
})
self.currentSong.window:addWidget(group)
- self.currentSong.window:addListener(ACTION | EVENT_CHAR_PRESS |
EVENT_KEY_ALL | EVENT_SCROLL,
+
+ --don't let the textarea get the focus, because we want the window to
manage events
+ self.currentSong.window:focusWidget(nil)
+
+
+ --Only 'back' and mouse clicks clear the popup, all other input is
forwarded to main window
+
+ self.currentSong.window:addListener(ACTION | EVENT_SCROLL |
EVENT_MOUSE_PRESS | EVENT_MOUSE_HOLD | EVENT_MOUSE_DRAG,
function(event)
+
+ if (event:getType() & EVENT_MOUSE_ALL) > 0 then
+ return hideAction(self)
+ end
+
local prev = self.currentSong.window:getLowerWindow()
if prev then
Framework:dispatchEvent(prev, event)
end
return EVENT_CONSUME
end)
+
+
+ self.currentSong.window:addActionListener("back", self, hideAction)
+
self.currentSong.window.brieflyHandler = 1
end
Modified:
7.4/branches/pango/squeezeplay/src/squeezeplay/share/jive/ui/Window.lua
URL:
http://svn.slimdevices.com/jive/7.4/branches/pango/squeezeplay/src/squeezeplay/share/jive/ui/Window.lua?rev=4451&r1=4450&r2=4451&view=diff
==============================================================================
--- 7.4/branches/pango/squeezeplay/src/squeezeplay/share/jive/ui/Window.lua
(original)
+++ 7.4/branches/pango/squeezeplay/src/squeezeplay/share/jive/ui/Window.lua Wed
Feb 25 02:27:02 2009
@@ -62,6 +62,7 @@
local ACTION = jive.ui.ACTION
local EVENT_KEY_ALL = jive.ui.EVENT_KEY_ALL
local EVENT_MOUSE_HOLD = jive.ui.EVENT_MOUSE_HOLD
+local EVENT_MOUSE_DRAG = jive.ui.EVENT_MOUSE_DRAG
local EVENT_MOUSE_PRESS = jive.ui.EVENT_MOUSE_PRESS
local EVENT_MOUSE_DOWN = jive.ui.EVENT_MOUSE_DOWN
local EVENT_MOUSE_UP = jive.ui.EVENT_MOUSE_UP
@@ -277,7 +278,7 @@
function hideOnAllButtonInput(self)
if not self.hideOnAllButtonInputHandle then
- self.hideOnAllButtonInputHandle = self:addListener(ACTION |
EVENT_KEY_PRESS | EVENT_KEY_HOLD | EVENT_MOUSE_PRESS | EVENT_MOUSE_HOLD,
+ self.hideOnAllButtonInputHandle = self:addListener(ACTION |
EVENT_KEY_PRESS | EVENT_KEY_HOLD | EVENT_MOUSE_PRESS | EVENT_MOUSE_HOLD |
EVENT_MOUSE_DRAG,
function(event)
return
hideOnAllButtonInputListener(self, event)
end)
@@ -462,6 +463,14 @@
pushTransition,
popTransition)
+ if not self.visible and self.brieflyTimer ~= nil then
+ --other source may have hidden then window, but not cleaned up
the timer.
+ -- Without this visible check, the "briefly" window would not
appear until the old timer timeout
+ self.brieflyTimer:stop()
+ self.brieflyTimer = nil
+
+ end
+
if self.brieflyTimer ~= nil then
if msecs then
self.brieflyTimer:setInterval(msecs)
@@ -481,7 +490,7 @@
if self.brieflyHandler == nil then
self.brieflyHandler =
- self:addListener(ACTION | EVENT_CHAR_PRESS |
EVENT_KEY_PRESS | EVENT_SCROLL,
+ self:addListener(ACTION | EVENT_CHAR_PRESS |
EVENT_KEY_PRESS | EVENT_SCROLL | EVENT_MOUSE_PRESS | EVENT_MOUSE_HOLD |
EVENT_MOUSE_DRAG,
function(event)
self:hide(popTransition,
"NONE")
return EVENT_CONSUME
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/jive-checkins