hal/tools/device-manager DeviceManager.py,1.19,1.20
David Zeuthen
david at freedesktop.org
Tue Feb 22 11:42:06 PST 2005
Update of /cvs/hal/hal/tools/device-manager
In directory gabe:/tmp/cvs-serv13336/tools/device-manager
Modified Files:
DeviceManager.py
Log Message:
2005-02-22 David Zeuthen <davidz at redhat.com>
* tools/device-manager/DeviceManager.py:
(DeviceManager.device_changed): Make this work again after the D-BUS
updates
Index: DeviceManager.py
===================================================================
RCS file: /cvs/hal/hal/tools/device-manager/DeviceManager.py,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- DeviceManager.py 16 Feb 2005 18:39:56 -0000 1.19
+++ DeviceManager.py 22 Feb 2005 19:42:04 -0000 1.20
@@ -90,13 +90,13 @@
"PropertyModified",
"org.freedesktop.Hal.Device",
"org.freedesktop.Hal",
- udi, expand_args=False)
+ udi)
return
self.bus.add_signal_receiver(self.device_changed,
"Condition",
"org.freedesktop.Hal.Device",
"org.freedesktop.Hal",
- udi, expand_args=False)
+ udi)
def remove_device_signal_recv (self, udi):
self.bus.remove_signal_receiver(self.device_changed,
@@ -129,28 +129,26 @@
self.update_device_notebook(device)
- def device_changed(self, sender, device):
+ def device_changed(self, sender, num_changes, change_list):
"""This method is called when signals on the Device interface is
received"""
- print "device_changed: " + sender.signal_name
+ device_udi = sender.path
if sender.signal_name=="Condition":
print "\nCondition %s, device=%s"%(device, sender.path)
print " message = ", args
elif sender.signal_name=="PropertyModified":
- num_modifications = device
print "\nPropertyModified, device=%s"%sender.path
#print "dbus_obj_path", sender.path
- for i in range(0, num_modifications):
- property_name = args[1+3*i]
- removed = args[2+3*i]
- added = args[3+3*i]
+ for i in change_list:
+ property_name = i[0]
+ removed = i[1]
+ added = i[2]
print " key=%s, rem=%d, add=%d"%(property_name, removed, added)
if property_name=="info.parent":
self.update_device_list()
else:
- device_udi = dbus_obj_path
device_udi_obj = self.hal_service.get_object(device_udi,
"org.freedesktop.Hal.Device")
device_obj = self.udi_to_device(device_udi)
More information about the hal-commit
mailing list