Author: dmeyer
Date: Thu Jan 26 20:55:50 2006
New Revision: 7881
Modified:
trunk/ui/src/helpers/shutdown.py
trunk/ui/src/plugins/mbus.py
Log:
add new mbus.status code for testing
Modified: trunk/ui/src/helpers/shutdown.py
==============================================================================
--- trunk/ui/src/helpers/shutdown.py (original)
+++ trunk/ui/src/helpers/shutdown.py Thu Jan 26 20:55:50 2006
@@ -131,10 +131,23 @@
self.__last_wakeuptime = 0
# get entity change notifications
mbus = freevo.ipc.Instance()
+ mbus.connect('freevo.ipc.status')
+ mbus.status.signals['changed'].connect(self.status_change)
+ mbus.status.monitor()
mbus.signals['new-entity'].connect(self.entity_update)
mbus.signals['lost-entity'].connect(self.entity_update)
+ def status_change(self, entity):
+ """
+ Status change for an entity.
+ """
+ # This does nothing right, other parts of Freevo need to be updated
+ # to the new status ipc code
+ # print entity, entity.status
+ pass
+
+
def entity_update(self, entity):
"""
An entity was added/removed from the mbus.
Modified: trunk/ui/src/plugins/mbus.py
==============================================================================
--- trunk/ui/src/plugins/mbus.py (original)
+++ trunk/ui/src/plugins/mbus.py Thu Jan 26 20:55:50 2006
@@ -17,10 +17,12 @@
self.idle_time = 0
mbus = freevo.ipc.Instance()
+ mbus.connect('freevo.ipc.status')
mbus.connect_rpc(self.play, 'home-theatre.play')
mbus.connect_rpc(self.stop, 'home-theatre.stop')
mbus.connect_rpc(self.status, 'home-theatre.status')
+ self.status = mbus.status
def plugin_activate(self):
"""
@@ -69,5 +71,8 @@
def update_idle_time(self):
- self.idle_time += 1
+ app = application.get_active()
+ if app and app.get_name() == 'menu':
+ self.idle_time += 1
+ self.status.set('idle', self.idle_time)
return True
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog