diff options
author | Martin Pitt <martin.pitt@ubuntu.com> | 2007-01-09 16:43:14 -0500 |
---|---|---|
committer | David Zeuthen <davidz@redhat.com> | 2007-01-09 16:43:14 -0500 |
commit | 7f835bfad5cd68579ff109b80f3adaaa2d156c77 (patch) | |
tree | 512d3102616dbf475e1e5c7bcda21571d447df2a /tools/device-manager | |
parent | a372bf79e16a5c6c00d0e262745dc935de364ca2 (diff) |
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.
Diffstat (limited to 'tools/device-manager')
-rw-r--r-- | tools/device-manager/DeviceManager.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/device-manager/DeviceManager.py b/tools/device-manager/DeviceManager.py index b5fec40e..d35e9500 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) |