Matt Goodall escribió:
>
> 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.
Yes!
I have done what you tell. I have made a couple of file .c/.h for each
window. In this file there is the original function in interface.c and
its callbacks of callbacks.c. I have preserved main.c and
support.c/support.h. It works!
Thank you very much!
Antonio.
+---------------------------------------------------------------------+
To unsubscribe from this list, send a message to [EMAIL PROTECTED]
with the line "unsubscribe glade-devel" in the body of the message.