Improve gtk-builder-convert error reporting

Make gtk-builder-convert warn when it meets duplicate ids, since
those will not work with GtkBuilder.
This commit is contained in:
Matthias Clasen 2009-04-06 20:21:04 -04:00
parent 1a312bfa3e
commit 209af946f3

View File

@ -257,6 +257,8 @@ class GtkBuilderConverter(object):
for node in objects: for node in objects:
self._convert(node.getAttribute("class"), node) self._convert(node.getAttribute("class"), node)
if self._get_object(node.getAttribute('id')) is not None:
print "WARNING: duplicate id \"" + node.getAttribute('id') + "\""
self.objects[node.getAttribute('id')] = node self.objects[node.getAttribute('id')] = node
# Convert Gazpachos UI tag # Convert Gazpachos UI tag