Author: titmuss
Date: Tue Jan 22 13:58:46 2008
New Revision: 1570
URL: http://svn.slimdevices.com?rev=1570&root=Jive&view=rev
Log:
[EMAIL PROTECTED] (orig r1554): bklaas | 2008-01-22 17:50:22 +0000
Bug: 6627
Description: don't break encapsulation of player object, instead use Player
methods to return information about the player obj.
Modified:
trunk/ (props changed)
trunk/jive/src/pkg/jive/share/applets/SlimBrowser/SlimBrowserApplet.lua
Propchange: trunk/
------------------------------------------------------------------------------
--- svk:merge (original)
+++ svk:merge Tue Jan 22 13:58:46 2008
@@ -1,3 +1,3 @@
-bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/7.0:1553
+bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/7.0:1554
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/SN:1083
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/scrolling:1378
Modified:
trunk/jive/src/pkg/jive/share/applets/SlimBrowser/SlimBrowserApplet.lua
URL:
http://svn.slimdevices.com/trunk/jive/src/pkg/jive/share/applets/SlimBrowser/SlimBrowserApplet.lua?rev=1570&root=Jive&r1=1569&r2=1570&view=diff
==============================================================================
--- trunk/jive/src/pkg/jive/share/applets/SlimBrowser/SlimBrowserApplet.lua
(original)
+++ trunk/jive/src/pkg/jive/share/applets/SlimBrowser/SlimBrowserApplet.lua Tue
Jan 22 13:58:46 2008
@@ -553,7 +553,7 @@
-- replace player if needed
local playerid = jsonAction["player"]
if not playerid or tostring(playerid) == "0" then
- playerid = _player.id
+ playerid = _player:getId()
end
-- look for __INPUT__ as a param value
@@ -622,7 +622,8 @@
local popup = Popup("popupIcon")
local icon = Icon("iconConnecting")
- local label = Label("text", self:string("SLIMBROWSER_CONNECTING_TO",
player.name))
+ local playerName = player:getName()
+ local label = Label("text", self:string("SLIMBROWSER_CONNECTING_TO",
playerName))
popup:addWidget(icon)
popup:addWidget(label)
popup:setAlwaysOnTop(true)
@@ -774,10 +775,10 @@
-- the player ID this notification is for is in chunk.data[4]
local playerId = chunk.data[4]
- if playerId ~= 'all' and playerId ~= _player.id then
+ if playerId ~= 'all' and playerId ~= _player:getId() then
log:debug('***** This menu notification was not for
this player ***** ')
log:debug("Notification for: ", playerId)
- log:debug("This player is: ", _player.id)
+ log:debug("This player is: ", _player:getId())
return
end
@@ -901,7 +902,7 @@
if from then
_server:request(
step.sink,
- _player.id,
+ _player:getId(),
{ 'status', from, qty, 'menu:menu' }
)
end
@@ -1874,7 +1875,7 @@
if not _player and player then
log:info("First load...get the correct wallpaper on screen")
local SetupWallpaper =
AppletManager:loadApplet("SetupWallpaper")
- SetupWallpaper:_setBackground(nil, player.id)
+ SetupWallpaper:_setBackground(nil, player:getId())
AppletManager:freeApplet("SetupWallpaper")
end
@@ -1892,13 +1893,14 @@
_player = player
_server = player:getSlimServer()
_string = function(token) return self:string(token) end
-
- log:warn('**** SUBSCRIBING to /slim/menustatus/', _player.id)
+ local _playerId = _player:getId()
+
+ log:warn('**** SUBSCRIBING to /slim/menustatus/', _playerId)
local cmd = { 'menustatus' }
_server.comet:subscribe(
- '/slim/menustatus/' .. _player.id,
+ '/slim/menustatus/' .. _playerId,
_menuSink(sink, cmd),
- _player.id,
+ _playerId,
cmd
)
@@ -1923,7 +1925,7 @@
_statusStep.actionModifier = "-status"
-- showtime for the player
- _server:request(sink, _player.id, { 'menu', 0, 100 })
+ _server:request(sink, _playerId, { 'menu', 0, 100 })
_player:onStage()
_requestStatus()
@@ -2033,9 +2035,9 @@
log:debug("SlimBrowserApplet:free()")
-- unsubscribe from this player's menustatus
- log:warn("***** UNSUBSCRIBING FROM /slim/menustatus/", _player.id)
+ log:warn("***** UNSUBSCRIBING FROM /slim/menustatus/", _player:getId())
if _server and _player then
- _server.comet:unsubscribe('/slim/menustatus/' .. _player.id)
+ _server.comet:unsubscribe('/slim/menustatus/' ..
_player:getId())
end
if _player then
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive-checkins