After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 496344 - gtk-builder-convert failed on converting GLADE file
gtk-builder-convert failed on converting GLADE file
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Class: GtkBuilder
unspecified
Other All
: Normal minor
: ---
Assigned To: GtkBuilder maintainers
GtkBuilder maintainers
Depends on:
Blocks:
 
 
Reported: 2007-11-13 05:23 UTC by Crano Tan
Modified: 2009-02-09 22:58 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20



Description Crano Tan 2007-11-13 05:23:37 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):
  • File "/usr/bin/gtk-builder-convert", line 690 in <module>
    sys.exit(main(sys.argv))
  • File "/usr/bin/gtk-builder-convert", line 678 in main
    conv.parse_file(input_filename)
  • File "/usr/bin/gtk-builder-convert", line 147 in parse_file
    self._parse()
  • File "/usr/bin/gtk-builder-convert", line 223 in _parse
    self._convert(node.getAttribute("class"), node)
  • File "/usr/bin/gtk-builder-convert", line 249 in _convert
    self._default_widget_converter(node)
  • File "/usr/bin/gtk-builder-convert", line 266 in _default_widget_converter
    self._convert_dialog_response(node, object_id, response)
  • File "/usr/bin/gtk-builder-convert", line 470 in _convert_dialog_response
    if (node.tagName == 'object' and
AttributeError: Document instance has no attribute 'tagName'
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.
Comment 1 James Stephenson 2007-11-14 16:26:00 UTC
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.
Comment 2 Johan (not receiving bugmail) Dahlin 2008-03-01 23:18:08 UTC
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+?
Comment 3 Benjamin E. 2008-07-09 15:00:29 UTC
With GTK+ 2.12 this error does'nt occur.
Comment 4 Tobias Mueller 2009-02-09 22:58:23 UTC
I'm closing as OBSOLETE then :)