[Pkg-utopia-commits] r1244 - in packages/unstable/hal/debian: .
patches
Sebastian Dröge
slomo at alioth.debian.org
Thu Mar 1 13:09:12 CET 2007
Author: slomo
Date: 2007-03-01 14:09:12 +0100 (Thu, 01 Mar 2007)
New Revision: 1244
Added:
packages/unstable/hal/debian/patches/30_dbus-python-0.80.patch
Modified:
packages/unstable/hal/debian/changelog
Log:
* add patch for dbus-python 0.80
Modified: packages/unstable/hal/debian/changelog
===================================================================
--- packages/unstable/hal/debian/changelog 2007-02-18 11:43:48 UTC (rev 1243)
+++ packages/unstable/hal/debian/changelog 2007-03-01 13:09:12 UTC (rev 1244)
@@ -1,3 +1,11 @@
+hal (0.5.8.1-8) unstable; urgency=low
+
+ * debian/patches/30_dbus-python-0.80.patch:
+ + Correctly show HAL properties in hal-device-manager with dbus-python
+ 0.80. https://bugs.freedesktop.org/show_bug.cgi?id=9343
+
+ -- Sebastian Dröge <slomo at debian.org> Thu, 1 Mar 2007 14:07:40 +0100
+
hal (0.5.8.1-7) unstable; urgency=low
* Acknowledge Steve Langasek's NMU. (Closes: #370186)
Added: packages/unstable/hal/debian/patches/30_dbus-python-0.80.patch
===================================================================
--- packages/unstable/hal/debian/patches/30_dbus-python-0.80.patch 2007-02-18 11:43:48 UTC (rev 1243)
+++ packages/unstable/hal/debian/patches/30_dbus-python-0.80.patch 2007-03-01 13:09:12 UTC (rev 1244)
@@ -0,0 +1,52 @@
+--- tools/device-manager/DeviceManager.py.old 2007-03-01 13:51:25.642701954 +0100
++++ tools/device-manager/DeviceManager.py 2007-03-01 13:53:45.690682834 +0100
+@@ -367,7 +367,7 @@
+ # clear category, capabilities
+ # set category, capabilities
+ if device.properties.has_key("info.category"):
+- category.set_label("%s"%device.properties["info.category"])
++ category.set_label('"' + '", "'.join(device.properties["info.capabilities"]) + '"')
+ else:
+ category.set_label("Unknown")
+
+@@ -453,24 +453,30 @@
+ iter = store.append()
+ val = device.properties[p]
+ ptype = type(val)
+- if ptype==str:
++ if issubclass(ptype, str):
+ store.set(iter, 0, p, 1, "string", 2, "%s"%val)
+- elif ptype==int:
+- store.set(iter, 0, p, 1, "int", 2, "%d (0x%x)"%(val, val))
+- elif ptype==long:
+- store.set(iter, 0, p, 1, "long", 2, "%d (0x%x)"%(val, val))
+- elif ptype==bool:
++ elif issubclass(ptype, unicode):
++ store.set(iter, 0, p, 1, "string", 2, val.encode('utf-8'))
++ elif issubclass(ptype, (bool, dbus.Boolean)):
+ if val:
+ store.set(iter, 0, p, 1, "bool", 2, "true")
+ else:
+ store.set(iter, 0, p, 1, "bool", 2, "false")
+- elif ptype==float:
++ elif issubclass(ptype, int):
++ store.set(iter, 0, p, 1, "int", 2, "%d (0x%x)"%(val, val))
++ elif issubclass(ptype, long):
++ store.set(iter, 0, p, 1, "long", 2, "%d (0x%x)"%(val, val))
++ elif issubclass(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)
++ elif issubclass(ptype, list):
++ # assume strlist
++ formatted = (u'"' + u'", "'.join(val) + u'"').encode('utf-8')
++ store.set(iter, 0, p, 1, "strlist", 2, formatted)
++ else:
++ # should never happen
++ store.set(iter, 0, p, 1, "(unknown type)", 2, "")
+
+
+ prop_tree_view = self.xml.get_widget("ns_adv_properties")
More information about the Pkg-utopia-commits
mailing list