small fix to device manager

Bryan Clark bclark at redhat.com
Tue Nov 2 11:51:59 PST 2004


Hi ~

I've noticed that the category and capabilities labels on the Device tab
of hal-device-manager never changes beyond "Unknown".

I've found the following patch fixes this issue.

Cheers,
~ Bryan

Index: DeviceManager.py
===================================================================
RCS file: /cvs/hal/hal/tools/device-manager/DeviceManager.py,v
retrieving revision 1.15
diff -u -b -B -r1.15 DeviceManager.py
--- DeviceManager.py	1 Sep 2004 17:38:59 -0000	1.15
+++ DeviceManager.py	1 Nov 2004 23:22:48 -0000
@@ -355,8 +355,15 @@
             product.set_label("Unknown")
             vendor.set_label("Unknown")
 
-        # clear category, capabilities
+        # 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):

_______________________________________________
hal mailing list
hal at freedesktop.org
http://freedesktop.org/mailman/listinfo/hal



More information about the Hal mailing list