[Glade-users] Large Glade XML vs Multiple Small Glade XML



On Sun, Oct 26, 2008 at 1:02 AM, James <proglottis at nothing.co.nz> wrote:
Hey,
So I've been looking around a few of the projects that use Glade3 and
have been developing a few small projects myself.

I'm wondering, is it best to have a single large all encompassing glade
file or many small glade files, say one per dialog. I guess ultimately
I'm interested in finding out what best practices are for using Glade3
especially for multiple dialogs.

Currently I'm wrapping each dialog in its own class and using XML
builder to load the dialog in that class. Such that every dialog class
creates a new instance of XML builder and loads what it needs from a
single large XML file. This is obviously going to be less efficient if
the XML files aren't cached.

Im not exactly sure how gtkbuilder works in that respect, Im sure though
that for you builder using dialog class, it wouldnt be hard to install the
builder as class-wide data...

Ive heard of people using your dialog approach before, sounds sane
enough to me... as for saving in multiple or the same file, it shouldnt
make much difference, you can always split them using copy/paste
across projects in glade in the future, and now glade trunk allows
you to choose a naming scheme to let you have names unique by
toplevel instead of project wide...

... although I should say, recent tests show that with really huge
interfaces glade can be slow at load time (about a minute to load
a glade file of ~1600 widgets) ... I still have to get around to writing
a progress bar for that ;-)

Cheers,
                  -Tristan




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