Hi. First, please dont bluntly use a single Glade file to define your entire interface.
I'll attach here the same tarball which I attached a couple months ago here for demonstration: lists.ximian.com/pipermail/glade-users/2012-January/005469.html With the approach described in the attached tarball, you can simply bootstrap your composite widgets into types directly so that when you create an instance it already has it's interface sub-components created. (such as a "preferences dialog" or "item editor widget" or "user status thingy" or whatever is relevant for your application). This is a little orthogonal to optional viewing of sub-components of your application, typically we control what components of an application are visible via the "View" menu, and we load/save this state along with any relevant session data (possibly to a GKeyFile) Cheers, -Tristan On Tue, Mar 27, 2012 at 12:55 PM, Lachlan <lachlan...@gmail.com> wrote: > hi, > I've decided to hunker down and start developing my first gtk > application. I have a few questions that google hasn't really been > helpful with. I know how to create and load an interface built from > glade but is it possible to take a more modular approach? > > For example I would like to be able to load an empty window, check > config file that defines how the interface looks and import the > widgets into that empty window. > > so a default config file would be something like this in yaml: > > --- FooBar > vbox: 3 > hbox: 2 > item: menu > item: progress > hbox: 2 > vbox: 2 > item: filelist > item: fileinfo > item: preview > item: statusbar > > What I would then like to do; is be able to load or not load parts in > any way the user feels like using this config file. That way it can be > arranged easily without having to edit the entire interface. My guess > is that there would be a main ui file that has the basic window and > then each "item" is loaded from it's own config file which i think can > be done with glade's "Add widget as top level". > > I'm looking to do this all in pygobject and using xml/yaml/whatever. > Is this kind of stuff possible or am i barking up the wrong tree? > _______________________________________________ > gtk-app-devel-list mailing list > gtk-app-devel-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
_______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list