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 531415 - Reset the widgets of a builder
Reset the widgets of a builder
Status: RESOLVED DUPLICATE of bug 447998
Product: gtk+
Classification: Platform
Component: Class: GtkBuilder
unspecified
Other All
: Normal enhancement
: ---
Assigned To: GtkBuilder maintainers
GtkBuilder maintainers
Depends on:
Blocks:
 
 
Reported: 2008-05-04 17:54 UTC by Felipe Reyes
Modified: 2008-05-05 11:36 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement



Description Felipe Reyes 2008-05-04 17:54:57 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)
Comment 1 Johan (not receiving bugmail) Dahlin 2008-05-04 19:55:30 UTC
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.
Comment 2 Felipe Reyes 2008-05-05 00:54:54 UTC
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.
Comment 3 Johan (not receiving bugmail) Dahlin 2008-05-05 11:36:15 UTC

*** This bug has been marked as a duplicate of 447998 ***