GNOME Bugzilla – Bug 607492
widget.get_name() error?
Last modified: 2010-08-13 13:13:29 UTC
This code extracted works until upgrade lucid with python-gtk2 2.17.0 : gl = gtk.Builder() gl.add_from_file(glade_file) widgets = gl.get_objects() for widget in self.widgets: widget_name = widget.get_name() widget_name was the name used on glade file for the object like "workin_year" now it return the gobject type like GtkLabel Is it a regression Bug, is it a feature?
Since we didn't change anything between 2.16.x and 2.17.x I'm cc'ing Johan, he can give a competent answer since he wrote GtkBuilder :)
Classes can inherit get_name from Widget or implement Buildable. Some, like Adjustment, do neither, so this may fail. Of course this begs the question why Builder can still create them. There probably should be a get_object_names.
Hi, searching for a temporary solution i found this comment in launchpad https://bugs.launchpad.net/ubuntu/+source/pygtk/+bug/507739/comments/8 i don't know if it is a good "solution" but for now works for me ciao F.
Just to note, this bug causes the Gramps application to crash on ubuntu 10.04: http://www.gramps-project.org/bugs/view.php?id=3906 What is the best way to move forward? Change applications that use it, or update gtk/pygtk to obtain the old behaviour again?
It would seem the solution of https://bugzilla.gnome.org/show_bug.cgi?id=591085 causes this. So, I suppose the old behavior will not return and applications must be changed?
Old behavior won't return as per bug 591085