I'm having an issue with PyGTK and GTK Builder windows. Here's a simplified version of my code.
class GUI:
def __init__(self,parent):
builder_file = "./ui/window.builder"
self.builder = gtk.Builder()
self.builder.add_from_file(builder_file)
self.window = self.builder.get_object('main')
self.builder.connect_signals( self )
self.populate_window()
self.window.show()
def populate_window(self):
hbox = self.builder.get_object('hbox')
hbox.pack_start( somewidgets )
def on_destroy(self):
self.window.destroy()
The gtk builder file just contains a toplevel window with a horizontal packing box and signal to the destroy. This appears to work and the window is created and populated just fine, but if I try to destroy the window that has been populated with any other widgets python segfaults.
I'm thinking this it's some issue with packing new widgets that aren't in the builder file so pygtk doesn't know how to destory them, but I'm not sure though.
Thanks for any help.