hal: Branch 'master'
David Zeuthen
david at kemper.freedesktop.org
Tue Jan 9 13:43:17 PST 2007
tools/device-manager/DeviceManager.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletion(-)
New commits:
diff-tree 7f835bfad5cd68579ff109b80f3adaaa2d156c77 (from a372bf79e16a5c6c00d0e262745dc935de364ca2)
Author: Martin Pitt <martin.pitt at ubuntu.com>
Date: Tue Jan 9 16:43:14 2007 -0500
h-d-m: beautify list values output
IIRC I already sent this a while ago, but it seems to have got lost.
This is a patch to prettify the display of list values in
hal-device-manager, i. e. instead of
[u'item', u'item']
you'll get
item, item
This was https://launchpad.net/bugs/35935, for the record.
diff --git a/tools/device-manager/DeviceManager.py b/tools/device-manager/DeviceManager.py
index b5fec40..d35e950 100644
--- a/tools/device-manager/DeviceManager.py
+++ b/tools/device-manager/DeviceManager.py
@@ -360,7 +360,7 @@ class DeviceManager(LibGladeApplication)
category.set_label("Unknown")
if device.properties.has_key("info.capabilities"):
- capabilities.set_label("%s"%device.properties["info.capabilities"])
+ capabilities.set_label(", ".join(device.properties["info.capabilities"]))
else:
capabilities.set_label("Unknown")
@@ -454,6 +454,8 @@ class DeviceManager(LibGladeApplication)
store.set(iter, 0, p, 1, "bool", 2, "false")
elif ptype==float:
store.set(iter, 0, p, 1, "float", 2, "%f"%val)
+ elif ptype==list:
+ store.set(iter, 0, p, 1, "list", 2, ", ".join(val))
else:
# assume strlist
store.set(iter, 0, p, 1, "strlist", 2, val)
More information about the hal-commit
mailing list