Bug 559947 – Unchecked dependency on python>=2.4

2008-11-25  Johan Dahlin  <jdahlin@async.com.br>

    Bug 559947 – Unchecked dependency on python>=2.4

    * gtk/gtk-builder-convert:
    Avoid using sorted() which is only present in python 2.


svn path=/trunk/; revision=21807
This commit is contained in:
Johan Dahlin 2008-11-25 13:09:43 +00:00 committed by Johan Dahlin
parent 13d18fe980
commit def5d1c47f
2 changed files with 15 additions and 3 deletions

View File

@ -1,3 +1,10 @@
2008-11-25 Johan Dahlin <jdahlin@async.com.br>
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 <tvb@gnome.org>
* gtk/gtkalignment.c: Bug 561539 - Fix warnings when size allocations

View File

@ -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):