GNOME Bugzilla – Bug 496344
gtk-builder-convert failed on converting GLADE file
Last modified: 2009-02-09 22:58:23 UTC
Please describe the problem: I try to use gtk-builder-convert to convert GLADE file to GtkBuilder format. This tool fails on converting. Steps to reproduce: 1. Create a new project in GLADE 2. Insert a window 3. Place a button on window 4. Save GLADE project 5. Convert GLADE file by gtk-builder-convert Actual results: Error logs listed below Traceback (most recent call last):
+ Trace 177345
sys.exit(main(sys.argv))
conv.parse_file(input_filename)
self._parse()
self._convert(node.getAttribute("class"), node)
self._default_widget_converter(node)
self._convert_dialog_response(node, object_id, response)
if (node.tagName == 'object' and
make: *** [test.ui] Error 1 Expected results: Does this happen every time? Always Other information: OS: Ubuntu 7.10 GLADE: 3.4 I found that it's because of the property 'response_id' of button. I think the parsing of response_id can be ignored since button is not place on a GtkDialog control.
I found this bug, as well. It seems that two issues are apparent here: 1. Glade always puts a "response_id" into any button definition, despite the fact that it's meaningless for anything except those in a GtkDialog 2. The gtk-builder-convert file assumes that if a "response_id" exists, it must be a GtkDialog Neither of these are optimal, but since it's unlikely that Glade will fix itself, gtk-builder-convert should definitely ignore response_id unless it's within a GtkDialog. It traverses the tree backwards until it finds a "GtkDialog", ignoring the fact that it may have already bypassed a top-level widget ("GtkWindow", etc). It ignores any other top-level widget and tries to go up another level to the Document element, at which point it fails.
Please report GtkBuilder bugs in the right component, I won't be able to see them if not. I am pretty sure this is already fixed. Can you please retry with the latest release version of gtk+?
With GTK+ 2.12 this error does'nt occur.
I'm closing as OBSOLETE then :)