[Glade-devel] commit -- add_signal signal

Biswapesh Chattopadhyay biswapesh_chatterjee@tcscal.co.in
14 Mar 2003 10:18:23 +0530


How about pinching the glade-2 menu editing code for glade-3. That seems
to be the only major thing missing before we go for anjuta integration.

Also, it would be nice to enhance the build so that external apps can
use the header files and libs for the widgets. i.e. put teh headers in
$prefix/include/glade-3, create a shared lib libglade-3.so and a .pc
file for pkg-config so that apps can test for availability of the
package.

On Fri, 2003-03-14 at 02:24, glade-devel-admin@lists.ximian.com wrote:
> On Sat, 2003-03-08 at 16:24, Joaquin Cuenca Abela wrote:
> > I've added a "add_signal" to the GladeEditor widget (the properties
> > window).
> >
> > To generate a prototype of the signal, you can do:
> >
> > static void
> > glade_editor_add_signal_cb (GladeEditor *editor, const char *widget_id,
> >                           GType widget_type, guint signal_id,
> >                           const char *callback_name)
> > {
> >       GSignalQuery query;
> >       unsigned int i;
> >
> >       g_signal_query (signal_id, &query);
> >       printf ("%s %s(%s widget, ", g_type_name (query.return_type),
> > callback_name, g_type_name (query.itype));
> >
> >       for (i = 0; i < query.n_params; i++)
> >               printf ("%s arg%d, ", g_type_name
> (query.param_types[i]), i);
> >
> >       printf ("gpointer data);\n");
> > }
> >
> > and hook the glade_editor_add_signal_cb to the "add_signal" of the
> > GladeEditor widget.
> 
> You might want to pinch glade-2 code here, as it provides nice argument
> names instead of "argXX" (at least for standard GTK+/GNOME signals).
> It uses a hard-coded table, that I had to create manually. That isn't
> ideal, but is the best we can do at present. (Or maybe you could put
> this stuff into the widget description XML files.)
> 
> The code is in gb_widget_write_signal_handler_source() and
> lookup_signal_arg_names() in glade/gbsource.c.
> 
> Damon
> 
> _______________________________________________
> Glade-devel maillist  -  Glade-devel@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/glade-devel
-- 
Rgds,
Biswa.