tags:

views:

24

answers:

1

I've been reading tutorials, but one thing I'm not seeing is this: If you're writing a complex application where new windows pop up as a result of button clicks on a main window, should each top level window be a separate glade file, or is there a way to keep all the interface design in one glade file? If so, how do you do that? The glade inspector window seems to show one big hierarchy for everything in the current file.

Or if you have a modal window created as a result of a button click on a main window, can that be in the same glade file too?

+2  A: 

If you aren't already, you should use the latest version of glade3 and the GtkBuilder format instead of the old libglade format. If your app is complex you will probably want to split your interface into multiple files. The thing to keep in mind is that everything in a file is loaded and set up at once. If you could have multiple instances of a given widget hierarchy or if you will need to configure a set of widgets specially each time they are used they should go in their own file.

If you haven't seen this tutorial and this Glade/GtkBuilder FAQ you should definitely give them a read.

Geoff Reedy
That in fact is one of the tutorials I'm following. Although apparently as of 2008 you still had to run the xml converter and apparently now you don't (that took me a while to figure out). So basically you're saying it's one glade file per main presentation entity. That's basically what I wanted to know, thanks. I thought maybe it was like a windows resource file where you would shove everything in one file and pick off what you needed at any given time.
stu