Re: differences between Glade and GtkBuilder



On Wed, Dec 2, 2009 at 6:52 PM, Shawn Bakhtiar <shashaness hotmail com> wrote:
[...]

Note that this list is about the development of GTK+ itself, please address gtk-app-devel-list
or gtk-list in the future for help using the GTK+ apis.
 
I'm almost certain, that with glade you would load the xml (containing many top levels), then, call get the object you wanted out (which at that time it would construct and realize the widget making it visible)

It seems with GtkBuilder loading the XML and realizing it are done in the same step, which makes it so that each individual top level has to be in its own file? 
Does it not make more sense to have a function that load the XML without realizing anything, then, as objects are requested, doing the actual construction and realization?


FYI libglade and GtkBuilder work the same way in this respect;

Parsing the file builds the widget hierarchy.

If your widgets are getting realized in the process of parsing
the file, it means that one of your toplevel widgets is set to be
visible at startup time (as the builder/libglade sets the toplevel to
be visible, this triggers the realize) - you can deffer the realization
of your widgets by building the toplevels in your project with the
"visible" property set to False (and then showing/realizing them at a later
time)

Cheers,
           -Tristan



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]