Author: titmuss
Date: Fri Apr 11 15:34:39 2008
New Revision: 2224
URL: http://svn.slimdevices.com?rev=2224&root=Jive&view=rev
Log:
[EMAIL PROTECTED] (orig r2222): bklaas | 2008-04-11 22:28:05 +0100
Bug: 6907
Description: when no artwork is present in showBriefly, use textarea to wrap
text message.
Adjust DefaultSkin to handle textarea in popupplay style
[EMAIL PROTECTED] (orig r2223): titmuss | 2008-04-11 23:28:59 +0100
Bug: 5548
Description:
Allow the option to disable the startup sound, and set the sound effects
volume correctly
before the startup sound is played.
To do this the startup sound is no longer played in Framework:init(), instead
the sounds
are loaded and played from SetupSoundEffectsMeta. To keep the splash screen
and startup
sound in sync the splash screen is loaded slightly later and AppletManager
forces the
SetupSoundEffects applet to be loaded first.
Modified:
7.1/trunk/ (props changed)
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/DefaultSkin/DefaultSkinApplet.lua
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SetupSoundEffects/SetupSoundEffectsApplet.lua
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SetupSoundEffects/SetupSoundEffectsMeta.lua
7.1/trunk/squeezeplay/src/squeezeplay/share/jive/AppletManager.lua
7.1/trunk/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua
7.1/trunk/squeezeplay/src/squeezeplay/src/ui/jive_framework.c
Propchange: 7.1/trunk/
------------------------------------------------------------------------------
--- svk:merge (original)
+++ svk:merge Fri Apr 11 15:34:39 2008
@@ -1,4 +1,4 @@
-bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.0/trunk:2215
+bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.0/trunk:2223
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.1/trunk/squeezeplay/src/squeezeplay/share/applets/DefaultSkin/DefaultSkinApplet.lua
URL:
http://svn.slimdevices.com/7.1/trunk/squeezeplay/src/squeezeplay/share/applets/DefaultSkin/DefaultSkinApplet.lua?rev=2224&root=Jive&r1=2223&r2=2224&view=diff
==============================================================================
---
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/DefaultSkin/DefaultSkinApplet.lua
(original)
+++
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/DefaultSkin/DefaultSkinApplet.lua
Fri Apr 11 15:34:39 2008
@@ -67,7 +67,6 @@
-- Define useful variables for this skin
local imgpath = "applets/DefaultSkin/images/"
-local sndpath = "applets/DefaultSkin/sounds/"
local fontpath = "fonts/"
-- define a local function to make it easier to create icons.
@@ -104,17 +103,6 @@
-- The meta arranges for this to be called to skin Jive.
function skin(self, s)
local screenWidth, screenHeight = Framework:getScreenSize()
-
- -- Sounds
- Framework:loadSound("BUMP", sndpath .. "bump.wav", 1)
- Framework:loadSound("CLICK", sndpath .. "click.wav", 0)
- Framework:loadSound("JUMP", sndpath .. "jump.wav", 0)
- Framework:loadSound("WINDOWSHOW", sndpath .. "pushleft.wav", 1)
- Framework:loadSound("WINDOWHIDE", sndpath .. "pushright.wav", 1)
- Framework:loadSound("SELECT", sndpath .. "select.wav", 0)
- Framework:loadSound("PLAYBACK", sndpath .. "select.wav", 0)
- Framework:loadSound("DOCKING", sndpath .. "docking.wav", 1)
- Framework:loadSound("SHUTDOWN", sndpath .. "shutdown.wav", 1)
-- Images and Tiles
local iconBackground =
@@ -1188,6 +1176,15 @@
s.popupplay.text.fg = TEXT_COLOR
s.popupplay.text.align = "top-left"
+ -- for textarea properties in popupplay
+ s.popupplay.padding = 12
+ s.popupplay.h = 72
+ s.popupplay.fg = TEXT_COLOR
+ s.popupplay.font = FONT_15px
+ s.popupplay.align = "top-left"
+ s.popupplay.scrollbar = {}
+ s.popupplay.scrollbar.w = 0
+
-- Popup window for information display
s.popupinfo = {}
s.popupinfo.x = 0
Modified:
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SetupSoundEffects/SetupSoundEffectsApplet.lua
URL:
http://svn.slimdevices.com/7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SetupSoundEffects/SetupSoundEffectsApplet.lua?rev=2224&root=Jive&r1=2223&r2=2224&view=diff
==============================================================================
---
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SetupSoundEffects/SetupSoundEffectsApplet.lua
(original)
+++
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SetupSoundEffects/SetupSoundEffectsApplet.lua
Fri Apr 11 15:34:39 2008
@@ -68,6 +68,10 @@
SOUND_CHARGING = {
"DOCKING"
},
+ SOUND_NONE = {
+ "STARTUP",
+ "SHUTDOWN"
+ },
}
@@ -141,12 +145,14 @@
allButtons[button] = v
- -- insert suitable entry for Choice menu
- menu:addItem({
- text = self:string(k),
- icon = button,
- weight = 10
- })
+ if k ~= "SOUND_NONE" then
+ -- insert suitable entry for Choice menu
+ menu:addItem({
+ text = self:string(k),
+ icon = button,
+ weight = 10
+ })
+ end
end
offButton:setSelected(not effectsEnabled)
Modified:
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SetupSoundEffects/SetupSoundEffectsMeta.lua
URL:
http://svn.slimdevices.com/7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SetupSoundEffects/SetupSoundEffectsMeta.lua?rev=2224&root=Jive&r1=2223&r2=2224&view=diff
==============================================================================
---
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SetupSoundEffects/SetupSoundEffectsMeta.lua
(original)
+++
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/SetupSoundEffects/SetupSoundEffectsMeta.lua
Fri Apr 11 15:34:39 2008
@@ -52,6 +52,24 @@
end
end
+ local sndpath = "applets/DefaultSkin/sounds/"
+
+ -- The startup sound needs to be played with the minimum
+ -- delay, load and play it first
+ Framework:loadSound("STARTUP", "jive/splash.wav", 1)
+ Framework:playSound("STARTUP")
+
+ -- Load sounds
+ Framework:loadSound("BUMP", sndpath .. "bump.wav", 1)
+ Framework:loadSound("CLICK", sndpath .. "click.wav", 0)
+ Framework:loadSound("JUMP", sndpath .. "jump.wav", 0)
+ Framework:loadSound("WINDOWSHOW", sndpath .. "pushleft.wav", 1)
+ Framework:loadSound("WINDOWHIDE", sndpath .. "pushright.wav", 1)
+ Framework:loadSound("SELECT", sndpath .. "select.wav", 0)
+ Framework:loadSound("PLAYBACK", sndpath .. "select.wav", 0)
+ Framework:loadSound("DOCKING", sndpath .. "docking.wav", 1)
+ Framework:loadSound("SHUTDOWN", sndpath .. "shutdown.wav", 1)
+
-- add a menu to load us
jiveMain:addItem(meta:menuItem('appletSetupSoundEffects',
'advancedSettings', "SOUND_EFFECTS", function(applet, ...)
applet:settingsShow(...) end))
end
Modified: 7.1/trunk/squeezeplay/src/squeezeplay/share/jive/AppletManager.lua
URL:
http://svn.slimdevices.com/7.1/trunk/squeezeplay/src/squeezeplay/share/jive/AppletManager.lua?rev=2224&root=Jive&r1=2223&r2=2224&view=diff
==============================================================================
--- 7.1/trunk/squeezeplay/src/squeezeplay/share/jive/AppletManager.lua
(original)
+++ 7.1/trunk/squeezeplay/src/squeezeplay/share/jive/AppletManager.lua Fri Apr
11 15:34:39 2008
@@ -276,6 +276,14 @@
log:debug("AppletManager:loadApplets")
_findApplets()
+
+ -- load the sound effects applet first so the startup
+ -- sound is played without delay.
+ -- FIXME make the startup order of applet configurable
+ local soundEffectsEntry = _appletsDb["SetupSoundEffects"]
+ _loadMeta(soundEffectsEntry)
+ _evalMeta(soundEffectsEntry)
+
_loadMetas()
_evalMetas()
end
Modified: 7.1/trunk/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua
URL:
http://svn.slimdevices.com/7.1/trunk/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua?rev=2224&root=Jive&r1=2223&r2=2224&view=diff
==============================================================================
--- 7.1/trunk/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua (original)
+++ 7.1/trunk/squeezeplay/src/squeezeplay/share/jive/slim/Player.lua Fri Apr 11
15:34:39 2008
@@ -47,6 +47,7 @@
local Popup = require("jive.ui.Popup")
local Icon = require("jive.ui.Icon")
local Label = require("jive.ui.Label")
+local Textarea = require("jive.ui.Textarea")
local Window = require("jive.ui.Window")
local Group = require("jive.ui.Group")
@@ -778,8 +779,10 @@
local type = display["type"] or 'text'
local s = self.currentSong
+ local showMe
if type == 'song' then
+ showMe = s.window
-- new song display from server
s.text:setValue(table.concat(display["text"], "\n"))
s.artIcon:setStyle("icon")
@@ -789,11 +792,13 @@
self.slimServer:fetchArtworkThumb(display["icon-id"], s.artIcon, 56, 'png')
end
else
- s.text:setValue(table.concat(display["text"], "\n"))
- s.artIcon:setStyle("noimage")
- s.artIcon:setValue(nil)
+ local textarea = Textarea('popupplay',
table.concat(display['text'], ' '))
+ showMe = Popup("currentsong")
+ showMe:addWidget(textarea)
+ showMe:setAllowScreensaver(true)
+ showMe:setAlwaysOnTop(true)
end
- s.window:showBriefly(3000, nil, Window.transitionPushPopupUp,
Window.transitionPushPopupDown)
+ showMe:showBriefly(3000, nil, Window.transitionPushPopupUp,
Window.transitionPushPopupDown)
end
end
Modified: 7.1/trunk/squeezeplay/src/squeezeplay/src/ui/jive_framework.c
URL:
http://svn.slimdevices.com/7.1/trunk/squeezeplay/src/squeezeplay/src/ui/jive_framework.c?rev=2224&root=Jive&r1=2223&r2=2224&view=diff
==============================================================================
--- 7.1/trunk/squeezeplay/src/squeezeplay/src/ui/jive_framework.c (original)
+++ 7.1/trunk/squeezeplay/src/squeezeplay/src/ui/jive_framework.c Fri Apr 11
15:34:39 2008
@@ -146,6 +146,18 @@
exit(-1);
}
+// SDL_ShowCursor (SDL_DISABLE);
+ SDL_EnableKeyRepeat (100, 100);
+
+ tolua_pushusertype(L, srf, "Surface");
+ lua_setfield(L, -2, "surface");
+
+ /* init audio */
+ jiveL_init_audio(L);
+
+ /* background image */
+ jive_background = jive_tile_fill_color(0x000000FF);
+
/* show splash screen */
splash = jive_surface_load_image("jive/splash.png");
if (splash) {
@@ -153,35 +165,6 @@
jive_surface_blit(splash, srf, (screen_w - splash_w) / 2,
(screen_h - splash_h) / 2);
jive_surface_flip(srf);
}
-
-// SDL_ShowCursor (SDL_DISABLE);
- SDL_EnableKeyRepeat (100, 100);
-
- tolua_pushusertype(L, srf, "Surface");
- lua_setfield(L, -2, "surface");
-
- /* init audio */
- jiveL_init_audio(L);
-
- /* play startup sound */
- lua_getglobal(L, "jive");
- lua_getfield(L, -1, "ui");
- lua_getfield(L, -1, "Audio");
- lua_getfield(L, -1, "loadSound");
- lua_pushvalue(L, -2);
- lua_pushstring(L, "jive/splash.wav");
- lua_pushnumber(L, 1);
- lua_call(L, 3, 1);
-
- if (!lua_isnil(L, -1)) {
- lua_getfield(L, -1, "play");
- lua_pushvalue(L, -2);
- lua_call(L, 1, 0);
- }
- lua_pop(L, 1);
-
- /* background image */
- jive_background = jive_tile_fill_color(0x000000FF);
/* jive.ui.style = {} */
lua_getglobal(L, "jive");
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive-checkins