On Fri, 2 Feb 2001, Francis Zagnoli wrote:

> Hi all,
> 
> 
> I would like to put on a window several  buttons, and associate to
> theses buttons a signal (clicked) to call the same function but with a
> different parameter for each.
> 
> Something like : on_button_clicked(1) for the button 1,
> on_button_clicked(2) for the button 2, etc...
> 
> But glade generate a function in callback.c with 2 parameters, a pointer
> to the button or a gpointer user_data as follow
> 
> on_Button_clicked  (GtkButton *button,  gpointer user_data).

You have only to type the same function name for each button using Glade.
Then open callbacks.c and callbacks.h and delete all the function you
don't need (obviously you must save only one of these functions). 
 
So when one of these buttons emit "clicked" signal this function will be
called passing as argument the button you have clicked.
 
> How can I have something like : on_Button_clicked (gint ButtonNumber) or
> even on_Button_clicked  (GtkButton *button,  gint ButtonNumber).
> 
> Thank you in advance
> 
> Philippe


I hope to be useful.

Rosa
> 
> 
> _______________________________________________
> Glade-devel maillist  -  [EMAIL PROTECTED]
> http://lists.helixcode.com/mailman/listinfo/glade-devel
> 


_______________________________________________
Glade-devel maillist  -  [EMAIL PROTECTED]
http://lists.helixcode.com/mailman/listinfo/glade-devel

Reply via email to