[Glade-users] Widgets in memory...



Great!  Thanks everyone!

- Micah

Neville C. Dempsey wrote:

On Mon, 2005-05-16 at 21:07, Micah Carrick wrote:
 

Just "invisible".  Isn't that a waste of memory for a 
dialog a user may never even see?
   


I believe that is what the root parameter is for... building a widget
from just one branch of the glade file.   For the help docs:
 

glade_xml_new () 
GladeXML*   glade_xml_new                   (const char *fname,
                                            const char *root,
                                            const char *domain);
Creates a new GladeXML object (and the corresponding widgets) from the
XML file fname. Optionally it will only build the interface from the
widget node root (if it is not NULL). This feature is useful if you
only want to build say a toolbar or menu from the XML file, but not
the window it is embedded in. Note also that the XML parse tree is
cached to speed up creating another GladeXML object for the same file
   


Note the file entire file actually gets cached..... If this is a real
problem then you can also break up the glade file into small parts... OR
parse it (into a buffer) with an XML parser, and then "glade_xml_new"
the buffer.

N
 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://galactus.ximian.com/pipermail/glade-users/attachments/20050516/0c9c49fa/attachment-0001.html



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