Re: Glade 2 & passing data to signal handlers



On Sat, 2003-10-18 at 11:24, Russell Shaw wrote:

> Yes, but it will be over-written next time you generate the code.
> Most users don't use this generated code and use gladelib xml which
> is less intrusive on your program.
> 
 Thanks I appreciate the help.....I found what the problem was at least
I think.  When Glade created the
g_signal_connect_swapped((gpointer) okLoginButton, "clicked",
                          G_CALLBACK (on_okLoginButton_clicked),
                          GTK_OBJECT (loginDialog) ); 
connection the first parameter of on_okLoginButton_clicked is
loginDialog not okLoginButton.  Which would make my callback function:

void on_okLoginButton_clicked(gpointer user_data, GtkButton *button)
{
}

not(which Glade had orginally created for me):

void on_okLoginButton_clicked(GtkButton *button, gpointer user_data)
{
}

Correct me if I am wrong but I think the difference between
g_signal_connect and g_signal_connect_swapped is the order the
parameters are recieve by your callback function.  

Joe




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]