Re: Loading preferences dialogs with Glade

On Sat, 25 Feb 2006 10:26:13 -0600
Michael Ekstrand <lists elehack net> wrote:
> I'm working on a GTKmm app in which I am building the main window
> myself with C++ code, but trying to use Glade to build auxillary
> dialogs (preferences, etc.). I'm having a bit of difficulty figuring
> out when and how to load my Glade file. Ideally, I don't want to have
> to re-read the file every time the preferences dialog is displayed.
> Also, the prefs dialog should be modal.

> So, am I headed down entirely the wrong path? Does ConfigDialog::get()
> need to load the Glade data every time it's called? Should I (horrors)
> be using code generation for this task? Or is there something minor
> that I'm missing?

I answered a lot of my own question now... did a little more poking
around in docs, and learned that glade_xml_new() (and I then presume
related functions, such as glade_xml_construct() used by
Gnome::Glade::Xml) cache the Glade file. So it seems that loading the
Glade fiel each time I create a ConfigDialog is a better solution than
I thought.

I'm still interested in hearing if there are better ways to think about
this problem, or other issues I need to consider.


mouse, n: a device for pointing at the xterm in which you want to type.
                -- Fortune

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