Antonio Zugaldia wrote:
> 
> Matt Goodall escribió:
> >
> > Antonio Zugaldia wrote:
> > >
> > > Hello!
> > >
> > >         I have created a new app with glade, but the resulting
> > > interface.c/callbacks.c becomes bigger and bigger, which is the best way
> > > of splitting this files in smaller ones?
> >
> > There has been talk about using a different file structure in the past,
> > splitting each window into its own file. Unfortunately, this isn't
> > possible yet.
> 
> Although it is not possible directly using Glade, how can I do it by
> hand in an optimal way?
> 
> > If you do split it up you'll probably have to split it again (and again)
> > each time you build the code using glade.
> 
> I am not interested in keeping the original.glade file. I use glade for
> building an inital app and then I modify the code (all the code). So,
> once done the splitting I have no need of splitting it again.
> 
> > Have you looked at using libglade instead - it works *really* nicely.
> 
> Yes I have been studying libglade but I have choosen to use pure
> GTK/GNOME instead.

How you split the code is a matter of preference really but I would
probably start by creating a file for each window i.e. window xxx would
have a file called xxx.c.

I would then move the create_xxx() function from interface.c to xxx.c.
Then I would move all callback functions for that window from
callbacks.c to xxx.c, make them static, and remove the prototype from
callbacks.h.

Hope this gives you some ideas.

Cheers, Matt.

-- 
Matt Goodall             |  Isotek Electronics Ltd
email: [EMAIL PROTECTED]  |  Claro House, Servia Road
Tel: +44 113 2343202     |  Leeds, LS7 1NL
Fax: +44 113 2342918     |  England

+---------------------------------------------------------------------+
To unsubscribe from this list, send a message to [EMAIL PROTECTED]
with the line "unsubscribe glade-devel" in the body of the message.

Reply via email to