diff --git a/ChangeLog b/ChangeLog index 17fdba023c..e74727b1ac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-11-25 Johan Dahlin + + Bug 559947 – Unchecked dependency on python>=2.4 + + * gtk/gtk-builder-convert: + Avoid using sorted() which is only present in python 2. + 2008-11-24 Tristan Van Berkom * gtk/gtkalignment.c: Bug 561539 - Fix warnings when size allocations diff --git a/gtk/gtk-builder-convert b/gtk/gtk-builder-convert index 79c9e4ee12..470e206de1 100755 --- a/gtk/gtk-builder-convert +++ b/gtk/gtk-builder-convert @@ -269,9 +269,14 @@ class GtkBuilderConverter(object): # Output the newly created root objects and sort them # by attribute id - for obj in sorted(self.root_objects, - key=lambda n: n.getAttribute('id'), - reverse=True): + # FIXME: Use sorted(self.root_objects, + # key=lambda n: n.getAttribute('id'), + # reverse=True): + # when we can depend on python 2.4 or higher + root_objects = self.root_objects[:] + root_objects.sort(lambda a, b: cmp(b.getAttribute('id'), + a.getAttribute('id'))) + for obj in root_objects: self._interface.childNodes.insert(0, obj) def _convert(self, klass, node):