Dear list, I am starting my first more involved project with PyGTK and Glade. My application should have a main window and several dialogs, subwindows etc. Ideally, I would like to create the entire GUI in Glade and use gtk.Builder to load it into my program. I encounter two difficulties, where I would appreciate the opinion of more experienced users.
i) gtk.Builder.auto_connect() connects all GUI signals to handlers of a single name space. This way, I am apparently forced to gather all signal handlers in one controller object -- currently a python class called Application. what I would like to have, however, is that the Application instantiates a separate object for each dialog/subwindow, and connects the signals to its handlers. ii) When coding the dialog in python I would create a new widget tree for every occurrence of a dialog. with glade, however, I am apparently forced to reuse the same dialog, which I then have to repopulate, show, and hide (plus finding a way to not have its child widgets destroyed upon closing...). Alternatively, I could think of creating a new empty dialog in my code and then populate it with widgets from the gtk.Builder. (still I would need to reparent the dialog widgets before destroying it.) So, what is the best strategy to use Glade for my controllers while retaining separation of control in the program? Are there established best practices? I read the gtk doc and googled through several tutorials but could not find a good answer to these issues. (Note that in my program, some dialogs will not be modal and the run method should therefore not be used.) Thanks in advance! harold. _______________________________________________ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/