Author: richard
Date: Mon Mar 30 15:23:17 2009
New Revision: 5027
URL: http://svn.slimdevices.com/jive?rev=5027&view=rev
Log:
r5...@harrypotter (orig r5021): tom | 2009-03-30 20:23:55 +0100
Bug:N/A
Description:
iconbar icons were being drawn above help windows.
Now, framework widgets added to iterator list first so that if default zorder
is used, framework widgets are drawn first.
r5...@harrypotter (orig r5025): tom | 2009-03-30 23:17:13 +0100
Bug:11510
Description:
Introducing long hold left/back. Now regular back hold is "go_home". Long
hold left/back is "soft_reset", which for controller is disconnect player, and
is "go_home" for desktop.
Modified:
7.4/branches/pango/ (props changed)
7.4/branches/pango/squeezeplay/src/squeezeplay/share/applets/ChooseMusicSource/ChooseMusicSourceApplet.lua
7.4/branches/pango/squeezeplay/src/squeezeplay/share/applets/SetupLanguage/SetupLanguageApplet.lua
7.4/branches/pango/squeezeplay/src/squeezeplay/share/applets/SetupSqueezebox/SetupSqueezeboxApplet.lua
7.4/branches/pango/squeezeplay/src/squeezeplay/share/jive/InputToActionMap.lua
7.4/branches/pango/squeezeplay/src/squeezeplay/share/jive/JiveMain.lua
7.4/branches/pango/squeezeplay/src/squeezeplay/share/jive/ui/Framework.lua
7.4/branches/pango/squeezeplay/src/squeezeplay/share/jive/ui/Window.lua
7.4/branches/pango/squeezeplay/src/squeezeplay_contrib/share/applets/Test/TestApplet.lua
7.4/branches/pango/squeezeplay/src/squeezeplay_desktop/share/applets/DesktopJive/DesktopJiveMeta.lua
7.4/branches/pango/squeezeplay/src/squeezeplay_desktop/share/applets/SetupWelcome/SetupWelcomeApplet.lua
7.4/branches/pango/squeezeplay/src/squeezeplay_jive/share/applets/SqueezeboxJive/SqueezeboxJiveApplet.lua
Propchange: 7.4/branches/pango/
------------------------------------------------------------------------------
--- svk:merge (original)
+++ svk:merge Mon Mar 30 15:23:17 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:4842
-bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.4/trunk:4994
+bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.4/trunk:5025
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/applets/ChooseMusicSource/ChooseMusicSourceApplet.lua
URL:
http://svn.slimdevices.com/jive/7.4/branches/pango/squeezeplay/src/squeezeplay/share/applets/ChooseMusicSource/ChooseMusicSourceApplet.lua?rev=5027&r1=5026&r2=5027&view=diff
==============================================================================
---
7.4/branches/pango/squeezeplay/src/squeezeplay/share/applets/ChooseMusicSource/ChooseMusicSourceApplet.lua
(original)
+++
7.4/branches/pango/squeezeplay/src/squeezeplay/share/applets/ChooseMusicSource/ChooseMusicSourceApplet.lua
Mon Mar 30 15:23:17 2009
@@ -304,8 +304,8 @@
local statusLabel = Label("text",
self:string("SLIMSERVER_CONNECTING_TO", server:getName()))
window:addWidget(statusLabel)
- -- disable input, but still allow disconnect_player
- window:ignoreAllInputExcept({"disconnect_player"})
+ -- disable input
+ window:ignoreAllInputExcept()
local timeout = 1
Modified:
7.4/branches/pango/squeezeplay/src/squeezeplay/share/applets/SetupLanguage/SetupLanguageApplet.lua
URL:
http://svn.slimdevices.com/jive/7.4/branches/pango/squeezeplay/src/squeezeplay/share/applets/SetupLanguage/SetupLanguageApplet.lua?rev=5027&r1=5026&r2=5027&view=diff
==============================================================================
---
7.4/branches/pango/squeezeplay/src/squeezeplay/share/applets/SetupLanguage/SetupLanguageApplet.lua
(original)
+++
7.4/branches/pango/squeezeplay/src/squeezeplay/share/applets/SetupLanguage/SetupLanguageApplet.lua
Mon Mar 30 15:23:17 2009
@@ -181,7 +181,7 @@
self.popup:setAllowScreensaver(false)
self.popup:setAlwaysOnTop(true)
self.popup:setAutoHide(false)
- self.popup:ignoreAllInputExcept({"disconnect_player"})
+ self.popup:ignoreAllInputExcept()
self.popup:addWidget(Icon("iconConnecting"))
local stringChoice = "LOADING_LANGUAGE"
Modified:
7.4/branches/pango/squeezeplay/src/squeezeplay/share/applets/SetupSqueezebox/SetupSqueezeboxApplet.lua
URL:
http://svn.slimdevices.com/jive/7.4/branches/pango/squeezeplay/src/squeezeplay/share/applets/SetupSqueezebox/SetupSqueezeboxApplet.lua?rev=5027&r1=5026&r2=5027&view=diff
==============================================================================
---
7.4/branches/pango/squeezeplay/src/squeezeplay/share/applets/SetupSqueezebox/SetupSqueezeboxApplet.lua
(original)
+++
7.4/branches/pango/squeezeplay/src/squeezeplay/share/applets/SetupSqueezebox/SetupSqueezeboxApplet.lua
Mon Mar 30 15:23:17 2009
@@ -1464,7 +1464,7 @@
statusLabel:setValue(self.statusText)
end)
- window:ignoreAllInputExcept({"disconnect_player"})
+ window:ignoreAllInputExcept()
-- subscribe to the jnt so that we get notifications of players added
window:addListener(EVENT_WINDOW_ACTIVE,
Modified:
7.4/branches/pango/squeezeplay/src/squeezeplay/share/jive/InputToActionMap.lua
URL:
http://svn.slimdevices.com/jive/7.4/branches/pango/squeezeplay/src/squeezeplay/share/jive/InputToActionMap.lua?rev=5027&r1=5026&r2=5027&view=diff
==============================================================================
---
7.4/branches/pango/squeezeplay/src/squeezeplay/share/jive/InputToActionMap.lua
(original)
+++
7.4/branches/pango/squeezeplay/src/squeezeplay/share/jive/InputToActionMap.lua
Mon Mar 30 15:23:17 2009
@@ -24,7 +24,7 @@
["/"] = "go_search",
["h"] = "go_home",
["J"] = "go_home_or_now_playing",
- ["D"] = "disconnect_player",
+ ["D"] = "soft_reset",
["x"] = "play",
["p"] = "play",
["P"] = "create_mix",
@@ -96,8 +96,8 @@
[KEY_HOME] = "shutdown",
[KEY_PLAY] = "create_mix",
[KEY_ADD] = "add_next",
- [KEY_BACK] = "disconnect_player",
- [KEY_LEFT] = "disconnect_player",
+ [KEY_BACK] = "go_home",
+ [KEY_LEFT] = "go_home",
[KEY_GO] = "go_hold", --has no default assignment yet
[KEY_RIGHT] = "go_hold",
[KEY_PAUSE] = "stop",
Modified: 7.4/branches/pango/squeezeplay/src/squeezeplay/share/jive/JiveMain.lua
URL:
http://svn.slimdevices.com/jive/7.4/branches/pango/squeezeplay/src/squeezeplay/share/jive/JiveMain.lua?rev=5027&r1=5026&r2=5027&view=diff
==============================================================================
--- 7.4/branches/pango/squeezeplay/src/squeezeplay/share/jive/JiveMain.lua
(original)
+++ 7.4/branches/pango/squeezeplay/src/squeezeplay/share/jive/JiveMain.lua Mon
Mar 30 15:23:17 2009
@@ -109,7 +109,7 @@
local _defaultSkin
local _fullscreen
-local function _goHome()
+function JiveMain:goHome()
local windowStack = Framework.windowStack
if #windowStack > 1 then
@@ -121,9 +121,9 @@
end
end
-local function _disconnectPlayer(self, event) --self, event not used in our
case, could be left out
+function JiveMain:disconnectPlayer( event) --self, event not used in our case,
could be left out
appletManager:callService("setCurrentPlayer", nil)
- _goHome()
+ JiveMain:goHome()
end
@@ -150,8 +150,8 @@
--}
-function _goHomeAction()
- _goHome()
+function _goHomeAction(self)
+ JiveMain:goHome()
return EVENT_CONSUME
end
@@ -204,9 +204,6 @@
10)
Framework:addActionListener("go_home", self, _goHomeAction, 10)
-
- -- disconnect from player on press and hold left
- Framework:addActionListener("disconnect_player", self,
_disconnectPlayer, false)
-- show our window!
jiveMain.window:show()
Modified:
7.4/branches/pango/squeezeplay/src/squeezeplay/share/jive/ui/Framework.lua
URL:
http://svn.slimdevices.com/jive/7.4/branches/pango/squeezeplay/src/squeezeplay/share/jive/ui/Framework.lua?rev=5027&r1=5026&r2=5027&view=diff
==============================================================================
--- 7.4/branches/pango/squeezeplay/src/squeezeplay/share/jive/ui/Framework.lua
(original)
+++ 7.4/branches/pango/squeezeplay/src/squeezeplay/share/jive/ui/Framework.lua
Mon Mar 30 15:23:17 2009
@@ -45,6 +45,7 @@
local jnt = jnt
+local LONG_HOLD_TIME = 3500
-- our class
module(..., oo.class)
@@ -238,6 +239,14 @@
return self:convertInputToAction(event)
end,
9999)
+
+ self:registerAction("soft_reset")
+
+ self.longHoldBackTimer = Timer(LONG_HOLD_TIME,
+ function()
+ self:pushAction("soft_reset")
+ end,
+ true)
end
@@ -692,6 +701,20 @@
-- If an action is associated with the inputEvent, queue the corresponding
action event and return EVENT_CONSUME, otherwise EVENT_UNUSED nil if no
corresponding action was found
function convertInputToAction(self, inputEvent)
+ if (inputEvent:getType() & (jive.ui.EVENT_KEY_DOWN |
jive.ui.EVENT_KEY_UP ) ) > 0 then
+ local keycode = inputEvent:getKeycode()
+ if keycode == jive.ui.KEY_BACK or keycode == jive.ui.KEY_LEFT
then
+
+ local type = inputEvent:getType()
+ if type == jive.ui.EVENT_KEY_DOWN then
+ self.longHoldBackTimer:start()
+ end
+ if type == jive.ui.EVENT_KEY_UP then
+ self.longHoldBackTimer:stop()
+ end
+ end
+
+ end
local action = self:getAction(inputEvent)
if not action then
@@ -724,7 +747,7 @@
end
---example: addActionListener("disconnect_player", self, disconnectPlayerAction)
+--example: addActionListener("go_home", self, goHomeAction)
function addActionListener(self, action, obj, listener, priority)
_assert(type(listener) == "function")
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=5027&r1=5026&r2=5027&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 Mon
Mar 30 15:23:17 2009
@@ -234,18 +234,28 @@
end
+--[[
+
+=head2 ignoreAllInputExcept(excludedActions)
+
+Consume all input events except for i<excludedActions>. Note: The action
"soft_reset" is always included in the excluded actions.
+
+=cut
+--]]
function ignoreAllInputExcept(self, excludedActions)
if not self.ignoreAllInputHandle then
--also need to remove any hideOnAllButtonInputHandle, since in
the ignoreAllInput case
-- we want excluded actions to be seen by global listeners.
Leaving hideOnAllButtonInputHandle in place would
-- prevent the event from getting to global listeners
- log:error(self.hideOnAllButtonInputHandle)
-
if self.hideOnAllButtonInputHandle then
self:removeListener(self.hideOnAllButtonInputHandle)
self.hideOnAllButtonInputHandle = false
end
+ if not excludedActions then
+ excludedActions = {}
+ end
+ table.insert(excludedActions, "soft_reset")
self.ignoreAllInputHandle = self:addListener(EVENT_ALL_INPUT,
function(event)
@@ -1478,16 +1488,11 @@
local stableSortCounter = 1
self.zWidgets = {}
- for i, widget in ipairs(self.widgets) do
- if widget then
- widget._stableSortIndex = stableSortCounter
- table.insert(self.zWidgets, widget)
-
- stableSortCounter = stableSortCounter + 1
- end
- end
-
if self:getShowFrameworkWidgets() then
+ --framework widgets added to iterator list first so that if
default zorder is used,
+ -- framework widgets are drawn first - This is needed
+ -- to support, for instance, the SeupLanguage screen where
iconbar (a framework widget) is shown behind
+ -- a mini-help window.
for i, widget in ipairs(Framework:getWidgets()) do
if widget then
widget._stableSortIndex = stableSortCounter
@@ -1496,6 +1501,16 @@
end
end
end
+
+ for i, widget in ipairs(self.widgets) do
+ if widget then
+ widget._stableSortIndex = stableSortCounter
+ table.insert(self.zWidgets, widget)
+
+ stableSortCounter = stableSortCounter + 1
+ end
+ end
+
table.sort(self.zWidgets,
function(a, b)
Modified:
7.4/branches/pango/squeezeplay/src/squeezeplay_contrib/share/applets/Test/TestApplet.lua
URL:
http://svn.slimdevices.com/jive/7.4/branches/pango/squeezeplay/src/squeezeplay_contrib/share/applets/Test/TestApplet.lua?rev=5027&r1=5026&r2=5027&view=diff
==============================================================================
---
7.4/branches/pango/squeezeplay/src/squeezeplay_contrib/share/applets/Test/TestApplet.lua
(original)
+++
7.4/branches/pango/squeezeplay/src/squeezeplay_contrib/share/applets/Test/TestApplet.lua
Mon Mar 30 15:23:17 2009
@@ -518,13 +518,13 @@
local popup = Popup("popupIcon")
local icon = Icon("iconConnecting")
- local label = Label("text", "All input is ignored,
except:\n'disconnect_player', 'back', 'go'")
+ local label = Label("text", "All input is ignored,
except:\n'soft_reset', 'back', 'go'")
popup:addWidget(icon)
popup:addWidget(label)
- -- disable input, but still allow disconnect_player
- popup:ignoreAllInputExcept({"disconnect_player", "back"})
+ -- disable input
+ popup:ignoreAllInputExcept({"go", "back"})
--try some local listeners (comment out to see global handling - back
should still work
popup:addActionListener("back", popup, localBackAction)
Modified:
7.4/branches/pango/squeezeplay/src/squeezeplay_desktop/share/applets/DesktopJive/DesktopJiveMeta.lua
URL:
http://svn.slimdevices.com/jive/7.4/branches/pango/squeezeplay/src/squeezeplay_desktop/share/applets/DesktopJive/DesktopJiveMeta.lua?rev=5027&r1=5026&r2=5027&view=diff
==============================================================================
---
7.4/branches/pango/squeezeplay/src/squeezeplay_desktop/share/applets/DesktopJive/DesktopJiveMeta.lua
(original)
+++
7.4/branches/pango/squeezeplay/src/squeezeplay_desktop/share/applets/DesktopJive/DesktopJiveMeta.lua
Mon Mar 30 15:23:17 2009
@@ -93,8 +93,16 @@
appletManager:addDefaultSetting("Playback", "enableAudio", 1)
jiveMain:setDefaultSkin("FullscreenSkin")
+
+ Framework:addActionListener("soft_reset", self, _softResetAction, true)
+
+
end
+
+function _softResetAction(self, event)
+ jiveMain:goHome()
+end
--[[
Modified:
7.4/branches/pango/squeezeplay/src/squeezeplay_desktop/share/applets/SetupWelcome/SetupWelcomeApplet.lua
URL:
http://svn.slimdevices.com/jive/7.4/branches/pango/squeezeplay/src/squeezeplay_desktop/share/applets/SetupWelcome/SetupWelcomeApplet.lua?rev=5027&r1=5026&r2=5027&view=diff
==============================================================================
---
7.4/branches/pango/squeezeplay/src/squeezeplay_desktop/share/applets/SetupWelcome/SetupWelcomeApplet.lua
(original)
+++
7.4/branches/pango/squeezeplay/src/squeezeplay_desktop/share/applets/SetupWelcome/SetupWelcomeApplet.lua
Mon Mar 30 15:23:17 2009
@@ -105,7 +105,7 @@
disableHomeKeyDuringSetup = Framework:addActionListener("go_home",
self, _ignoreHomeAction)
- freeAppletWhenEscapingSetup =
Framework:addActionListener("disconnect_player", self, _freeAction)
+ freeAppletWhenEscapingSetup = Framework:addActionListener("soft_reset",
self, _freeAction)
return self.topWindow
Modified:
7.4/branches/pango/squeezeplay/src/squeezeplay_jive/share/applets/SqueezeboxJive/SqueezeboxJiveApplet.lua
URL:
http://svn.slimdevices.com/jive/7.4/branches/pango/squeezeplay/src/squeezeplay_jive/share/applets/SqueezeboxJive/SqueezeboxJiveApplet.lua?rev=5027&r1=5026&r2=5027&view=diff
==============================================================================
---
7.4/branches/pango/squeezeplay/src/squeezeplay_jive/share/applets/SqueezeboxJive/SqueezeboxJiveApplet.lua
(original)
+++
7.4/branches/pango/squeezeplay/src/squeezeplay_jive/share/applets/SqueezeboxJive/SqueezeboxJiveApplet.lua
Mon Mar 30 15:23:17 2009
@@ -40,6 +40,7 @@
local debug = require("jive.utils.debug")
local log =
require("jive.utils.log").logger("applets.setup")
+local jiveMain = jiveMain
local jnt = jnt
local iconbar = iconbar
local appletManager = appletManager
@@ -234,6 +235,7 @@
return EVENT_UNUSED
end)
+ Framework:addActionListener("soft_reset", self, _softResetAction, true)
-- brightness
self.lcdLevel = jiveBSP.ioctl(12) / 2048
@@ -258,6 +260,11 @@
jnt:subscribe(self)
return self
+end
+
+
+function _softResetAction(self, event)
+ jiveMain:disconnectPlayer()
end
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/jive-checkins