I found a bug in the toolbar code writing functions with Glade. If "New
Group" is set to "Yes" for a button, the correct
"gtk_toolbar_append_space" code is written, if this item is just a
widget though, no space is appended. Here is a patch of
glade/gbwidgets/gbtoolbar.c that fixes this problem:
> 1584a1585,1588
> > if (gb_toolbar_get_new_toolbar_group (parent, child))
> > source_add (data, " gtk_toolbar_append_space (GTK_TOOLBAR (%s));\n\n",
> > parent_name);
> >
>
It might be nice to put a '\n' before this code or something to separate
it from the previous widget creation code.
I'm currently trying to move most of the GUI components of my program,
The Smurf Sound Font Editor (http://smurf.sourceforge.net), to Glade but
have ran into a few things that make it hard to do.
1. The ability to turn off the writing of callback function declarations
would be nice. Smurf has its callbacks separated into different C files.
This makes things a little bit more organized than if they were all in
one file. I haven't particularly had trouble with Glade in doing this,
as I just use the callbacks.h for #including the other header files that
contain the callbacks. But it is a bit annoying that I have to go into
the callbacks.[ch] and erase any newly added signal callback
declarations. It looks like it would be a neat feature for a program
that has all the callbacks in a single file, but it would be nice to be
able to disable it.
2. I use several custom widgets and it would be nice if the custom
widget creation function would not pass any parameters or allow the user
to set the # of parameters to pass. I guess I could create a function
that ignores the 5 parameters that always get passed and then just call
the real creation function, but this seems a bit messy. I also don't see
a reason for having different types of parameters (string/int), isn't
this somewhat arbitrary. I mean if the parameters were just assumed to
be strings and inserted as parameters in the creation function call, it
seems like this would work fine. I didn't quite understand the first
parameter that gets passed, it appears to be the Name of the widget, if
this could be toggled on and off it would be cool too. Perhaps just the
existence of text in one of the parameter entries would cause it to be
used in the creation function call.
Right now I'm just manually adding the custom parts to the interface.
3. It would be neat if a widget could be created on its own (without a
dialog window). So you could create a box widget on its own and then add
elements to it. Then just call the creation function from within your
program, or via the custom widget feature. I was mainly thinking of this
feature in relation to the custom widget feature being kind of messy.
Perhaps this isn't really necessary if the custom widget was a little
more flexible, but it still seems like something that could be used.
Like in a situation where a window or pane has the ability to switch
what widgets appear within it. Like in Smurf the bottom pane can be
toggled to be a Generator View, Generator Control, or Sample View window
with buttons on the toolbar. Right now I'm adding the active widget to
the container and referencing the others so they don't get destroyed,
then if another one becomes active I reference the currently active one,
remove it, and then add the new active one and subtract a reference.
Maybe this could be done in glade by adding all the widgets that could
be in a container and hiding/unhiding them, I have not tried this. Or in
situations where there are several duplicated sets of widgets.
Besides these little things, I really am enjoying using Glade. It gets a
bit tedious trying to make GUI interface changes in code. Separating the
code from the GUI builder is really helpful, I just wish I had started
my project this way :)
Whats the current status of Glade, I notice there hasn't been a release
since May (not that this necessarily means its not being worked on :). I
would be willing to add some of these features I spoke of as it has
become an integral part of my build process. What is your procedure in
adding/changing features. I suppose it should be backwards compatible
with the config files, but how does one go about adding new constructs
to the XML config files. Is this only done between certain versions?
Lates..
Josh Green
+---------------------------------------------------------------------+
To unsubscribe from this list, send a message to [EMAIL PROTECTED]
with the line "unsubscribe glade-devel" in the body of the message.