GNOME Bugzilla – Bug 531415
Reset the widgets of a builder
Last modified: 2008-05-05 11:36:15 UTC
When you use gtkbuilder to construct the ui and you have a lot of windows/dialogs with a bunch of entries, it becomes pretty ugly to have a lot of helper functions to restore the states of the windows. When i used Libglade i just destroyed the GladeXML object (that were constructed using the root node option) and construct the node again when it is necesary to show the window again, and with this you get clean windows without so much code-effort (I understand that re construct the objects over a over again is suboptimal, but IMO is better than populate my project with functions that clean the ui)
This sounds like a duplicate of bug 447998. That bug is unlikely to get closed, the solution I'd recommend is to split your glade file into smaller ones with one toplevel (window or dialog) per file and construct one GtkBuilder object per file. If you need to construct it several times, just re-instantiate another builder. You can split a .glade file into several .ui (one per toplevel) using the gtk-builder-convert migration script.
Johan, I tested that solution and works, but only if you are using gtk-builder-convert and I'm not using it, because with glade 3.5.2 you can save directly the project into a .ui file to be used directly with gtkbuilder. I think you are right (after the observation that did it to me) that this bug is like a duplicate one.
*** This bug has been marked as a duplicate of 447998 ***