forked from AuroraMiddleware/gtk
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:
parent
13d18fe980
commit
def5d1c47f
@ -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
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user