Author: adrian
Date: Wed Mar 12 10:23:27 2008
New Revision: 2104

URL: http://svn.slimdevices.com?rev=2104&root=Jive&view=rev
Log:
Bug: 6949
Description: remove infobrowser from menus when no player attached

Modified:
    
trunk/squeezeplay/src/squeezeplay/share/applets/InfoBrowser/InfoBrowserMeta.lua

Modified: 
trunk/squeezeplay/src/squeezeplay/share/applets/InfoBrowser/InfoBrowserMeta.lua
URL: 
http://svn.slimdevices.com/trunk/squeezeplay/src/squeezeplay/share/applets/InfoBrowser/InfoBrowserMeta.lua?rev=2104&root=Jive&r1=2103&r2=2104&view=diff
==============================================================================
--- 
trunk/squeezeplay/src/squeezeplay/share/applets/InfoBrowser/InfoBrowserMeta.lua 
(original)
+++ 
trunk/squeezeplay/src/squeezeplay/share/applets/InfoBrowser/InfoBrowserMeta.lua 
Wed Mar 12 10:23:27 2008
@@ -13,6 +13,7 @@
 local appletManager = appletManager
 local jiveMain      = jiveMain
 
+local jnt           = jnt
 
 module(...)
 oo.class(_M, AppletMeta)
@@ -24,7 +25,17 @@
 
 
 function registerApplet(meta)
-       jiveMain:addItem(
-               meta:menuItem('appletInfoBrowser', 'extras', 
meta:string('INFOBROWSER'), function(applet, ...) applet:menu(...) end, 10)
-       )
+       jnt:subscribe(meta)
+       meta.menu = meta:menuItem('appletInfoBrowser', 'extras', 
meta:string('INFOBROWSER'), function(applet, ...) applet:menu(...) end, 10)
 end
+
+
+-- only show on the menu if a player is attached
+-- this allows SN to use the player id to select which information feeds to 
show
+function notify_playerCurrent(meta, player)
+       if player == nil then
+               jiveMain:removeItem(meta.menu)
+       else
+               jiveMain:addItem(meta.menu)
+       end
+end

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

Reply via email to