hal/tools/device-manager DeviceManager.py,1.15,1.15.2.1

David Zeuthen david at freedesktop.org
Mon Nov 8 14:33:41 PST 2004


Update of /cvs/hal/hal/tools/device-manager
In directory gabe:/tmp/cvs-serv4214/tools/device-manager

Modified Files:
      Tag: hal-0_4-stable-branch
	DeviceManager.py 
Log Message:
2004-11-08  David Zeuthen  <davidz at redhat.com>

	* tools/device-manager/DeviceManager.py: 
	Patch from Bryan Clark <bclark at redhat.com>: I've noticed that the
	category and capabilities labels on the Device tab of
	hal-device-manager never changes beyond "Unknown".



Index: DeviceManager.py
===================================================================
RCS file: /cvs/hal/hal/tools/device-manager/DeviceManager.py,v
retrieving revision 1.15
retrieving revision 1.15.2.1
diff -u -d -r1.15 -r1.15.2.1
--- DeviceManager.py	1 Sep 2004 17:38:59 -0000	1.15
+++ DeviceManager.py	8 Nov 2004 22:33:39 -0000	1.15.2.1
@@ -356,8 +356,16 @@
             vendor.set_label("Unknown")
 
         # clear category, capabilities
-        category.set_label("Unknown")
-        capabilities.set_label("Unknown")
+        # set category, capabilities
+        if device.properties.has_key("info.category"):
+            category.set_label("%s"%device.properties["info.category"])
+        else:
+	    category.set_label("Unknown")
+
+	if device.properties.has_key("info.capabilities"):
+            capabilities.set_label("%s"%device.properties["info.capabilities"])
+	else:
+	    capabilities.set_label("Unknown")
 
     def update_tab_usb(self, device):
         """Updates the 'USB' tab given a Device object; may hide it"""




More information about the hal-commit mailing list